Setting the baud rate

Jordon Hofer jhofer at bhware.com
Tue May 1 01:13:54 UTC 2007


I am developing a windows utility to analyse data it receives through a 
serial port.  To test it, need to simulate the data it receives.  I made 
a file in FreeBSD 4.11 that is a single packet.  I need to send the data 
in this file out the serial port at 4800 baud.  I would like to do a "cp 
file /dev/cuaa0" or "cat file > /dev/cuaa0" but when I do this, it goes 
out at the wrong baud rate.  When I run "stty -f /dev/cuaa0", I see that 
cuaa0 is set to 9600 baud.  When i run "stty -f /dev/cuaa0 4800", it 
seems to run without error, but the baud rate doesnt change.  How do I 
set the baud rate for the serial port so i can just redirect data to it 
and the data will be sent out at 4800 baud?

jorj


More information about the freebsd-questions mailing list