Ticket Created
over 4 years ago

WERETECH-10039

ANT+ Battery Status

The latest in the saga for Battery Status. I used an ANT+ dongle on my Windows Laptop, and paired it with the Eclipse Simulator. I tried both an older Garmin Cadence Sensor, and a brand new one (the one that does both ANT and BT). Same outcome. In both cases, the CIQ data field immediately gets Device State info. After maybe 30-40 seconds, the ProductInfo.serial number comes thru. Just like in real life when paired to a real Garmin Edge computer. But in both cases, even after several minutes, the Battery Status remains null.

When I pair the new cadence sensor to my actual Garmin Edge computer, the Battery Status does come up as OK within 15 seconds or so and then maybe 30 seconds later the Serial # info comes through.

Any clue why the polling code isn't seeing the Battery Status?

Oh, also, the State Update Listener is triggering, but the BatteryStatusListener is not.

  • Yes, I joined "thisisant". As always, your expertise is much appreciated! I didn't see a shifting profile... I'll look in the link you sent. /resized-image/__size/320x240/__key/commentfiles/fb5d84b10a5745448a7a45dafc1faa43-bef7cf5b-cf7f-40ec-813a-c5651a6c4bee/pastedimage1605182824801v1.png Oh - maybe I need to upgrade my account? :-( /resized-image/__size/320x240/__key/commentfiles/fb5d84b10a5745448a7a45dafc1faa43-bef7cf5b-cf7f-40ec-813a-c5651a6c4bee/pastedimage1605182914946v1.png Free upgrade! got it. Thanks!! /resized-image/__size/320x240/__key/commentfiles/fb5d84b10a5745448a7a45dafc1faa43-bef7cf5b-cf7f-40ec-813a-c5651a6c4bee/pastedimage1605183255931v1.png
  • [quote userid="43945" url="~/developer/connect-iq/f/discussion/245190/ant-battery-status/1163666"]I joined the ANT+ developer's group, so I imagine the details are in one of their documents. You have a lot of experience with this stuff. Any tips? Thanks!![/quote] By Ant+ developer's group, do you mean registering to thisisant.com? If yes, that is the correct place, documents for Ant+ profiles are here. In those you have description of each page content for each profile: www.thisisant.com/.../  In this case for page 82 (described in Common Data Pages doc, as well as in Shifting profile doc), you have battery identifier in byte 2 (values 36 or 68):
    Identifies the battery in system to which this battery status pertains and specifies how many batteries are available in the system.
    
    Bits 0 – 3: Number of Batteries
    Bits 4 – 7: Battery Identifier(Refer to Table 6-3)
    
    Set to 0xFF if not used.
    Why the status is 1 'new', again it is up to sensor manufacturer.
  • Hi Kurev, I am down to getting my Shifting Sensors' battery status. For eTAP there are actually FOUR batteries. Front/rear derailleur and left/right shifters. Here are the page 82 responses. I got a single one with the 8v reading, and then I got repeated pages with 2.42 and 2.45 volts. I can't seem to figure out which voltage related to which of the 4 components. Not sure why I didn't get 4 different voltage readings. Or why the STATUS is "1" - the batteries are definitely not "new". I joined the ANT+ developer's group, so I imagine the details are in one of their documents. You have a lot of experience with this stuff. Any tips? Thanks!! Shifting MESSAGE Received: page:{82} payload:[[82, 255, 36, 255, 255, 255, 12, 24]] 6:13:56 LISTENER Shifting Battery: {p82} Status:1 (8.046875V) [50173] Shifting MESSAGE Received: page:{82} payload:[[82, 255, 68, 255, 255, 255, 107, 18]] 6:14:04 LISTENER Shifting Battery: {p82} Status:1 (2.417969V) [50173] Shifting MESSAGE Received: page:{82} payload:[[82, 255, 68, 255, 255, 255, 115, 18]] 6:14:32 LISTENER Shifting Battery: {p82} Status:1 (2.449219V) [50173]
  • Ok - I finished my data field. Here are some insights for two ANT devices (Cadence and Radar). It looks like to gather Voltage status every device is different. Some work with Polling. Some work with Page 4 messages. Some work with Page 82 messages. Interestingly... I turned off the RADAR unit (and the pairing light in the sim turned from green to yellow), but the battery status and voltage was still being read. /resized-image/__size/320x240/__key/commentfiles/fb5d84b10a5745448a7a45dafc1faa43-bef7cf5b-cf7f-40ec-813a-c5651a6c4bee/pastedimage1605045752984v2.png
  • Ok - getting closer. I now can see my RADAR and my CADENCE battery voltage and status! Yeah. My data field reports if I gathered that status and voltage from Polling (P) or the Listener (L). It turns out the RADAR does work with the polling method, and the CADENCE sensor only works from the Listener (which returns page 4 about every 50 seconds). If I get the voltage from both P and L I report the higher of the two voltages. /resized-image/__size/320x240/__key/commentfiles/fb5d84b10a5745448a7a45dafc1faa43-bef7cf5b-cf7f-40ec-813a-c5651a6c4bee/pastedimage1605028523750v1.png