You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- [osx] remove the 0x from productID and locationId and vendorId
- [linux] remove the starting 0x from any values, small refactor
- [linux] Fixup output using the hex encoded fields
- [windows] Grab the serial number from the pnp id
- Isolates list to it's own platform files (c++)
- Better ensure our serialports fields are present
Retrieves a list of available serial ports with metadata. Only the `comName` is guaranteed. If unavailable the other fields will be undefined. The `comName` is either the path or an identifier (eg `COM1`) used to open the SerialPort.
790
790
791
+
We make an effort to identify the hardware attached and have consistent results between systems. Linux and OS X are mostly consistent. Windows relies on 3rd party device drivers for the information and is unable to guarantee the information. On windows If you have a USB connected device can we provide a serial number otherwise it will be `undefined`. The `pnpId` and `locationId` are not the same or present on all systems. The examples below were run with the same Arduino Uno.
792
+
791
793
**Kind**: static method of [<code>SerialPort</code>](#exp_module_serialport--SerialPort)
792
794
**Returns**: <code>Promise</code> - Resolves with the list of available serial ports.
793
795
@@ -797,17 +799,38 @@ Retrieves a list of available serial ports with metadata. Only the `comName` is
Copy file name to clipboardExpand all lines: UPGRADE_GUIDE.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,12 @@
1
1
Upgrading from 4.x to 5.x
2
2
-------------
3
-
5.x is a major rewrite to make node serialport a NodeJS stream. While the api surface is similar there have been a number of changes to ensure more consistent error handling and operation of a serial port.
3
+
5.x is a major rewrite to make node serialport a NodeJS stream. While the api surface is similar there have been a number of changes to ensure more consistent error handling and operation of a serial port.
4
4
5
5
- Removed the `disconnect` event. The `close` event now fires with a disconnect error object in the event of a disconnection.
6
6
-`drain` now waits for the current javascript write to complete before calling the system level drain.
7
7
-`port.isOpen` is now a property not a function
8
+
-`SerialPort.list` has slightly different output with more information, decoded strings and `0x` prefixes removed from some properties.
9
+
-`SerialPort.list` now returns a promise if no call back is provided
Copy file name to clipboardExpand all lines: changelog.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,8 @@
1
+
Version 5.0.0-beta9
2
+
-------------
3
+
-[all]`Serialport.list` now has more consistent output across all platforms.
4
+
-[linux]`Serialport.list` is now faster and less resource intensive thanks to @akaJes for contributing this!
5
+
1
6
Version 5.0.0-beta8
2
7
-------------
3
8
If we're lucky this will be the last of the betas. The remaining potentially blocking issues have to do with improving `SerialPort.list` which would change their output. The two issues are #1220 and #1084. I need help on those two issues, if I'm not able to close them soon, I'll release anyway, and they'll be fixed for 6x. This release is large enough. -@reconbot
0 commit comments