Discussion:
setting non-standard baud rate on serial port
Steven A. DuChene
2011-04-26 20:27:44 UTC
Permalink
I have an automotive diagnostic device that seems to only want to communicate
across the serial port at a baud rate of 8192 which is a non-standard baud rate.
When I try to use setserial or stty to set this baud rate on the port both
programs tell me "Invalid Argument"

stty -F /dev/ttyS0 8192
stty: invalid argument `8192'
Try `stty --help' for more information.

Anyone have any idea how to set baud rate on a serial port to a non-standard baud rate like this?
--
Steven DuChene
Matt Graham
2011-04-26 21:25:51 UTC
Permalink
From: "Steven A. DuChene" <linux-clusters at mindspring.com>
Post by Steven A. DuChene
I have an automotive diagnostic device that seems to only want to
communicate across the serial port at a baud rate of 8192
stty -F /dev/ttyS0 8192
stty: invalid argument `8192'
Anyone have any idea how to set baud rate on a serial port to a
non-standard baud rate like this?
http://stackoverflow.com/questions/4968529/how-to-set-baud-rate-to-307200-on-linux

...might help. stty by itself won't do it. Custom ioctl() appears to be
required. I think you can make it work with some extra fiddling.
--
Matt G / Dances With Crows
The Crow202 Blog: http://crow202.org/wordpress/
There is no Darkness in Eternity/But only Light too dim for us to see
Continue reading on narkive:
Loading...