UNPKG

nixfilter-serialport

Version:

Filters for reading from and writing to serial ports

41 lines (28 loc) 2.04 kB
# nixfilter-serialport A [filter](https://en.wikipedia.org/wiki/Filter_(software)#Unix) *(non-interactive command-line tools reading from STDIN and writing to STDOUT)* for reading from and writing to serial ports. ## Installation $ npm install -g nixfilter-serialport Requires [Node.js](https://nodejs.org/). ## Command-line tools ### `nixfilter-serialport` `nixfilter-serialport` writes all data read from STDIN to the specified serial port, and writes all data read from the serial port to STDOUT. $ nixfilter-serialport -h usage: nixfilter-serialport [-h] [--baud_rate {75,150,300,600,1200,2400,4800,9600,19200,38400,57600,76800,115200,230400,460800,921600}] [--data_bits {7,8}] [--parity {none,even,mark,odd,space}] [--stop_bits {1,2}] port Read from/write to a serial port Positional arguments: port The serial port to use. On Linux systems, this is usually something like "/dev/ttyUSB0". Optional arguments: -h, --help Show this help message and exit. --baud_rate {75,150,300,600,1200,2400,4800,9600,19200,38400,57600,76800,115200,230400,460800,921600}, --baudrate {75,150,300,600,1200,2400,4800,9600,19200,38400,57600,76800,115200,230400,460800,921600}, --baud {75,150,300,600,1200,2400,4800,9600,19200,38400,57600,76800,115200,230400,460800,921600}, -b {75,150,300,600,1200,2400,4800,9600,19200,38400,57600,76800,115200,230400,460800,921600} The baud rate to use (default: 115200) --data_bits {7,8}, --databits {7,8}, --bits {7,8}, -d {7,8} The number of data bits (default: 8) --parity {none,even,mark,odd,space}, -p {none,even,mark,odd,space} The parity (default: none) --stop_bits {1,2}, --stopbits {1,2}, -s {1,2} The number of stop bits (default: 1)