AntPlus Battery Status

This shouldn't be hard to do. I have an Garmin Edge 1030 and a connected Garmin ANT+ Cadence Sensor. It takes 30 seconds or so for the Edge device to get a Battery = OK status at the device level on a newly connected cadence sensor.

But my simple CIQ data field continues to report NULL for the Battery Status (on a real device with a connected cadence sensor reporting Battery = OK to the device). There are no samples in the SDK  that use AntPlus. I've implemented examples here in the Forum. No joy.

Here is my code. Straight forward. I must be missing something very basic and obvious to someone skilled in the art of sensors :-)

  • I saw your comments on the other thread, but didn't have chance to answer it. Basically everything looks good and same way I'm doing similar thing. This is in watch app and widget types, but that shouldn't matter. I have Garmin cadence sensor 2, and I have no trouble getting the battery info. Since the device info is showing battery status, the same info should be available through the API.

    Do you ever get the listener to trigger? Have you checked what the connection status shows, does it show connected sensor?

  • Thanks Kurev! I also have a Sensor 2 (the new one that is both ANT and BT). I'll go grab that one and try that one. No I didn't get a trigger event... Just the attempted polling capture in compute(). But maybe I wouldn't know about a trigger because it only Prints and I can't emulate ANT sensors in Eclipse. I need to change the listener to write to the device screen or log to a device file. I'll do that too. And I'll play with connection status. I'll let you know this evening. I REALLY appreciate your help in this community with your expertise with sensors!

  • You know you can log prints to a file on real device too? Just by adding <appname>.TXT to app/logs folder. But listener might not trigger often, basically only when something changes, and in case of battery level you won't see that often. If you want to capture all messages, you can implement onMessage() to listener, and parse the payload data.

    Also you can play with Antplus stuff on simulator, by bying Ant+ USB dongle for your computer. They don't cost much, and make development much more faster and easier.