SRAM AXS Battery Status

Is it possible to get battery status for a SRAM AXS system using shiftinglistener? I am using the following, but the answer is always '7' And, if it is possible, does it give the battery status of the front or rear derailleur. In my groupset the rear derailleur is the master component so I assume it would give the battery status of this??

ShifterListener = new AntPlus.ShiftingListener();
BikeShifter = new AntPlus.Shifting(ShifterListener);

if(BikeShifter has :batteryStatus) {
if(BikeShifter.batteryStatus != null) {
ShifterBattery = BikeShifter.batteryStatus;
} else {
ShifterBattery = 7;
}
}

  • That makes sense now. When I was using a listener my eTAP battery would display the lowerest battery. Now that I'm polling them I get each individual battery.

    I do the same with my Bontrager ANT+ lights, but I found today was when the lights get to a low enough battery state they stop responding to polls..

    As for power meters, I only have a assimo Uno so I can't test if each pedal has a unique identifier, I would assume it does though.

  • Former Member
    0 Former Member over 4 years ago

    Sorry for off topic, but does anyone of you know if I can get the actual shiftingmode of an sram etap force axs for a datafield

  • OMG this is awesome. Thanks!! I did not see pages inbound via onMessage for component IDs 3 and 4, which are supposed to be for my SRAM shifter levers. I only see IDs 1 and 2 for the derailleurs. I also just got two of the new SRAM battery powered extension shifter buttons. So in theory, I should now see 6 shifter components. I hope your code works for me. Thank you!!

  • STRANGE results using getComponentIdentifiers(). The top colored results are from onMessage. The bottom lines are from getComponentIdentifiers() and getBatteryStatus for each identifier in the array.

    I have *two* Power Meter pedals and *four* Shifter components.

    The STRANGE thing for Shifters is that onMessage only saw pages for the FRONT shifter. However, getComponentIdentifiers found all four (two derailleurs and two shift levers). ID #1 (Front) has a status of "4", which is "LOW". Strangely for SRAM AXS, the shift levers came back with IDs 6 and 7, when it should have returned ID 3 and 4, per the spec.

    The other STRANGE thing is that onMessage saw pages for both POWER pedals. But getComponentIdentifiers only saw ID #0 (the right side pedal) with a Status of "3" which is "OKAY".

    So there are some major issues.

  • Make sure you activate all four components of the gears before connecting to the edge unit. Sometimes it doesn't like it if it can not find all four components. Also, everytime SRAM does a firmware update you have to reconnect the components using the rear derailleur button so that the battery status works again. I found that the shifter batteries were not working sometimes after a firmware update

  • Interesting. I'll try that. Thank you.

  • Curious if your SRAM shifter levels come back with Component IDs 3/4 or 6/7, and if you get non-null status or voltage values for your shifters? I think you said you have eTap (not AXS), so maybe AXS broke their implementation. I did apply the latest firmware but still only getting data for IDs 1, and 2. 

    By the way, my wireless BLIPS do not show up in the componentID array.

  • I have etap AXS. If you have the new AXS it might be different. Although the components supposed to be backwards compatible 

  • Yes, I have the 12 spd AXS. Hard to imagine they broke the ANT interface. I mostly care about the two derailleur battery levels. The shifters last forever. But I wish I could get those battery levels too. Strange I get IDs 6 and 7 and no status or voltage. Oh well, Thank you!

  • I'm following this old tread:

    I have no electric shift system for testing, and a user asked me to implement the rear derailleur battery to my datafield.
    So I followed the code of page 1 of this thread and built a testing datafield for the user  to sideload.
    Unfortunately this datafield throws an "Out of bounds" error.

    I attach the whole small datafield to this posting and kindly ask one of you to have a look at it.

    I marked the line in compute(), which throws the error:

    var batStatus = bikeShifter.getBatteryStatus(shifterArray[0]); // This line throws an "Array out of bound" error!

    TestSRAMBattery.zip