The firmware calculates battery level based on the battery voltage. The battery gatt service only provides the battery level but if you use the readBatteryState function (only firmware v1.1.0 and higher), you can get at battery voltage value which will be more useful for characterizing your use case.
Is this now readBatteryLevel? I'm using the android SDK and readBatteryState is not available.
I'm also only seeing values of 99 or 98. I've never seen lower. I'm connected over BLE and streaming accelerometer data at 10hz. I'd expect 15 hours or so of battery life, and the battery level to at least drop over time.
I'm issuing readBatteryLevel commands every 5 minutes while connected.
I'm running firmware version 1.2.5, copy/pasted the sample (using android) and I never get a call to the MessageHandler. The CompletionHandler success method is called.
I've called readBatteryState right after the route code (as shown in sample) and called it in a loop every 5 seconds. Neither works for me.
I hate to open this back up, but I'm still struggling with how I use the voltage and charge properties. I want the same experience you get with your cell phone. ex. 55% charge. It doesn't need to be extremely accurate.
Right now I'm doing the following (below). I've never seen batterLvl go below 80, and then the sensor runs out of battery anyway. What's the best way to use this data to emulate the battery % you get with cell phones today?
Comments