lancaster-university / codal-circuit-playground

MIT License
4 stars 6 forks source link

Change USB VID:PID for Circuit Playground Express #4

Open dhalbert opened 6 years ago

dhalbert commented 6 years ago

Currently a MakeCode program running on a CPX advertises as a USB composite device with HID and WebUSB support. The USB VID:PID used is 0x03EB:0x2402, which is the Atmel VID and a sample PID. (See https://github.com/lancaster-university/codal-circuit-playground/blob/003dea96788312104411510aa83e114ef9e47331/target-locked.json#L31 and https://github.com/lancaster-university/codal-circuit-playground/blob/003dea96788312104411510aa83e114ef9e47331/target.json#L13.)

We're documenting support of WebUSB for CPX, and we also need to support it on Windows 7. Unlike Windows 10, Windows 7 needs user-installed drivers, and we need to put the VID:PID in the .inf driver file.

We'd like to change the VID:PID to an Adafruit number. Our VID is 0x239A. We have several defined PID's already for the CPX: 0x0018 is for the UF2 bootloader, 0x8018 is a CDC PID for use with Arduino, and 0x8019 is used by CircuitPython. We could reuse the UF2 or Arduino one for MakeCode, or we'd be happy to assign a new one. Do you have a preference or a long-term plan for uses these ID's?

We can submit a PR once we decide on the PID. Thanks!

Tagging @ladyada who's involved in this as well.

pelikhan commented 6 years ago

In order to support this, we will have to issue an update to the Windows app as the VID/PID pair is in the app manifest. @mmoskal @abchatra

ladyada commented 6 years ago

OK, i'd prefer to give y'all a unique PID so you can tell for sure when a makecode-programmed board is attached - if you have a specific one you want, anything > 0x0022 and doesn't start with 0x8nnn is available

mmoskal commented 6 years ago

The Windows app already has the UF2 VID/PID, so that should work. The only question is if Windows won't get confused about different set of interfaces in bootloader and user mode. It may be enough to just have a different serial number on bootloader and user mode.