netsctl - Serial port over Telnet control tool
netsctl <host> <port> [<option> <value> ...]
netsctl sets or queries serial port settings of RFC 2217 enabled Telnet service.
- <host>
-
Hostname or address of a Telnet service.
- <port>
-
Service name or port number.
- <option> <value>|?
-
Get or set a particular option. A value of ? requests and print the current setting, other arguments set the option to a specified value. When no options are specified all options are queried and printed.
The options are printed in the <option> <value> form, allowing their reuse as arguments to netsctl.
The valid options are:
- baudrate <rate>
-
Baud Rate
- datasize <bits>
-
Data Bit Size
- parity NONE|ODD|EVEN|MARK
-
Parity
- stopsize bits
-
Stop Bit size
- flow none|xonxoff|rtscts
-
Com Port Flow Control Setting (outbound/both)
- break on|off
-
BREAK State
- dtr on|off
-
DTR Signal State
- rts on|off
-
RTS Signal State
- flow_in none|xonxoff|rtscts| dtr|dcd|dsr
-
Com Port Flow Control Setting (inbound)
- netsctl example.com telnet
-
Query all settings from a Telnet service running at example.net.
- netsctl example.com telnet baudrate '?' flow '?'
-
Query baud rate and flow control settings from a Telnet service running at example.net.
- netsctl example.com 23 baudrate 9600 datasize 8 parity NONE
-
Set baud rate, data size, and parity on Telnet service running on port 23 of example.net.
- netsctl example.com telnet |xargs netsctl example.com 2323
-
Copy all settings from Telnet service running at example.net to Telnet service running on port 23 of example.net.
Some servers reset the options when the client disconnects and this client always disconnects after setting the configuration. Thus, in effect, the settings will be lost.
Lubomir Rintel <lkundrak@v3.sk>
netsctl can be redistributed under the terms of GNU General Public License (any version at your option).
The source code repository can be obtained from https://github.com/lkundrak/nets. Bug fixes and feature ehancements licensed under same conditions as netsctl are welcome via GIT pull requests.