pybricks / support

Pybricks support and general discussion
MIT License
104 stars 6 forks source link

On firmware install: Spike Prime hub did not show DFU device and Robot Inventor did #1690

Open BertLindeman opened 6 days ago

BertLindeman commented 6 days ago

After some time, I wanted to flash newer firmware (for #1678) on the primehub that was still at this CI firmware (build 3380 I think).

  1. Bluetooth is enabled on the hub.
  2. Press the bluetooth button and insert the USB cable to Win11 and wait for a colorful led blinking.
  3. No DFU device to connect to.
  4. windows device manager shows an exclamation mark on the device.

Without any change on the windows side tried the same action on a Robot Inventor hub. And that went fine.

Re-tried the PrimeHub and again no DFU device.

Did a re-install of the dfu driver as you document. Now the PrimeHub is shown as DFU device and can have it's firmware updated.

So no problem in the end, but I add this in case anyone has this problem too.

Bert

Originally posted by @BertLindeman in https://github.com/pybricks/support/issues/1615#issuecomment-2190024249

[EDIT] Environment:

laurensvalk commented 6 days ago

Doing the DFU driver steps seems to be required on Windows for every new hub you use.

I wonder if Windows "forgets" about certain devices eventually, so it would treat it like a new hub? (Just as it does with Bluetooth devices)

BertLindeman commented 6 days ago

"eventually" is the key word I think.

The last hub I installed yesterday was the prime hub, so to test I now updated the RobotInventor Hub. No problem. So it's not really a simple one usb hub only.

dlech commented 6 days ago

Robot Inventor and SPIKE Prime and SPIKE Essential all have different USB product IDs, so I would expect that we would have to configure the WinUSB driver for each type of hub individually.

Windows should not "forget" unless you manually uninstall the driver/remove the device from the Device Manager.

laurensvalk commented 6 days ago

I would expect that we would have to configure the WinUSB driver for each type of hub individually.

I think it is each hub, not just each hub type.

dlech commented 6 days ago

Interesting, I wonder if Windows is looking at the serial number as well when we manually configure a driver.

laurensvalk commented 6 days ago

Oh, nice - if that means that there might be a slightly different setup path that would make it necessary just once, that would be pretty neat for classroom use.

dlech commented 6 days ago

For for that, I think https://github.com/pbatard/libwdi/wiki/Zadig can help.

It will basically create a signed driver for you that just uses the VID/PID match.

laurensvalk commented 6 days ago

I suppose we could test if that generic windows driver installer Zadig we had once upon a time makes it necessary once or for every hub.

EDIT: beat me to it :)

dlech commented 6 days ago

I wonder if we could use Zadig to create a .inf file and then just share that file rather than everyone having to install Zadig?

laurensvalk commented 6 days ago

:rocket: