>>>>> "Peter" == Peter Rundle <[EMAIL PROTECTED]> writes:

Peter> I have a serial device that works at 2400 baud and I need to
Peter> access it from a script. How can I set the baud rate of my
Peter> serial port before accessing the device?

Peter> I've tried setserial but I get this result

Peter> #> setserial /dev/ttyS0 baud_base 2400 Cannot set serial info:
Peter> Invalid argument

stty 2400 < /dev/ttyS0

On some unices, the baud rate will be reset to a system default when
it closes, so hold it open:

sleep 100 < /dev/ttyS0 &
stty 2400 < /dev/ttyS0


-- 
Dr Peter Chubb  http://www.gelato.unsw.edu.au  peterc AT gelato.unsw.edu.au
http://www.ertos.nicta.com.au           ERTOS within National ICT Australia
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to