DAPLink icon indicating copy to clipboard operation
DAPLink copied to clipboard

DAPLink WebUSB identified as LPC1768 on first connection

Open microbit-carlos opened this issue 5 years ago • 6 comments

Opening this issue to separate the side-discussion in https://github.com/ARMmbed/DAPLink/issues/479.

When a micro:bit with DAPLink with WebUSB is plugged for the first time, chrome will list the name of the WebUSB device as LPC1768 :

And once it's paired it will be listed in Chrome as a USB device without a name:

To replicate follow the steps below, assuming you are on a Windows 10 computer that has successfully used a WebUSB enabled micro:bit already:

  • Disconnect any DAPlink/Mbed device from the computer
  • Go to https://makecode.microbit.org/beta?webusb=1#editor
  • Revoke access to all previously connected devices to this website
    • At the left of the URL click on "secure"
    • Click on the cross for each entry on the list:
  • Plug in a micro:bit
  • Go to the Device Manager and remove all DAPLink drivers
    • On the Ports (COM & LPT) list find the USB Serial Device (COMXX) entry, right click and Uninstall device
    • On the Universial Serial Bus Controllers, find the USB Mass Storage Device entry with VID 0x0d28 and PID 0x0204, right click and Uninstall device
    • On the Universial Serial Bus Controllers, find the USB Composite Device entry with VID 0x0d28 and PID 0x0204, right click and Uninstall device
  • Unplug the micro:bit
  • Close and reopen chrome to go again to https://makecode.microbit.org/beta?webusb=1#editor
  • In MakeCode, click on the cog at the top right corned and Pair device:
  • You should see the connection window with the wrong name:

After you've paired once, the next time the right device name appears:

But the next time you pair, the list of USB devices increases by adding another USB device instead replacing the previous entry:

microbit-carlos avatar Aug 28 '18 12:08 microbit-carlos

As best we can tell, this issue is caused by the DAPLink USB VID/PID being assigned the name "LPC1768" in a table of VID/PIDs that comes with Linux, and this table seems to have been reused for Chrome.

See the current usb.ids file and live USB IDs database for the table. The current version has the name "ARM mbed" assigned to VID=0x0d28 ("NXP", should be "Arm"!!) PID=0x0204. An older version or a variant probably used "LPC1768".

My guess is that prior to pairing, Chrome simply looks up the VID/PID in this table and reports whatever name if finds. Not much we can do about that.

flit avatar Sep 19 '18 21:09 flit

Can anyone reproduce this on a system that has never seen the mbed serial driver? I just tried Carlos's steps on my Win10 machine and still saw the correct name

jaustin avatar Oct 01 '18 18:10 jaustin

Just tried this in a brand new Windows VM and it did show the micro:bit name directly on first connect: image So you are onto something there.

microbit-carlos avatar Oct 01 '18 18:10 microbit-carlos

Okay, so even more weirdly, right after my previous message I closed Chrome and reopen it, and the second time it showed me the LPC1768 name: image

Oddly, this is what I see in the device manager, an "mbed Serial Port" not installed correctly. I thought the "mbed" name only appeared on the drivers if the installer was used? Perhaps the problem is that this is a Win8.1 vm? image

microbit-carlos avatar Oct 01 '18 18:10 microbit-carlos

@microbit-carlos: does that issue still exist?

mathias-arm avatar Jun 08 '21 04:06 mathias-arm

Could not replicate anymore in a new Windows VM. To be fair, even if it was still a problem, I'm not sure DAPLink could do much about it if it's a look up done by Chrome in some kind of USB VID/PID database.

microbit-carlos avatar Jun 08 '21 15:06 microbit-carlos