Re: Why is the serial port so slow in Linux?



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.

.



Relevant Pages

  • Re: Why is the serial port so slow in Linux?
    ... port, I have connected pins 2 and 3 (the ... Testing software design with a loopback is not a valid concept ... on any multitasking system. ... to read the serial port. ...
    (comp.os.linux.misc)
  • Re: roZetta Status
    ... roZetta firmware is written in ZBasic and uses the ZX-40 from Elba, ... There is one main highspeed RS232 level serial port which interfaces ... with the TW523 as the ZX-40's interrupts are sluggish about 3% of the time. ...
    (comp.home.automation)
  • Re: How to Disable Ethernet
    ... you can use the serial port as an alternative method of getting debug. ... can disable KITL debugging and just read all of the messages that come out. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: how to access the serial port exported functions in my applica
    ... you cannot access a serial port by loading the serial ... driver DLL into your application via LoadLibrary. ... I am trying to load com16550.dll using ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Nokia LD-3W Bluetooth GPS/Samsung NC-10 netbook
    ... The little netbook is fully Bluetooth enabled. ... Tonight I got curious as to how the Nokia LD-3W bluetooth GPS would ... It created COM9 and used Bluetooth Serial Port protocol, ...
    (rec.boats.cruising)