2
votes

Is it possible to manually control the handshaking/flow control lines of a serial port from a bash script? I'm referring to RTS, CTS, DTR and DSR. I don't want to enable automatic flow control, but manually manipulate these signals. In my application, those lines control LEDs. I've seen C code to do this using IOCtl(), but am wondering if it is possible via bash?

1

1 Answers

0
votes

There were no responses here and I couldn't find anything else on the web. So I decided to write my own C program I could call from bash. It was actually quite simple to control the handshaking lines via C - just an open() and a couple of ioctl() calls. See https://www.cmrr.umn.edu/~strupp/serial.html#5_1 if you are interested in the details.