Repository navigation
[NXT - help wanted]: WebUSB firmware installation #2429
Description
Activity
- addedsoftware: pybricks-codeIssues with https://code.pybricks.com applicationIssues with https://code.pybricks.com applicationtopic: flashing firmwareIssues related to fhe firmware flashing processIssues related to fhe firmware flashing processhelp wantedExtra attention is neededExtra attention is needed
on Nov 7, 2025 Do we need any
winusbdrivers here like we do for DFU on SPIKE?I'll need to do a bit of research to be sure, but I think so, yes.
This one gets a bit more complicated too because Windows users may have the official LEGO driver installed and have to switch it to the WinUSB driver. (I'm pretty sure the LEGO driver predates WinUSB, but this is what I need to check in to.)
And to complicate it even more, the Samba bootloader on NXT uses a non-LEGO USB vendor/product ID. This ID is also used by other microcontroller boards. Windows users that have installed the Arduino IDE will have a USB driver installed already that matches it. If we are lucky, this is a WinUSB driver and users won't have to change it.
Thanks! If we can find an existing well-regarded app for people to install on Windows, maybe that would work too. For example, then we could say "Install this Arduino IDE, then come back to Pybricks to update your NXT", that could be easily explained.
Ideally we find a way to make this a one-time install, rather than repeatedly going to device manager for each hub. Resetting the NXT is hard enough as it is, and there isn't much feedback for the user to go by.
Or maybe this is where we fork zadig to install all required NXT, SPIKE, RCX drivers all in one click? 😄
We could probably find the driver installer that is bundled by Arduino that contains the relevant driver. I would expect some users - especially ones that know what Arduino is - to be a bit confused by this though since Arduino doesn't have anything to do with LEGO or Pybricks. Still possibly the best option though. 😄
And we will also need instructions on how to manually select the driver if users want to switch back to the official NXT software. If both the Arduino driver and the LEGO driver are installed at the same time, the Arduino driver takes precedence.
And we will also need instructions on how to manually select the driver if users want to switch back to the official NXT software.
If we're going by the pattern of entering update mode (reset button) to do both install and restore, is there any difference in terms of going back?
Ah, right. I guess just the firmware flash feature in the official LEGO software would not work. So if users were OK with always using Pybricks to flash the firmware, then they wouldn't necessarily need to switch back. But we would still want the instructions somewhere for people that want to restore fully "stock" conditions for the official LEGO software.
- addedplatform: NXTIssues related to LEGO MINDSTORMS NXTIssues related to LEGO MINDSTORMS NXT
on Dec 8, 2025 Let's start by assuming that the user puts the brick in update mode, just like we do everywhere else.
Do we need any
winusbdrivers here like we do for DFU on SPIKE? If so, we should add instructions for this too in the same way.A bit of an update on this. We have shown in Pybricksdev that installation can be done using a normal serial port interface instead of using raw usb and unloading a registered kernel driver. This has been confirmed on Windows and Linux so far.
It looks like Windows even recognizes the bootloader by default in the browser, so this is looking quite promising.
So I think somebody who is interested could start on the Pybricks Code side of it.
The "UI/UX" would be the same as the dialogs we have for SPIKE Prime. Only instead of connecting to a DFU device we would connect to a serial device and follow the steps in Pybricks Code above to upload the firmware. We can also skip the extra steps for installing a WinUSB driver.
But we would still want the instructions somewhere for people that want to restore fully "stock" conditions for the official LEGO software.
I think we could treat this like SPIKE too. Users would use the recovery option in Pybricks and then go back to the LEGO app.
This is done and will be included in a future release.
pybricksdev has an implementation for flashing the NXT, but we don't have one for Pybricks Code yet.
The user experience would be similar to the recent addition of EV3 flash support.
Let's start by assuming that the user puts the brick in update mode, just like we do everywhere else.
Do we need any
winusbdrivers here like we do for DFU on SPIKE? If so, we should add instructions for this too in the same way.