Re: Not able to change baud rate



On 03/26/10 13:43, Joe Pfeiffer wrote:
Joe Beanfish<joe@xxxxxxxxxx> writes:

On 03/25/10 00:52, Hari Prasath wrote:
Hi all,

I have a video streaming device running Linux. when i change the baud
rate using the 'stty' command,it changes temporarily for few seconds.
Then again it changes to 115200 automatically.

Please find below the /etc/inittab file& the /etc/init.d/rcS file for
reference.

Not sure how those files matter since there's no reference to stty.

A serial port will revert to default settings when closed. So your
settings will only last as long as stty has the port open to set them
unless something else also has the port open. In general programs
should not assume anything about the port settings and should set
everything explicitly.

I've seen this claim from two different responders now; where is
itdocumented? I ask because, as a test, I used stty (inside a script)
to set a serial terminal speed, and it has remained at the new speed for
hours after the termination of the script.

I don't know where it's documented (reset serial params on close). I just
remember it being true for the last 20 years on *nix.

Perhaps something has that port open? Use "fuser" or "lsof" on the device
to see what processes may have it open.
.