Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAPLink WebUSB identified as LPC1768 on first connection #486

Open
microbit-carlos opened this issue Aug 28, 2018 · 6 comments
Open

DAPLink WebUSB identified as LPC1768 on first connection #486

microbit-carlos opened this issue Aug 28, 2018 · 6 comments

Comments

@microbit-carlos
Copy link
Contributor

microbit-carlos commented Aug 28, 2018

Opening this issue to separate the side-discussion in #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:

@flit
Copy link
Collaborator

flit commented Sep 19, 2018

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.

@jaustin
Copy link
Contributor

jaustin commented Oct 1, 2018

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

@microbit-carlos
Copy link
Contributor Author

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
Copy link
Contributor Author

microbit-carlos commented Oct 1, 2018

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

@mathias-arm
Copy link
Collaborator

@microbit-carlos: does that issue still exist?

@microbit-carlos
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants