[ gpsdrive ] beginner user

Hamish hamish_b at yahoo.com
Mon Oct 20 00:15:51 AKDT 2008


Fred Felter wrote:
>    Here is the output from my attached eTrex with what you
> have given me to enter. It means nothing to me, nor did your
> code, but does it mean anything to you? I have no idea if
> gpsd is running or not.
> 
> fred at fred-laptop:~$ sudo su
> [sudo] password for fred: 

as far as I know, with newer versions of gpsd you don't have to be root to start it.

> root at fred-laptop:/home/fred# gpsd -n /dev/ttyUSB0 &
> [1] 7334

job #1 started and put in the background as process ID (PID) 7334.
(the & at the end puts it into the background, which is not necessary
for a daemon (the "d" in "gpsd") as that is what they do automatically,
just float around in the background running as needed..

> root at fred-laptop:/home/fred# gpsd -n /dev/gps &
> [2] 7343

job #2 started and put in the background as process ID (PID) 7343.
this typically means there is already a job #1 running.

> [1]   Done                    gpsd -n /dev/ttyUSB0

here the first one exited.


you can check if a program is running with "pgrep program_name". it will
return the PID of the program if it exists.

$ /usr/sbin/gpsd -n /dev/ttyS0
$ pgrep gpsd
30769

check stuff about it with "ps" or "top"

$ ps u 30769
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
hb       30769  0.0  0.0   2636  1180 ?        Ss   21:05   0:00 /usr/sbin/gpsd -n /dev/ttyS0


$ top -p 30769     # "q" to quit


stop gpsd with "kill <PID here>" or just "killall gpsd". If you started
it as root then only root can kill it. Sadly "xkill" only works with
windowed programs, that is by far the most satisfying way to kill a program.


Probably the easiest is to run the "xgps" program that comes with gpsd
and see if you are seeing satellites, or try

$ telnet localhost 2947

and then "R <enter>" to turn on raw NMEA mode. lots of text should fly
by including your GPS position and current time. R again to turn it off,
ctrl-] ctrl-d to exit.



if you are worried that gpsd is not getting data from your /dev/ttyUSB0
or wherever, you can (without gpsd running) point gtkterm to the port
and look for NMEA data (4800 baud N81).


good luck, chances are you are already 98% there,

Hamish


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the GPSdrive mailing list