On Fri, 2013-01-18 at 06:52 -0500, Adam Tauno Williams wrote:
On Thu, 2013-01-17 at 08:50 -0500, Greg Freemyer wrote:
Roger Oberholtzer
wrote: I feel funny even asking the following, but I have a situation that I need to resolve. So, is there any chance we see data from before the open/flush() call?
Yes, there is a chance.
For rs-232 there is no kernel level concept of a connection. I don't know what the receiver does if data comes in without a open file handle, but the sending side can only send it or queue it up. If you are using rts/cts hardware flow control the data could easily be sitting in the sending device until you open the tty and raise cts.
And here is a key part - it depends on the hardware. You might have a traditional UART, a Cyclades board, a Digi board... so it is always best to assume with a serial connection that you might get some stray stuff (possibly even noise).
We have verified that the sender GPS sends data on the serial port even when we are not reading it. Which is good. This means that any read() we get should be rather recent. Combined with the flush and looking for the second occurrence of a record, I think we are truly getting the most recent data from this device. The network device (that had the suspicious time - at least as I see things) is most likely the source of the problem. Are you all sitting down? The supplier said that they do not always put the GPS in the unit. Sometimes it is supplied in a separate box and the customer needs to install it. The guys dealing with these systems (across the country) have verified that some systems may be this way. So, on Monday we start a new hunt. But of course, when something looks odd, please do blame the software first... Yours sincerely, Roger Oberholtzer Ramböll RST / Systems Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 roger.oberholtzer@ramboll.se ________________________________________ Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden www.rambollrst.se -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-programming+owner@opensuse.org