Non-standard baud rate setting 14400 ..Possible?
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
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.
Quoted 13 lines · On Fri, 10 Oct 2003 20:27:59 +0530 "Sampath Kumar" <[email protected]>…
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 12 lines
Gerald Emig -- EMIG Software Tel. 06858-6197, Mobil: 0163-4751706 Engelstr. 17 Fax. 0721-151-348672 66564 Ottweiler-Fürth http://www.emig-software.de Germany e-mail: [email protected] - To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
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.
Quoted 39 lines · Gerald Emig
Date: Fri, 10 Oct 2003 19:58:49 +0200
From: Gerald Emig <[email protected]>
To: Sampath Kumar <[email protected]>
Cc: [email protected]
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.
Quoted 13 lines · On Fri, 10 Oct 2003 20:27:59 +0530 "Sampath Kumar" <[email protected]>…
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · 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
How to check whether the last character in the serial port is flushed/sent.
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
Hello a little bit late answer ;-)
Quoted 4 lines · 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