Perhaps I posted this on the wrong area of the forum...
To quickly restate: I have a bunch of mobile RB+WiFi+GPS units that come and go from construction zones. It would be nice to use the GPS as both a clock source, and an accurate lat/lng server for generating Google maps of the on-site unit locations (a poor man's fleet tracking)
Unfortunately, the 'sys gps mon' command does not report lat/lng with full device precision, so how to obtain that?
special-login is problematic because it is easy to wedge the serial port, which requires a reboot to unwedge.
Here is a different solution that I dismissed the first time for reasons that may appear obvious. However, lacking any other solution, it is looking more attractive.
The trick is to direct the GPS serial data to the system console, which will see them as login attempts/failures. Log the failures to disk, and you can capture the desired NEMA sentences which an external script can fetch and parse. Schedule the process to run periodically, and you have a (very) crude location server.
1. Configure sys/log to log critical errors to a small disk file
2. Disable GPS on the serial port
3. Enable system/console on the serial port. This causes the GPS NEMA sentences to be interpreted as (failed) login attempts
4. Delay for 15-20 seconds, allowing time for one or more GPRMC NEMA sentences to be logged to the disk file
5. Disable system/console on the serial port
5. Enable GPS on the serial port
Put this in a script and schedule it to run periodically, and you end up with a log file similar to the following
Feb/09/2011 09:57:45 system,error,critical login failure for user $GPGSV,3,2,10,21,56,280,28,25,15,200,26,29,73,154,29,30,29,296,30*7E via local
Feb/09/2011 09:57:46 system,error,critical login failure for user 296,30,02,02,085,00*73 via local
Feb/09/2011 09:57:48 system,error,critical login failure for user $GPRMC,165748,A,4650.0058,N,11400.7560,W,000.0,142.0,090211,015.5,E*6A via local
Feb/09/2011 09:57:49 system,error,critical login failure for user 30,,,,,2.1,1.1,1.7*30 via local
Feb/09/2011 09:57:50 system,error,critical login failure for user 0,28,25,15,200,25,29,73,154,29,30,29,296,30*7D via local
Feb/09/2011 09:58:07 system,error,critical login failure for user 3,05,16,18,21,25,29,30,,,,,,2.1,1.1,1.7*30 via local
Feb/09/2011 09:58:08 system,error,critical login failure for user 10,25,15,200,24,29,73,154,29,30,29,296,32,02,02,085,00*73 via local
Feb/09/2011 09:58:10 system,error,critical login failure for user $GPRMC,165810,A,4650.0084,N,11400.7581,W,000.0,357.1,090211,015.5,E*61 via local
Feb/09/2011 09:58:11 system,error,critical login failure for user 8,21,25,29,30,,,,,,2.1,1.1,1.7*30 via local
Feb/09/2011 09:58:12 system,error,critical login failure for user ,10,05,36,053,38,16,21,315,29,18,22,214,23,21,56,280,29*71 via local
Feb/09/2011 09:58:14 system,error,critical login failure for user $GPRMC,165814,A,4650.0088,N,11400.7580,W,000.0,357.1,090211,015.5,E*68 via local
Feb/09/2011 09:58:15 system,error,critical login failure for user 5,29,30,,,,,,2.1,1.1,1.7*30 via local
Feb/09/2011 09:58:16 system,error,critical login failure for user ,3,2,10,25,15,200,23,29,73,154,29,30,29,296,32,02,02,085,00*74 via local
Feb/09/2011 09:58:18 system,error,critical login failure for user $GPRMC,165818,A,4650.0093,N,11400.7580,W,000.0,357.1,090211,015.5,E*6E via local
Feb/09/2011 09:58:19 system,error,critical login failure for user ,30,,,,,,2.1,1.1,1.7*30 via local
Feb/09/2011 09:58:20 system,error,critical login failure for user 5,200,23,29,72,154,29,30,29,296,32,02,02,085,00*75 via local
Feb/09/2011 09:58:22 system,error,critical login failure for user ,00*77 via local
$GPRMC,165748,A,4650.0058,N,11400.7560,W,000.0,142.0,090211,015.5,E*6A
$GPRMC,165810,A,4650.0084,N,11400.7581,W,000.0,357.1,090211,015.5,E*61
$GPRMC,165814,A,4650.0088,N,11400.7580,W,000.0,357.1,090211,015.5,E*68
$GPRMC,165818,A,4650.0093,N,11400.7580,W,000.0,357.1,090211,015.5,E*6E
The lat/lng is reported as DDMM.MMMM, or a precision of 1/10,000 minute, as opposed to 'sys gps mon' which reports with a precision of one second, or 1/60 minute.