webusb / arduino

WebUSB demos running on Arduino (and compatible) hardware.
566 stars 152 forks source link

Add DeviceInterfaceGUIDs registry key for Windows #43

Closed reillyeon closed 6 years ago

reillyeon commented 6 years ago

In order for an application to find a USB device on Windows it must have a device interface GUID. For the root USB device this will be GUID_DEVINTERFACE_USB_DEVICE however for functions of a composite device there is no standard GUID. For devices using WinUSB Microsoft recommends adding a descriptor that tells Windows what GUID to use. This value ends up in the DeviceInterfaceGUIDs registry key when the device is enumerated.

gusarov commented 6 years ago

Looks like this is already implemented in d845253?

gusarov commented 6 years ago

Actually, I still have an issue that sounds exactly like a subject image I would be glad if you'll help me to fix this or point me to the right direction

jpliew commented 6 years ago

@gusarov use regedit and search for 975F44D9-0D08-43FD-8B3E-127CA8AFFF9D first. If nothing then you should retry to download a fresh copy of Arduino and WebUSB to try again. If you find this GUID, you may need to try delete all the references to 975F44D9-0D08-43FD-8B3E-127CA8AFFF9D in the registry first. This appears in a few places, use regedit and search for the above GUID.

Ideally if you can, try on another computer that you have never plug in the board before and test if it is the board problem or windows problem.

Also, what board are you using?

gusarov commented 6 years ago

Pro Micro (clone) Thanks, I just noticed that Arduino forgot my CPU setting and reset id back to 3.3v, while mine is 5v :\ Now the next problem - I still can see the COM device when connecting ProMicro with console sketch.., As far as I understand, there should be no more COM port. PS: I'm flushing via SPI, via second Arduino ISP to avoid messing with USB. And yes, there is no such GUID in registry

jpliew commented 6 years ago

@gusarov you should see two devices appear on DEVICE MANAGER. See image below

image

gusarov commented 6 years ago

Thanks, looks like I've messed files too much, so I've started from the scratch. Redownloaded Arduino IDE zip, removed %AppDataLocal%\Arduino15 Just configured package_sparkfun_index.json, downloaded "Spark Fun AVR Boards" via boards manager. Then I've added "-DUSB_VERSION=0x210" to promicro.build.extra_flags Uploaded via Arduion as ISP... And now I have similar picture, but except it is SparkFun Pro Micro instead of WebUSB image And chrome is not suggesting me the devices, the list on a web page is empty. image

gusarov commented 6 years ago

Similar with Leonardo bootloader: (My debug led is on 7, so it fits for both) image This is what I'm uploading: sketch_mar31a.zip so, I just copied over webusb files to the sketch

gusarov commented 6 years ago

Finally, I got it... hardware\boards.txt have different vid/pid for the microwebusb, and looks like this is doing the trick... Now I have it in chrome, but Access Denied (looks like I've seen someone had such problem already) UPD: Strange, it is not working on my machine but works on clean VM via VMware

jpliew commented 6 years ago

@gusarov for access denied, check this out #44

reillyeon commented 6 years ago

@gusarov Thanks for pointing out that the patch to add the registry key descriptor had been landed. Closing this issue.