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.

  • I paired my Garmin RADAR unit. I can pair it in the simulator. And on my Garmin Edge device I see the RADAR, and in the status pages it tells me my BATTERY status is "NEW". But in the CIQ data field in the simulator, I don't get the polling to return a value and there is no listener being triggered. So, I tried to setup the "sendPageRequest" to request pages 4 and 82 every 15 seconds. But sendPageRequest fails. It doesn't like the value I'm sending (eg: 4 or 0x04). Looks like a bug? I was hoping if I asked for a page, maybe the radar unit would cause it to be sent? Anyone ever try "sendPageRequest"? /resized-image/__size/320x240/__key/commentfiles/fb5d84b10a5745448a7a45dafc1faa43-bef7cf5b-cf7f-40ec-813a-c5651a6c4bee/pastedimage1605027437467v1.png
  • Hi Dave, looking at my devices i observed these "strange values" returned by deviceState.deviceNumber when a sensor has a 6 digit ANT ID. For devices with 5 digit ANT IDs the deviceState.deviceNumber matches the ANT ID. Werner
  • [quote userid="43945" url="~/developer/connect-iq/f/discussion/245190/ant-battery-status/1162509"]But the polling method "cadenceDeviceState.deviceNumber" returns some strange value [26107] that doesn't correlate to anything I can figure out. Any idea? Could this be an indication of why we're seeing the bug where the polling method doesn't return a valid battery voltage?[/quote] Hard to say, could be. I think I have never used DeviceState.deviceNumber, since it has not been AntId. However, it is not clear if this should be AntId, or some other deviceNumber. SDK says this:     deviceNumber     The current Device ID being tracked/searched for. but AntPlus.Message is like this:     deviceNumber     The Unique device number (ANT-id). So antplus is very specific it is AntId, but the other is not. Would make sense they'd be the same, so possibly a bug too. And who knows what side effects it would have.
  • here is how this works for page 4... /resized-image/__size/320x240/__key/commentfiles/fb5d84b10a5745448a7a45dafc1faa43-bef7cf5b-cf7f-40ec-813a-c5651a6c4bee/pastedimage1605019715943v1.png
  • I don't understand why the PAGE parsing returns "msg.deviceNumber" which is the valid ANT ID as shown on my Edge computer [747003]. But the polling method "cadenceDeviceState.deviceNumber" returns some strange value [26107] that doesn't correlate to anything I can figure out. Any idea? Could this be an indication of why we're seeing the bug where the polling method doesn't return a valid battery voltage? I'm getting a PAGE 4 every 50 seconds. /resized-image/__size/320x240/__key/commentfiles/fb5d84b10a5745448a7a45dafc1faa43-bef7cf5b-cf7f-40ec-813a-c5651a6c4bee/pastedimage1605016238623v1.png