stty doesn't work ??

vietchau

Registered
Hi,
I have a Mac Book OS X and a usb to rs232 adapter. I have downloaded the FTDI driver and everything seems to work except I can't the baud rate of the line to any speed except the default 9600.
I did this command on bash shell :
stty -f /dev/tty.usbserial speed 115200
--> it prints out the number : 9600

a subsequence stty -f shows the baud rate is still 9600 ??.


I can set up the serial line using minicom but after quitting minicom (Ctr-A Q without resetting) , the baud rate switches back to 9600 ??. Can anyone give me some advices on how to solve this problem ?
 
Bumping this old post that never received a response. I'm encountering essentially the same problem, and despite scouring the various Mac OS X support forums out there, have yet to find an answer/solution/workaround.


I have a USB-to-serial converter cable that has the Prolific chepset, and that uses the osx-pl2303.kext driver. I know that the cable and driver work, because I'm able to connect to an external device (a TNC = packet radio modem) connected via this cable, using the screen program (a VT100 terminal emulator). Using screen, I can type at the modem's command prompt, and it sends me back reasonable answers.

On the other hand, I'm having no luck using the stty command to change the baud rate of the USB-serial device (/dev/cu.PL2303-0000201A), which I need to do so that I can run a different program that wants to communicate with/control the TNC. The screen program is able to set the baud rate of the device to a value provided on the command line, so I know that the baud rate is changeable. But stty consistently fails, without complaint, to change the baud rate:

hephaestus$ su
Password:
sh-3.2# stty -f /dev/cu.PL2303-0000201A
speed 9600 baud;
lflags: -icanon -isig -iexten -echo
iflags: -icrnl -ixon -ixany -imaxbel -brkint
oflags: -opost -onlcr -oxtabs
cflags: cs8 -parenb
sh-3.2# stty -f /dev/cu.PL2303-0000201A 19200
sh-3.2# stty -f /dev/cu.PL2303-0000201A
speed 9600 baud;
lflags: -icanon -isig -iexten -echo
iflags: -icrnl -ixon -ixany -imaxbel -brkint
oflags: -opost -onlcr -oxtabs
cflags: cs8 -parenb

Am I invoking stty incorrectly, or is there just a bug in it? (Or is some third thing happening that I'm not considering?)

I am running 10.5.8 on a MacBook Pro with 2.4 GHz Intel Core 2 Duo.

Thanks,

Michael
 
Back
Top