im-tomu / toboot

Bootloader for the EFM32HG Tomu Board
https://tomu.im/
GNU General Public License v3.0
72 stars 28 forks source link

toboot: fix WebUSB landing page descriptor request handler #35

Closed devanlai closed 6 years ago

devanlai commented 6 years ago

Implement the WebUSB landing page descriptor as a vendor request per the spec instead of via the standard GET_DESCRIPTOR request.

I finally got my tomu, so I was able to test this. This fixes issue #16. The target landing page, https://dfu.tomu.im is currently a 404, though.

xobs commented 6 years ago

I've cloned your webusb dfu page and put it up. Can you please see if that works?

Also, is there anything you would like me to do to distinguish your work on webusb?

devanlai commented 6 years ago

The page works in the sense that it writes the firmware successfully, but it does need a bit more polish:

I'll try to sort out the first issue tonight. The second issue probably requires a bit more time than I have available this weekend.

xobs commented 6 years ago

The GET_STATUS may be an issue in the dfu sequence -- that was a part of the spec that I didn't really understand...

devanlai commented 6 years ago

I believe that the bmBitManifestationTolerant bit is supposed to control whether it transitions to MANIFEST_SYNC vs MANIFEST_WAIT_RESET, but in practice I probably shouldn't rely too much on those since they're phrased kind of ambiguously.

I've updated WebDFU to not complain about devices that enter MANIFEST_WAIT_RESET despite setting that bit.