stty
Denis Vlasenko
vda.linux at googlemail.com
Sat Mar 10 12:28:06 PST 2007
On Saturday 10 March 2007 20:52, Hamish Guthrie wrote:
> Hi,
>
> I'm attempting to change the baud rate of a serial port using stty and
> am having problems.
>
> I have busybox 1.4.1 an have attempted using the old and new calling
> conventions to change the baud rate - the commands I have attempted are:
>
> stty 57600 < /dev/ttyS4
>
> or:
>
> stty -F /dev/ttyS4 speed 57600
>
> Both of these commands result in the error message:
>
> stty: 57600 requires an argument
>
> Nay assistance would be greatly appreciated.
Cannot reproduce it here.
strace -o str.log ./busybox stty -F /dev/ttyS0 speed 57600
str.log:
....
getuid32() = 0
getgid32() = 0
setgid32(0) = 0
setuid32(0) = 0
open("/dev/ttyS0", O_RDONLY|O_NONBLOCK|O_LARGEFILE) = 4
dup2(4, 0) = 0
close(4) = 0
fcntl64(0, F_GETFL) = 0x8800 (flags O_RDONLY|O_NONBLOCK|O_LARGEFILE)
fcntl64(0, F_SETFL, O_RDONLY|O_LARGEFILE) = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B57600 opost isig icanon echo ...}) = 0
fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 1), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf7f0a000
write(1, "57600\n", 6) = 6
ioctl(0, SNDCTL_TMR_STOP or TCSETSW, {B57600 opost isig icanon echo ...}) = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B57600 opost isig icanon echo ...}) = 0
exit_group(0) = ?
Can you do the strace and send me the result?
Can you try latest svn?
You can download just latest stty.c and drop it into 1.4.1, I think.
From here:
http://busybox.net/cgi-bin/viewcvs.cgi/trunk/busybox/coreutils/stty.c?rev=17757&view=log
--
vda
More information about the busybox
mailing list