Took a Consumer Google Glass out of storage and now it won't hold a charge(?) - google-glass

This Google Glass has been in it's bag for a couple of years; It's the consumer version with the little nose rests and no apparent model number or identification. Here's a commercial picture of the model I have: https://images.techhive.com/images/article/2014/11/google-glass-100528641-medium.idge.jpg
I took it out and plugged it in to a known good USB cable and a known good 5v USB charger (that is, not the cable and charger from Google).
The light next to the switch comes on when I plug it in but turns off within 2 seconds. I left it charging overnight, and I can't get it to turn on or reset or factory reset.
I don't know for sure whether it is taking a charge and something else is wrong, or if it isn't charging due to a cable or charger incompatibility.
I've Googled about this and can't find any advice other than how to turn on (nothing happens), reset (nothing happens), or factory reset (nothing happens). Are there any other suggestions from people working with these devices?
Alternatively, does anybody have the spec for a replacement battery? The tear-downs spec it at 570 mAh but don't mention the voltage.

Related

zwave/cpp - GetValue from Thermostat (Temperature and Humidity)

I know I'm asking a dumb question, but I'm quite of a zwave/openzwave beginner, so I wanted to get some help on that.
My zwave network is already up, and I have two nodes:
the key itself to control the other nodes
a sensor for temperature and humidity (the ST814, from Everspring)
Now, I want to display the temperature and the humidity in my console, but I'm not really understanding how it works. From what I understood, I need to configure the auto-report of my sensor (doc is here, see page 6), and get the notifications every X minutes, but I'm not sure.
Does someone already did that or know how to do it?
Thank you a lot,
Maxime
Imagine there's a room full of people from Sweden, and they're all talking to each other in Swedish. Even though you can hear what they're saying, it doesn't mean anything to you because you don't speak Swedish. If you had the ability to speak Swedish, you would understand exactly what was going on.
Now imagine there's a network full of devices and a controller that all speak Z-Wave. Sensors are reporting temperature and humidity at regular intervals to the controller. But, even though you can hear what they're saying, it doesn't mean anything to you because you don't speak Z-Wave.
OpenZWave is a library that enables you to understand and speak Z-Wave. You can use it to create software that listens to the conversations, decides what action to take and even barks out orders in Z-Wave to devices (e.g., motion detection -> call the police). OpenZWave comes with sample applications that show you how to construct your own home automation software using the OpenZWave library. You can also use a software package such as Domoticz, HomeSeer, OpenHAB or SmartThings. These applications provide a broad set of home automation features and functionality so you don't have to program them yourself.
To use the least amount of battery, a device such as the ST814 spends most of its time sleeping. At user-defined regular intervals (for example, every hour), the device wakes up, reports the temperature and humidity to the controller and checks to make sure there are no other commands or requests waiting for it. Then it goes back to sleep. You determine how often the device wakes up and can set it according to the instructions you referenced.
If you want to intercept the temperature and humidity report from the ST814 to the controller and output it to the console with OpenZwave, you need to write some code or use someone else's program. The latter is easier, but might not enable you to do exactly what you want to do. Using OpenZWave is harder, but provides the capability to do just about anything you want to do.

control battery behavior in omnet++/inet

i need to write a battery model that is able to discharge and charge at specified times in a simulated wireless sensor network in omnet++ using inet modules.
as far as i got i did understand that i need to build an IBattery implementation to provide battery specifications and maybe recharging capabilities and some other module/way to begin discharging and charging periods.
one idea was to implement the IPowerControl interface but it does not seem to have control over the type of event (e.g. charging or discharging)
what should i look for? i am a bit overwhelmed by inet source code dimension and got lost...

Ideas for programming a robot to be autonomous w/o the use of bluetooth device or computer?

In a freshman level course, I am in a group that must program a robot to be autonomous. As of now, the machine will connect to my laptop and run a code I have created which is sufficient autonomously.
However, we want to find a way to get my code (which is in C) onto some sort of chip or something similar, that way the robot can run without needing a laptop or other device connected to it. The robot NEEDS bluetooth connecting to it, so I figure that I need to program some sort of microchip to connect to an arduino to connect to a bluetooth to connect to the robot. Below is exactly what our robot is going to do, in case you need some more information.
Any ideas? If I have to re-code in a different language, that should not be a problem. Money is not an issue, our Engineering department is paying for it. Any help is appreciated!
WHAT IT DOES:
Our robot will autonomously sweep through rooms, doing a job we deem necessary, which will not be disclosed because it is a competition for our class and my classmates know I am posting here. The robot only can be connected to via bluetooth, which makes it a little more challenging to find a way to NOT use a laptop / phone / other device. We want you to be able to "take it out of the package, press a button, and go".
Thank you so much for any help!
I would give Raspberry PI a try, you can run Linux on it, connect keyboard, HDMI screen. You may could use your existing C code. Examples
A more simple hardware is based on arduino but in that case you need to rewrite your code and probably also more hardware work, here some examples
You can connect on both hardware a bluetooth or wifi interface or anything else you wish.
If the program is small enough and you have a good interface, a Lego Mindstorms NXT might work. This has bluetooth built in, and runs RobotC (which is highly similar to C, and should be easy to translate if needed) quite well. Ultimately, though, it depends on what hardware you have, and how hard it is to connect to the NXT.

