Di2 shifting status

I am looking at developer.garmin.com/.../Shifting.html and it says

getShiftingStatus ⇒ ShiftingStatus
Get current shifting system status Will not provide status for Shimano shifting systems.

Is this still relevant or am I looking at something outdated? Sounds a bit strange

Does this mean I can't (with a di2) call Shifting.getShiftingStatus, but I can register a Shifting.ShiftingListener which will fire with a ShiftingStatus object (containing separate DerailleurStatus for front and back)? 

  • This is something where just trying it might be the best way to get an answer.  The Di2 can be paired on some devices, so you probably want to use a device that has that.

    From the API doc, this is "since 3.1.0" so my gut feel is that it's not outdated and correct.

  • Yes, I'm aiming for the Edge 530 but I won't get my bike for another few weeks so I'm stuck writing software without something to test it on ;-)

  • I can't comment on getShiftingStatus, but I use info.rearDerailleurSize in compute() to find out what cassette gear I'm currently in and display in my App.  Seems to work fine on all my target devices (edge 520 and up and Fenix5 and up, with di2 paired through the device).  I guess it depends on what you're trying to achieve.

  • Yes, I notice the information is in there, too but decided for a separate AntPlus listener since my app only pushes updates once a second so there could be a delay for the shifting information. The listener should be able to react directly and the update could be explicitly requested. Still no bike to test it on, though :-/

  • Hi Nik, again! :) Could you figure out this part? I was trying to implement an app which would actually get the di2 shifting infomation shown in the Garmin Connect app, but I couldn't figure out this whole mess of listeners, devices and the fact that I cannot test ANT+ through the SDK just made the whole process inpossible.

  • Well, now I have the bike but still no WU-111 so I just ride ;-) I'll have to get back to this once I get around to buying a unit. I have noticed that the use of it appears to be pretty marginal -  charging the bike is something you have to do quite seldom and I ride in whatever gear I ride in. One thing that might come in handy would be some sort of sound when full synchro is about to shift the large ring, although you can usually hear that from the machinery, too.

  • You'd actually get a beep from the Garmin headunit when there is a chainring change. I find it nice, although I think it only happened a couple of times, when I didn't know that it was going to change.

    I only bought it to use the left aero bar shift buttons to control the Garmin unit. I found it quite dangerous to get off from the bars. But now that I have it, it would be nice to see the shifting statistics in the  ride data.

  • Well, I tried something like

    using Toybox.AntPlus;
    
    class DI2 {
    
    	hidden var shifting;
    
    	hidden var frontGearIndex;
    	hidden var rearGearIndex;
    
    	function initialize() {
    		var listener = new DI2ShiftingListener();
    		shifting = new AntPlus.Shifting(listener);
    	}
    	
    	class DI2ShiftingListener extends AntPlus.ShiftingListener {
    		function initialize() {
    			AntPlus.ShiftingListener.initialize();
    		}
    		
    		function onShiftingUpdate(data) {
    			if (data != null) {
    				if (data.frontDerailleur != null) {
    					frontGearIndex = data.frontDerailleur.gearIndex;
    					System.println("FG " + frontGearIndex);
    				} else {
    					System.println("FD is null");
    				}	
    				if (data.rearDerailleur != null) {
    					rearGearIndex = data.rearDerailleur.gearIndex;
    					System.println("RG " + rearGearIndex);
    				} else {
    					System.println("RD is null");
    				}
    			} else {
    				System.println("data is null");
    			}
    		}
    	}
    
    
    	function getFrontGearIndex() {
    		return frontGearIndex;
    	}
    	
    	function getRearGearIndex() {
    		return rearGearIndex;
    	}
    
    }

    and instantiate the class but I get no output in the log when I fiddle with the di2 (and I've seen the Edge find it). Is the conclusion that the Di2 is not supported through the listener, either?

  • It could be that it is not supported. A while back I did some googling about DI2, and to me it seems that it is not following the AntPlus Shifting profile, and Garmin device firmware is handling it special way.

  • "Developed in collaboration with SRAM, the ANT+ Shifting Device Profile is the first interoperable standard for wireless shifting status"

    If it's a case of "call what we do a standard" it's understandable if Shimano is lagging