James Hartley wrote:
Is it possible to watch the NMEA traffic originating from a USB GPS
device *while* attached via nmeaattach(8)?
Once nmeaattach(8) has attached to the device, any subsequent
connection attempted via cu(1) fails with an "all ports busy" message.
The manpage for cu(1) states that connections are locked for UUCP
integrity reasons, so I'm guessing that nmeaattach(8) is doing
something similar (Sorry, I haven't traced the code yet...).
Is there some other manner in which I can tap into this connection?
No. And here is some information why:
Only one process can open a tty device at the time. If the nmea data
is to be used for a timedelta sensor, then the process opening the
device must attach the nmea(4) line discipline using the appropriate
ioctl(). nmeattach(8) and the newer ldattach(8) do just that and they
can be used when no other software runs that would use the NMEA data
and attach the line discipline. gpsd, e.g., can attach nmea(4).
Of course it would desirable to attach a line discpline by running
sth like ldattach and _still_ be able to use the NMEA data from
software that knows nothing about the nmea(4) line discipline. But
at the moment that is not possible.
- Marc