Handle stale unix socket file
Delete existing unix socket file if it is tested to be stale, meaning no one is listening on it.
Add visual or audible alert support on connect/disconnect
The feature is detailed via the following option:
--alert none|bell|blink
Set alert action on connect/disconnect.
It will sound the bell once or blink once on successful connect. Likewise it will sound the bell twice or blink twice on disconnect.
Default value is "none" for no alert.
Add experimental RS-485 support
Many modern RS-485 serial devices such as the ones from FTDI already operate in RS-485 mode by default and will work with tio out of the box. However, there are some RS-232/485 devices which need to be switched from e.g. RS-232 to RS-485 mode to operate accordingly on the physical level.
This commit implements the switching mechanism and interface required to enable RS-485 mode. It only works on Linux and with serial devices which use device drivers that support the Linux RS-485 control interface.
The RS-485 feature is detailed via the following options:
--rs-485
- Enable RS-485 mode--rs-485-config <config>
- Set RS-485 configurationSet the RS-485 configuration using the following key or key value pair format in the configuration field:
RTS_ON_SEND=value
- Set logical level (0 or 1) for RTS pin when sendingRTS_AFTER_SEND=value
- Set logical level (0 or 1) for RTS pin after sendingRTS_DELAY_BEFORE_SEND=value
- Set RTS delay (ms) before sendingRTS_DELAY_AFTER_SEND=value
- Set RTS delay (ms) after sendingRX_DURING_TX
- Receive data even while sending dataIf defining more than one key or key value pair, they must be comma separated.
Example use:
$ tio /dev/ttyUSB0 --rs-485 --rs-r485-config=RTS_DELAY_AFTER_SEND=50,RX_DURING_TX
Add line response feature
Add a simple line response feature to make it possible to send e.g. a command string to your serial device and easily receive and parse a line response.
This is a convenience feature for simple request/response interaction based on lines. For more advanced interaction the socket feature should be used instead.
The line response feature is detailed via the following options:
-r, --response-wait
Wait for line response then quit. A line is considered any string ending with either CR
or NL
character. If no line is received tio will quit after response timeout.
Any tio text is automatically muted when piping a string to tio while in response mode to make it easy to parse the response.
--response-timeout <ms>
Set timeout [ms] of line response (default: 100).
Example:
Sending a string (SCPI command) to a test instrument (Korad PSU) and print line response:
$ echo "*IDN?" | tio /dev/ttyACM0 --response-wait
KORAD KD3305P V4.2 SN:32477045
Fix potential sscanf()
overflow
Only print version on --version
Remove duplicate show config entry of DTR pulse duration
Remove MacPorts instructions
Remove instructions for MacPorts because the port has no maintainer and the port build definition is broken (missing dependency on libinih etc.).
It is recommended to use brew instead.
Ignore SIGPIPE
signals
If the remote end of a socket is closed between when an input character is received from the serial port and when it is written to the socket, tio will receive a SIGPIPE
signal when writing the character to the socket, which will terminate the program. To prevent this, ignore the signal, which will cause write(2)
to return -EPIPE
, causing tio to close the socket.
Updates may require up to 24 hours to propagate to mirrors. If the following command doesn't work, please retry later:
sudo dnf upgrade --refresh --advisory=FEDORA-2022-672a4f56c1
Please login to add feedback.
This update has been submitted for testing by robert.
This update's test gating status has been changed to 'ignored'.
This update has been pushed to testing.
This update has been submitted for stable by bodhi.
This update has been pushed to stable.