node-serialport
node-serialport copied to clipboard
SerialPorts Created Inconsistently
SerialPort Version
10.4.0
Node Version
18.4.0
Electron Version
No response
Platform
Microsoft Windows NT 10.0.19044.0 x64
Architecture
x64
Hardware or chipset of serialport
Eltima Virtual Serial Port Driver 8.0
What steps will reproduce the bug?
Execute these statements:
const sp7 = await createSerialPort('COM7', { baudRate: 38400, }, errorCallback); const sp8 = await createSerialPort('COM8', { baudRate: 38400, autoOpen: false, }, errorCallback); setTimeout(() => { sp8.open(); }, 50);
Replace COM7 and COM8 with any existing ports.
What happens?
Both sp7 and sp8 are created. However, property sp8.friendlyName is set, while sp7.friendlyName is not. Similarly for the other properties present on all objects returned from (await SerialPort.list())
.
What should have happened?
All properties, properties present on all objects returned from (await SerialPort.list())
. should be present in both cases.
Additional information
No response
Is the problem that COM7 is returning a friendlyName as part of the list operation, but then not once the port is opened?