Discussion:
Non-standard baud rate setting 14400 ..Possible?
Sampath Kumar
2003-10-10 14:57:59 UTC
Permalink
Hello ,

Is there a way to set the serial port on the i386 Linux 2.4.17 at non
standard baud rates like 14400,28800,etc.?

Regards
Sampath


-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Gerald Emig
2003-10-10 17:58:49 UTC
Permalink
There is no such way;
main reason is that the serial hardware does not support these data
speeds (even under Win***).

But as I see from the rates that you mention, it seems that you talk vi=
a
a modem. Note that modem speed and speed of the serial port are two
different things. Modem speeds are normally handled by the modem
(automatically or by AT-commands), not by the linux serial driver.

I hope this helps, but feel free to ask more questions.



On Fri, 10 Oct 2003 20:27:59 +0530
Post by Sampath Kumar
Hello ,
=20
Is there a way to set the serial port on the i386 Linux 2.4.17 at non
standard baud rates like 14400,28800,etc.?
=20
Regards
Sampath
=20
=20
-
To unsubscribe from this list: send the line "unsubscribe
More majordomo info at http://vger.kernel.org/majordomo-info.html
--=20

Gerald Emig

--
EMIG Software Tel. 06858-6197, Mobil: 0163-4751706
Engelstr. 17 Fax. 0721-151-348672
66564 Ottweiler-F=FCrth http://www.emig-software.de
Germany e-mail: ***@emig-software.de

-
To unsubscribe from this list: send the line "unsubscribe linux-serial"=
in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
rich+
2003-10-10 21:41:54 UTC
Permalink
Why not? Uart baud rate is 115200/divisor, use 4 for 28800, 5 for 14400.
But you are right it is better to set uart to highest possible baud and
let modem convert, esp. if V.42bis compression is used.
Date: Fri, 10 Oct 2003 19:58:49 +0200
Subject: Re: Non-standard baud rate setting 14400 ..Possible?
There is no such way;
main reason is that the serial hardware does not support these data
speeds (even under Win***).
But as I see from the rates that you mention, it seems that you talk via
a modem. Note that modem speed and speed of the serial port are two
different things. Modem speeds are normally handled by the modem
(automatically or by AT-commands), not by the linux serial driver.
I hope this helps, but feel free to ask more questions.
On Fri, 10 Oct 2003 20:27:59 +0530
Post by Sampath Kumar
Hello ,
Is there a way to set the serial port on the i386 Linux 2.4.17 at non
standard baud rates like 14400,28800,etc.?
Regards
Sampath
-
To unsubscribe from this list: send the line "unsubscribe
More majordomo info at http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
David Lawyer
2003-10-10 23:08:39 UTC
Permalink
Post by Sampath Kumar
Hello ,
Is there a way to set the serial port on the i386 Linux 2.4.17 at non
standard baud rates like 14400,28800,etc.?
Since the baud-base of 115,200 is divisible by these numbers you can do
it. Use a divisor of 8 to get 14400.

But the speed of transmission over a serial line can be any rate at all,
provided it's under the serial port speed selected. For example, if
it's been set for 115,200 I can (sort of) send bits at 96,049.37
bits/sec. Each byte is sent at 115,200 bits/sec but there is a rest
period after each byte to result in 96,049.37 bits/sec average. One may
calculate that for this example that there will be a 1.817 micro-sec
pause after the transmission of each byte during which time the line is
held at mark (-12 v) beyond the end of the stop bit (which also happens
to be mark). This is like inserting extra long stop bits so as to
adjust for the correct speed.

David Lawyer
-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Sampath Kumar
2003-10-13 13:02:22 UTC
Permalink
Hello all
How to check whether the last character sent to the serial port has been
sent . And the port has nothing in its buffer to send?
Regards
sampath


-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Michael Westermann
2004-02-20 15:17:56 UTC
Permalink
Hello a little bit late answer ;-)
Post by Sampath Kumar
Hello ,
Is there a way to set the serial port on the i386 Linux 2.4.17 at non
standard baud rates like 14400,28800,etc.?
I it is a way.

cflags -> B38400; /* set the baud to 38400 */

static int pos_set_28800(int fd) {
struct serial_struct serinfo;
int ret;
if ((ret = ioctl(fd, TIOCGSERIAL, &serinfo)) < 0) {
fprintf(stderr,"Cannot get serial info\n");
} else {
serinfo.custom_divisor = 4;
/* Baudbase 115200/4 = 28800
115200/8 = 14400 */

serinfo.flags &= ~ASYNC_SPD_MASK;
serinfo.flags |= ASYNC_SPD_CUST;
if ((ret = ioctl(fd, TIOCSSERIAL, &serinfo)) < 0) {
fprintf(stderr, "Cannot set serial info\n");
}
}
return 0;
}

or set it with setserial.

It's running with kernel 2.4.xx

Michael Westermann
-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Loading...