Oh yes! Fun thread!
I sometimes
play around with Di2. I have a Mac. Shimano’s E-Tube Project does not run on Macs.
The E-Tube Project software is used to run diagnostics and update ‘wireless’ shifters.. and it’s also used to change certain settings. See https://bike.shimano.com/products/apps/e-tube-project-professional.html
For quite a while I played around with emulators and virtual machines to get E-Tube Project to work, but it wasn’t great. And you can’t really dual boot windows on an Apple sillicon mac.
So… I rebuilt E-Tube Project for Mac. It started out as a Python project:
It connects to bikes, performs firmware updates, lets you shift derailleurs, and worked well.
Sure, it sometimes left components in bootloader mode, but I could always get my own app to fix that :).
But then a colleague said: why don’t you try WebUSB? I never thought I could get a browser and the SM-PCE02 tool to talk to a bike reliably, but why not give it a shot? The Python version works, but looks awful. So… I instructed Claude to take the Python version of the app, turn it into a web version.
It can connect to an entire bike, with the SM-PCE02 in slave mode. It’ll then detect the connected components, their current state and firmware versions.
I gave it the Shimano API urls and format, and if/when a new firmware version is released, it can install those. It can also downgrade firmware, something the Shimano tool doesn’t let you do.
I can’t redistribute any of the Shimano files, so the browser downloads the relevant firmware file when the user wants to flash that to a component.
Flashing firmware when the PCE02 is connected in ‘host’ mode (only the PCE02 and a couple of components) works really well. It’s pretty safe and I trust it.
Flashing firmware with the PCE02 in ‘slave’ mode - when there’s a Junction A / RD + battery connected is a lot more risky. The E-Tube Project timings are subtle.. I can no longer count the number of times the web app left components in bootloader mode or the entire bike unresponsive - definitely more than 50 times so far 
Sometimes it would flash correctly, but then release components in the wrong order.. sometimes it would not release them at all, or flood the PCE02 with messages every 1ms instead of waiting 11-15ms like the Shimano tool does.. and the browser being async meant the Python project wasn’t a single ‘apply this to the web’ conversion.
When it works though, it’s great:
And if you’re on an android phone, you can even connect the SM-PCE02 to your phone and use the web app that way :).
Here’s a short demo: https://www.youtube.com/shorts/TfNfWIIpxUo and https://youtube.com/shorts/S6I1l9oE84M
What’s next…? Well.. first I’ll stop it from bricking bikes all the time
. Then I’ll make it look better and remove the AI looks.. I’ll also see if I can get it to support the older SM-PCE1 and the SM-BCR2 (charger).
I’ll also have to review the code at some point.. at least I do speak JavaScript/Next/React (…I don’t know Python). It’s hooked up to Sentry, so that every connect I get an ‘info’ event with the connected bike parts and the log. Also, when things go wrong, that logs an error to sentry with the log as an attachment… so that I can fix that specific case.
It’s a fun project, but involves bricking a lot of Di2 parts… quite often. Good times!