[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: stty is braind dead or I am
From: |
Pádraig Brady |
Subject: |
Re: stty is braind dead or I am |
Date: |
Mon, 08 May 2006 09:50:59 +0100 |
User-agent: |
Mozilla Thunderbird 1.0.7 (X11/20051013) |
mark manning wrote:
>
>stty -F /dev/tts/12 returns "speed 9600 baud" and some other stuff.
yet when i connect that port to a cable going to a windows box running
hyperterm i get NO data at all at that baud rate. set windows box to
2400 and i get the transmitted data just right. this means that when
stty tells me one thing im actually getting another. or am i missing
something here ?
>
The device may have a custom baud rate implemented in the driver?
Try to set the speed to 2400 and see does it take affect,
if not then the kernel is fixing the baud rate and you can't go by the
rate reported.
Even if it's not fixed it may be using a custom baud_base and/or divisor.
For example I've a device here that the linux serial driver (ftdio_sio)
fixes the baud rate for. Note stty reports 38400:
$ stty < /dev/ttyUSB0
speed 38400 baud;
However one must set 9600 on windows to communicate.
(Notice the same ratio in rates that you require to communicate).
You can query the low level serial parameters with:
$ setserial -a /dev/ttyUSB0
/dev/ttyUSB0, Line 0, UART: unknown, Port: 0x0000, IRQ: 0
Baud_base: 24000000, close_delay: 0, divisor: 240
closing_wait: infinite
Flags: spd_cust low_latency
Notice the Baud_base, divisor, and spd_cust
Pádraig.