All of lore.kernel.org
 help / color / mirror / Atom feed
* Non-standard baud rate setting 14400 ..Possible?
@ 2003-10-10 14:57 Sampath Kumar
  2003-10-10 17:58 ` Gerald Emig
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Sampath Kumar @ 2003-10-10 14:57 UTC (permalink / raw)
  To: linux-serial

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Non-standard baud rate setting 14400 ..Possible?
  2003-10-10 14:57 Non-standard baud rate setting 14400 ..Possible? Sampath Kumar
@ 2003-10-10 17:58 ` Gerald Emig
  2003-10-10 21:41   ` rich+ml
  2003-10-10 23:08 ` David Lawyer
  2004-02-20 15:17 ` Non-standard baud rate setting 14400 ..Possible? Michael Westermann
  2 siblings, 1 reply; 6+ messages in thread
From: Gerald Emig @ 2003-10-10 17:58 UTC (permalink / raw)
  To: Sampath Kumar; +Cc: linux-serial


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
"Sampath Kumar" <sampath@spartanlabs.com> wrote:

> 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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


-- 

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: gme@emig-software.de

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Non-standard baud rate setting 14400 ..Possible?
  2003-10-10 17:58 ` Gerald Emig
@ 2003-10-10 21:41   ` rich+ml
  0 siblings, 0 replies; 6+ messages in thread
From: rich+ml @ 2003-10-10 21:41 UTC (permalink / raw)
  To: Gerald Emig; +Cc: Sampath Kumar, linux-serial

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.

On Fri, 10 Oct 2003, Gerald Emig wrote:

> Date: Fri, 10 Oct 2003 19:58:49 +0200
> From: Gerald Emig <gme@emig-software.de>
> To: Sampath Kumar <sampath@spartanlabs.com>
> Cc: linux-serial@vger.kernel.org
> 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
> "Sampath Kumar" <sampath@spartanlabs.com> wrote:
> 
> > 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 majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Non-standard baud rate setting 14400 ..Possible?
  2003-10-10 14:57 Non-standard baud rate setting 14400 ..Possible? Sampath Kumar
  2003-10-10 17:58 ` Gerald Emig
@ 2003-10-10 23:08 ` David Lawyer
  2003-10-13 13:02   ` How to check whether the last character in the serial port is flushed/sent Sampath Kumar
  2004-02-20 15:17 ` Non-standard baud rate setting 14400 ..Possible? Michael Westermann
  2 siblings, 1 reply; 6+ messages in thread
From: David Lawyer @ 2003-10-10 23:08 UTC (permalink / raw)
  To: Sampath Kumar; +Cc: linux-serial

On Fri, Oct 10, 2003 at 08:27:59PM +0530, Sampath Kumar wrote:
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* How to check whether the last character in the serial port is flushed/sent.
  2003-10-10 23:08 ` David Lawyer
@ 2003-10-13 13:02   ` Sampath Kumar
  0 siblings, 0 replies; 6+ messages in thread
From: Sampath Kumar @ 2003-10-13 13:02 UTC (permalink / raw)
  To: linux-serial

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Non-standard baud rate setting 14400 ..Possible?
  2003-10-10 14:57 Non-standard baud rate setting 14400 ..Possible? Sampath Kumar
  2003-10-10 17:58 ` Gerald Emig
  2003-10-10 23:08 ` David Lawyer
@ 2004-02-20 15:17 ` Michael Westermann
  2 siblings, 0 replies; 6+ messages in thread
From: Michael Westermann @ 2004-02-20 15:17 UTC (permalink / raw)
  To: linux-serial

Hello a little bit late answer ;-)

On Fri, Oct 10, 2003 at 08:27:59PM +0530, Sampath Kumar wrote:
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-02-20 15:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-10 14:57 Non-standard baud rate setting 14400 ..Possible? Sampath Kumar
2003-10-10 17:58 ` Gerald Emig
2003-10-10 21:41   ` rich+ml
2003-10-10 23:08 ` David Lawyer
2003-10-13 13:02   ` How to check whether the last character in the serial port is flushed/sent Sampath Kumar
2004-02-20 15:17 ` Non-standard baud rate setting 14400 ..Possible? Michael Westermann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.