node-serialport-bindings-cpp/packages/list
2020-08-07 21:11:09 -04:00
..
lib fix: enabling disabled tests rename all pkgs to lib (#1941) 2019-09-24 22:03:13 -04:00
.npmignore fix: npmignore should ignore .DS_Store files (#1954) 2019-10-03 20:37:13 -04:00
CHANGELOG.md v9.0.0 2020-05-10 01:21:17 -04:00
LICENSE feat: move cli tools to their own packages (#1664) 2018-09-15 04:58:28 -04:00
package-lock.json chore: update package-lock.jsons even though we don’t really use them (#2123) 2020-08-07 21:11:09 -04:00
package.json v9.0.0 2020-05-10 01:21:17 -04:00
README.md chore: rename comName to path (#1859) 2019-05-03 23:20:59 -04:00

SerialPort List

$ npx @serialport/list [options]
# or
$ npm install -g @serialport/list
$ serialport-list [options]

The package @serialport/list will install the serialport-list cli tool which lists all available serial ports in different formats.

$ serialport-list -h

  Usage: serialport-list [options]

  List available serial ports

  Options:

    -h, --help           output usage information
    -V, --version        output the version number
    -f, --format <type>  Format the output as text, json, or jsonline. default: text


$ serialport-list
/dev/tty.Bluetooth-Incoming-Port
/dev/tty.usbmodem1421    Arduino (www.arduino.cc)

$ serialport-list -f json
[{"path":"/dev/tty.Bluetooth-Incoming-Port"},{"path":"/dev/tty.usbmodem1421","manufacturer":"Arduino (www.arduino.cc)","serialNumber":"752303138333518011C1","locationId":"14200000","vendorId":"2341","productId":"0043"}]

$ serialport-list -f jsonline
{"path":"/dev/tty.Bluetooth-Incoming-Port"}
{"path":"/dev/tty.usbmodem1421","manufacturer":"Arduino (www.arduino.cc)","serialNumber":"752303138333518011C1","locationId":"14200000","vendorId":"2341","productId":"0043"}