[pskmail] Re: gpsd, problems

  • From: Rein Couperus <rein@xxxxxxxxxxxx>
  • To: pskmail@xxxxxxxxxxxxx
  • Date: Fri, 02 Mar 2007 17:55:28 +0100

> -----Ursprüngliche Nachricht-----
> Von: pskmail@xxxxxxxxxxxxx
> Gesendet: 02.03.07 17:32:06
> An: pskmail@xxxxxxxxxxxxx
> Betreff: [pskmail] Re: gpsd, problems

This seems to invoke gpsd -p but it does not specify the port like:
> 
> gpsd -p /dev/....
> 
> It does not work but I do have gpsd already running in the bacground on 
> /dev/rfcomm0
> 
> I found the -p option during some google searching on using bluetooth gps 
> units.  I tried it and it worked great with gpsdrive so I really didn't 
> investigate it any further.
> 
> 
> Can you tell me more about gpsd in terms of your program?  Are you trying to 
> invoke gpsd?  
> 

I hate doing things that have been done already :)
As I wrote already on the wiki:

I use Net::GPSD which makes use of the telnet port of gpsd. So gpsd must be 
running beforehand.

You can test it by telnetting to gpsd to see if it works.
Srein@dopey:~$ gpsd /dev/ttyUSB0
rein@dopey:~$ telnet localhost 2947
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
o
GPSD,O=?
o
GPSD,O=GSV 1172853879.78 0.005 40.058423 0.071358          ?  8.80 14.40   
0.0000    0.000          ?             ?        ?        ?
p
GPSD,P=40.058423 0.071358
p
GPSD,P=40.058423 0.071358
m
GPSD,M=0
m
GPSD,M=3
m
GPSD,M=3
p
GPSD,P=40.058423 0.071358

This is all described in the manpage of gpsd.

If this works than it will work with pskmail. If it doesn't I can't help you as 
I don't have
your gps here and mine works...

The way I handle it in arq.pm is that at startup I look for a running gpsd by 
invoking
'ps aux | grep gpsd -p' (in the new file I send you, in the old file it looks 
only for
gpsd /dev and gpsd -f).
If a running copy of gpsd is found the terminal will announce it:

rein@dopey:~/mail$ ./psk_arq.pl
Program start
GPS:gpsd /dev


It that is true it starts the gps thread, which takes the values from gpsd and 
puts 
them into a small file ~/mail/.gps
You cantest if that works by printing the .gps file (cat .gps) you will see:

rein@dopey:~$ cd mail
rein@dopey:~/mail$ cat .gps
140 40.058393 0.071378 1172854317.75
rein@dopey:~/mail$ cat .gps
144 40.058393 0.071378 1172854319.75
rein@dopey:~/mail$

which shows a running number, lat and lon and gpstime (in Linux format).

You can use gpsdrive as a status display, otherwise you can use a small program
called gpsstat.pl, which is in the repository.
It just displays the values on .gps in a nice format.

The beacon takes the lat/lon values of .gps.

Hope this helps,

73,

Rein EA/PA0R/P
(happily beaconing gps values at the moment)




-- 
http://pa0r.blogspirit.com

Other related posts: