On Wed, 2008-08-27 at 16:17 +0200, Per Jessen wrote:
Roger Oberholtzer wrote:
I would love to know how. The serial settigns (baud rate and all) can, I think, be determined. But blocking mode is a generic file descriptor setting that I do not think is reported in /proc.
You can get/set it with fcntl().
As I do. But I would like to see it in /proc as well so I can check it at will.
One more detail, I run the serial port in canonical mode. So the read calls return only when there is a complete line of data. Which is how GPS NMEA records are reported. I am guessing that well tested apps like PPP do not run the serial port in this mode.
I think I would take a look at how ntp does it - ntp has interface code for GPS receivers too, maybe they've worked out the right way to do it?
Been there. Their code only reads from the serial port when appropriate. Whenever it wants to sync times. Otherwise, the serial port is not accessed and data is dropped. As such, and serial port oddity like this would go un-noticed. ntp is seldom in a read state. I, however, read all the time as I need all data all the time. I have also considered if, but can't see how, a spurious error in the serial port data that matches a flow control character is received (like XON) could mess up the flow control. As I save every character that arrives, I can see that no such character arrives. All data is nice ASCII 7-bit printable characters. -- Roger Oberholtzer OPQ Systems / Ramböll RST Ramböll Sverige AB Kapellgränd 7 P.O. Box 4205 SE-102 65 Stockholm, Sweden Office: Int +46 8-615 60 20 Mobile: Int +46 70-815 1696 And remember: It is RSofT and there is always something under construction. It is like talking about large city with all constructions finished. Not impossible, but very unlikely. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org