Hi Folks,
Advice on an ancient ritual please ...
Suppose I want to set the serial port parameters of /dev/ttyS0,
e.g.
Speed = 4800 baud, 7 data bits, Space parity, 1 stop bit
aka "4800 7S1".
I don't seem to find a Linux utility wich will do this simply.
I've been doing it by starting up minicom, going into its "config"
mode via "^A-Z", doing each of these bitty things separately, and
then quitting. However, this is manifestly overkill! (Not to say
clumsy, time-consuming, and not suited for incorporation in a script).
Of course, once done once, one can save the resulting config to
a minirc.* file and then run 'minicom minirc.whatever', which
does the business but still leaves minicom running so it has to
be killed (since it's stealing data from the serial port), and
there's no option I can see to minicom which tells it to "run
setup and quit".
What I'm really after is a simple utility on the lines of
serialpars -s 4800 -b 7 -p S -s 1 /dev/ttyS0
to set up "4800 7S1", but I can't find such a thing. (setserial
doesn't seem to do this -- while it's in principle possible to
set the baud rate in a roundabout way, I don't see any provision
for data bits, parity, stop bits.)
Any ideas?
Thanks, best wishes, and good morning!
Ted.
--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding(a)nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 14-Sep-05 Time: 10:26:27
------------------------------ XFMail ------------------------------