Re: Why is the serial port so slow in Linux?
- From: The Natural Philosopher <a@xxx>
- Date: Sun, 04 Feb 2007 10:45:38 +0000
Floyd L. Davidson wrote:
Richard <rkm@xxxxxxxxxx> wrote:I am doing a loop-back test with the serial
port, I have connected pins 2 and 3 (the
Testing software design with a loopback is not a valid concept
on any multitasking system.
transmit and receive pins) on the DB9
connector together. I am sending a series
of single bytes and reading them back as
soon as they are available. The program
works, the only problem is that the time
it takes to transmit and receive the
bytes is about 30 times longer than for
a DOS program I wrote that does the same
thing.
Rather *clearly* your software is at fault. The Linux serial
ports run at full speed, and work extremely well.
A long while ago I posted in a Linux
newsgroup asking why the serial port is
so slow in Linux, and I got a reply that
the problem is the FIFO in the UART. The
That is not true, and would almost certainly result in 1) higher
overhead for the system and 2) slower throughput on the serial
port.
Post the code you are using to open, to configure, to write and
to read the serial port. The smallest possible program that
will demonstrate how each functionality is coded, while still
providing a complete program that can be compiled and run would
be the best.
Another thought occurred to me: Since you are using loopback, it may be the delay is in the sending, not the receiving..you must flush the driver after every byte.
.
- References:
- Why is the serial port so slow in Linux?
- From: Richard
- Re: Why is the serial port so slow in Linux?
- From: Floyd L. Davidson
- Why is the serial port so slow in Linux?
- Prev by Date: Re: Linux solution wanted
- Next by Date: Re: Linux solution wanted
- Previous by thread: Re: Why is the serial port so slow in Linux?
- Next by thread: Re: Why is the serial port so slow in Linux?
- Index(es):
Relevant Pages
|