I need to control a non-RS232 compliant device via the serial port on a Ubuntu box. If I can overcome the command latency of bash scripts, I prefer that scripting solution. I'm not adept at other scripting tools or C programming. I am willing to control the flow control pins for this task, so I have identified the stty -F /dev/ttyS0 hup (and -hup) commands to control DTR. However, I need to change pin state in less than 500 microseconds. There appears to be about 16 milliseconds latency (with large variations) in executing the stty in command files. Is there a faster, less time-variable way to control these pins from a bash script?
Bookmarks