Blocking read() from a USB->Serial adapter.




A blocking read() of more than one character from an actual RS232 serial
port returns when the number of characters specified has been read.

However I've found that a blocking read() of more than one character from
a USB->Serial adapter reads only the first character before returning and
I have to loop to read all the characters.

I've tried this with several different USB->Serial adapters with several
different Linux kernel versions, 2.4 and 2.6, all with the same result.

Is this a Linux bug, or is there something extra I need to do in setting
up the port in my code?

Thanks for your help.

Regards,
Charles Sullivan



.



Relevant Pages

  • Re: Wanted: Solution to virtual tty capture problem.
    ... > Under SCO OpenServer 5.0.5, an application that can listen to, and read ... > read from the port. ... > believe paying for a manual (or set of manuals) is warranted for a single ... character that I hope will never be in the real data like ~ or some ...
    (comp.unix.sco.misc)
  • Re: simple serial string display help
    ... I had the serial string stuff already from various examples I had ... the main window so that it will be repainted, ... CreateFile- open the serial port. ... what you need to do is get the serial character that you want to ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: reading on serial port slow...
    ... FIFO has some characters waiting but no new ones have arrived ... IIRC "a while" is a few character times. ... the port to signal an interrupt after each character. ...
    (comp.os.linux.development.system)
  • Re: Problem in establishing RS232 Communication
    ... I use hyperterminal to transmit one character through COM1, ... MATLAB simply hangs. ... Now check if you are getting any port listed in port2Use variable ...
    (comp.soft-sys.matlab)
  • Re: Console app freezes
    ... This posting is provided "AS IS" with no warranties, and confers no rights. ... i open all 4 comports but i'm only giving serial input to ... > I then decided to test the app with only one port processing serial ... character in the ...
    (microsoft.public.dotnet.framework.compactframework)