Duplicate USB virtual serial ports being created - what might cause this?

I've got a strange problem with some code I inherited from another programmer who's left the company, and need some guidance on how to even begin to solve it.
The problem is this - on a semi-regular basis, we are finding that duplicate USB virtual comm ports are being created. For example, on my PC, when I view the Ports in Device Manager, and select "View Hidden Devices", I have two entries for the same device - one on COM6, and one on COM8.
Unfortunately, we cannot reliably re-create the problem. We suspect it may happen when someone quickly disconnects and reconnects the USB cable when our software is running, but that needs to be confirmed.
As far as I can tell, the code was written assuming that no one would ever unplug a cable. I see no logic whatsoever to detect this condition after the SW is started. And it fails when you re-plug the cable - silently generating read and write errors even after the cable is plugged back in. You have to restart the program before it will work again.
I have very little serial and USB experience, and am at a bit of a loss as to how to even get started on fixing this.
Can anyone suggest why this might be happening?
Misc. details, in case they might be relevant:
USB serial code is in a C++ DLL
VS2008
FTDIBUS USB/Serial drivers
Windows XP and Win7
Screen shot of duplicate Registry entries (note the value of the selected key!)
As explained on Raymond Chen's blog, the Old New Thing, here, and by commenters above:
https://blogs.msdn.com/b/oldnewthing/archive/2004/11/10/255047.aspx
To summarize:
Devices which are unplugged and plugged in again are tracked so they are not treated as a new device every time.
Usually this uses the device serial number to detect whether a device is the same one.
However not every device has a serial number. These devices are treated as the same device only if they have the same vendor ID and product ID and are plugged into the same port. If they are plugged into a different port they are treated as a different device.
Some manufacturers do not understand the word "Serial" in "Serial Number" and give all devices the same number instead of giving them numbers serially... To cope with this there is a registry setting which can be used to force these devices to be treated as if they have no serial number.
Therefore, if a device with no serial number or which is flagged in the Windows Registry as having duplicate serial numbers is plugged in to a serial port it has not been plugged into before, it will be treated as a new device rather than a reconnection of an old device. This will result in "Ghost" devices as you describe.
Some FTDI devices are specifically called out as having this problem by the manufacturer:
http://www.ftdichip.com/Support/Knowledgebase/index.html?ignorehardwareserialnumber.htm

Why can't I set master volume for USB/Firewire Audio interface with IAudioEndpointVolume::SetMasterVolumeLevelScalar

I am trying to fix an Audacity bug that revolves around portmixer. The output/input level is settable using the mac version of portmixer, but not always in windows. I am debugging portmixer's window code to try to make it work there.
Using IAudioEndpointVolume::SetMasterVolumeLevelScalar to set the master volume works fine for onboard sound, but using pro external USB or firewire interfaces like the RME Fireface 400, the output volume won't change, although it is reflected in Window's sound control panel for that device, and also in the system mixer.
Also, outside of our program, changing the master slider for the system mixer (in the taskbar) there is no effect - the soundcard outputs the same (full) level regardless of the level the system says it is at. The only way to change the output level is using the custom app that the hardware developers give with the card.
The IAudioEndpointVolume::QueryHardwareSupport function gives back ENDPOINT_HARDWARE_SUPPORT_VOLUME so it should be able to do this.
This behavior exists for both input and output on many devices.
Is this possibly a Window's bug?
It is possible to workaround this by emulating (scaling) the output, but this is not preferred as it is not functionally identical - better to let the audio interface do the scaling (esp. for input if it involves a preamp).
The cards you talk about -like the RME- ones simply do not support setting the master or any other level through software, and there is not much you can do about it. This is not a Windows bug. One could argue that giving back ENDPOINT_HARDWARE_SUPPORT_VOLUME is a bug though, but that likely originates from the driver level, not Windows itself.
The only solution I found so far is hooking up a debugger (or adding a dll hook) to the vendor supplied software and looking at the DeviceIOControl calls it makes (those are the ones used to talk to the hardware) while setting the volume in the vendor software. Pretty hard to do this for every single card, but probably worth doing for a couple of pro cards. Especially for Audacity, for open source audio software it's actually not that bad so I can imagine some people being really happy if the volume on their card could be set by it. (at the time we were exclusively using an RME Multiface I spent quite some time in figuring out the DeviceIOControl calls, but in the end it was definitely worth it as I could set the volume in dB for any point in the matrix)