(→Using gpsd with gllin)
|Line 159:||Line 159:|
== Using gpsd with gllin ==
== Using gpsd with gllin ==
edit /etc/default/gpsd and set the
edit /etc/default/gpsd and set the to /tmp/nmeaNP start gllin before gpsd.
== Some notes: ==
== Some notes: ==
Revision as of 10:48, 1 December 2007
gllin is an userpsace driver for a hammerhead GPS chip. It was distributed on phase1 openmokos.
Thanks to a tremendous amount of hard work by many people, we have ready a release of gllin, the GPS drives. Here is how you can get it:
From here, the rest of information in this page might be outdated or not necesary now.
Unfortunately, it is an OABI binary, and not even static one, so lots of stuff is needed for it to work. For security reasons, and for compatibility with EABI userland, it is probably best to run it in chroot. Zdanek's wrote an article how to put that together.
The changeroot trick
Your chroot will need to contain following files:
...and you"ll want to mount /sys there. Then, to get gps to work, do:
root@fic-gta01:/chroot$ cat /chroot/tmp/nmeaNP &
root@fic-gta01:/chroot$ chroot /chroot/ gllin -low 1
root@fic-gta01:/chroot$ chroot /chroot/ gllin -periodic 1
More infos and tricks are here: Manually_using_GPS.
The /home/root/gllin file installed by the new (legitimate!) .ipk package is really just a shell script. You can modify the options passed to gllin.real by editing that script. Here are the options:
Usage: -help Help -board <type> Defines board type Ex: '-board matchbox' supported: matchbox, trident -com <com port> GPS com port; Ex: '-com com6' -baud <baud rate> Set baud rate; Ex: '-baud 115200' -rft <RF type> Set RF type; Ex: '-rft RF_LN22OUT' -freq <freq plan> | ? set frequency plan for GPS or show the list of all available plans Ex: '-freq FRQ_PLAN_OCXO_10000' Ex: '-freq ?' -- Show all available plans -g <URL> SUPL Server URL or IP address; Ex: '-g 188.8.131.52' -p <port> SUPL Server port number; Ex: '-p 9118' -udp <port> Local UDP port to send NMEA to. '-udp 6000' [default] -gsm_cell <cell ID> set GSM Cell ID information cell ID has the following format: '<MCC>.<MNC>.<LAC>.<CI>' Where: MCC - Mobile Country Code MNC - Mobile Network Code LAC - Location Area Code CI - Cell Identification Ex: '-gsm_cell 310.170.367.25732' -set_assisted_off disable SET assisted capability -set_based_off disable SET based capability -msisdn <MSISDN> set value for MSISDN (international phone number) as SET id Ex: '-msisdn 14081234567' -nai <nai> specify Network Access Identifier as SET id Ex: '-nai email@example.com' -periodic <s> make periodic request every s second (-1 to 64) -1 single shot: perform one fix, then quit 0 native: perform fixes as fast as possible <s> timed: report a position every <s> seconds where <s> is 1 to 64 -recover recover GLLIN after signaled exit -low [<count>] low level test. Default <count> is 1 -low_debug Low level debug ON +low_debug Low level debug OFF -train <count> Send train data <count> times +pty | -pty Enable or disable NMEA output to pty "/tmp/nmeaPTY" Default is off [-pty] +np | -np Enable or disable NMEA output to named pipe "/tmp/nmeaNP" Default is on [-np] +nmea | -nmea Enable or disable NMEA output to log file Default is off [-nmea] +daemon | -daemon Become a daemon (or not) Default is -daemon -a2 | -a3 | -a0 Select a GTA01 board revision. Default is a3 -batch <st> <n> <fix> perform batch test of <n> starts of type <st> <st> is hot, warm, cold, or SNR. Each start has <fix> fixes. -i start GLLIN command line +pnd optimize for PND -pnd look for low signal strength signals +sim using simulator so don't use almanac -sim not using simulator SNR manufacturing SNR test mode hot hot start [default] warm warm start cold cold start -v[n] Report GLLIN version string. n is 1234 to report selected versions. version 1.1.7
Using gpsd with gllin
edit /etc/default/gpsd and set the GPS_DEV to /tmp/nmeaNP start gllin before gpsd.
The listed defaults don't seem to be correct. By default it DOES generate NMEA data in log files. These log files are on your flash (/home/root/gllin/log/*) and are written to once every second. Ridiculous!
To stop this, add the option "-nmea" to the second of the two gllin.real commands in the startup script.
But note further that the startup script also spawns a command to 'cat' the output of the /tmp/nmeaNP named pipe to a gzipped file in /home/root. If you want this to stop, you can do one of two things:
* cat to /dev/null instead of | gzip >> file
* add "-np" to the second gllin.real command
You can't just take the 'cat' command out of the script, because with the named pipe activated, gllin will QUIT if it doesn't see anybody taking the output from the pipe. To keep it going, either open that pipe or turn it off.