Closed hrueger closed 3 years ago
@hrueger Which one is correct?
I'm not sure why they differ.
@MadLittleMods Thanks for the quick reply!
I'm not sure. If I do a google search for VID 0483
and PID 5740
, I find the correct device: https://devicehunt.com/view/type/usb/vendor/0483/device/5740
However, searching for VID 1155
and PID 22336
, I find this: https://community.st.com/s/feed/0D50X00009XkYSESA3
On the bottom of that page, there's also something about VirtualCOMPort
...
I think that https://www.npmjs.com/package/usb returns the same VID and PID as node-usb-detection
, however, I don't get a serialnumber there.
Maybe your VID and PID are from the device itself and serialport's are from the serial port and not from the device itself? I don't know.
Here are the docs for SerialPort.list()
for reference: https://serialport.io/docs/api-stream/#serialportlist
If we are matching what the usb
package returns, that seems like we're probably doing the right thing. Still would be good to understand the difference here.
@hrueger When you are using node-usb-detection
, do you see multiple devices? Is there one listed with VID 0483
and PID 5740
as well?
You're theory could be on the right track.
@hrueger It looks like serialport
has their vendorId
and productId
in hexadecimal. Converting them to decimal, they match node-usb-detection
0x0483
=1155
0x5740
= 22336
I was tipped off by the hex hint by https://github.com/serialport/node-serialport/issues/1652 and was confused how a number could be upper or lowercase.
Then I saw someone's example output that had 04d8
and f793
in https://github.com/serialport/node-serialport/issues/1278
Ah, that makes sense 👍 So I can close this issue?
@hrueger :+1: Yep closed! Thanks for the quick follow-up here 😸
node-usb-detection
reports this:and
serialport
slist()
method reports this:The serialnumber is the same, although it is uppercase in serialport.