Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 15-07-2012, 09:35   #1
Registered User

Join Date: Jul 2012
Posts: 20
GPSD not working - OSX

I have problems getting GPSD working with OpenCPN 3.02 on OSX 10.7. I'm using gpsd 3.7.

Using debug with gpsd daemon it appears as OpenCPN never send the ?WATCH (lO - Lima Oscar - is received by gpsd). Hacking gpsd to "kick-start" it does get gpsd going, but nothing is received by OpenCPN.
Using the same GPS (an iPhone) with socat is working fine.

Using gpspipe I get GPS data from the gpsd daemon.

Can anyone point me in some direction?

Peter
baerentp is offline   Reply With Quote
Old 15-07-2012, 10:20   #2
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Re: GPSD not working - OSX

Peter....

Could we inspect your logfile, please?

Thanks
Dave
bdbcat is offline   Reply With Quote
Old 15-07-2012, 10:28   #3
Registered User

Join Date: Jul 2012
Posts: 20
Re: GPSD not working - OSX

Dave,

With a non-mod gpsd this is the latest entry in the log...

19:24:46 CEST: 2012-07-15
19:24:46 CEST: -------Starting opencpn-------
19:24:46 CEST: Version 3.0.2 Build 2012-07-07
19:24:46 CEST: MemoryStatus: mem_total: 0 mb, mem_initial: 0 mb
19:24:46 CEST: SData_Locn is /Volumes/OpenCPN_3.0.2/OpenCPN.app/Contents/SharedSupport/
19:24:46 CEST: Using existing Config_File: /Users/peter/Library/Preferences/opencpn.ini
19:24:46 CEST: Setting Viewpoint Lat/Lon 55.8673, 12.0709
19:24:46 CEST: Setting Ownship Lat/Lon 55.8673, 12.0709
19:24:46 CEST: System default Language: da_DK
19:24:46 CEST: Opencpn language set to: en_US
19:24:46 CEST: ChartSymbols loaded from /Volumes/OpenCPN_3.0.2/OpenCPN.app/Contents/SharedSupport/s57data/chartsymbols.xml
19:24:47 CEST: Using s57data in /Volumes/OpenCPN_3.0.2/OpenCPN.app/Contents/SharedSupport/s57data
19:24:47 CEST: Setting Viewpoint Lat/Lon 55.8673, 12.0709
19:24:47 CEST: Setting Ownship Lat/Lon 55.8673, 12.0709
19:24:47 CEST: NMEA Data Source is....GPSD:localhost
19:24:47 CEST: AIS Data Source is....None
19:24:47 CEST: Using WVSChart datafile: /Volumes/OpenCPN_3.0.2/OpenCPN.app/Contents/SharedSupport/wvsdata/wvs43.dat
19:24:47 CEST: NMEA AutoPilot Port is....None
19:24:47 CEST: PlugInManager searching for PlugIns in location /Volumes/OpenCPN_3.0.2/OpenCPN.app/Contents/PlugIns
19:24:47 CEST: PlugInManager: Loading PlugIn: /Volumes/OpenCPN_3.0.2/OpenCPN.app/Contents/PlugIns/libdashboard_pi.dylib
19:24:47 CEST: /Volumes/OpenCPN_3.0.2/OpenCPN.app/Contents/PlugIns/libdashboard_pi.dylib Version detected: 106
19:24:47 CEST: PlugInManager: Loading PlugIn: /Volumes/OpenCPN_3.0.2/OpenCPN.app/Contents/PlugIns/libgrib_pi.dylib
19:24:47 CEST: /Volumes/OpenCPN_3.0.2/OpenCPN.app/Contents/PlugIns/libgrib_pi.dylib Version detected: 107
19:24:47 CEST: ChartDB Cache policy: Max open chart limit is 20.
19:24:47 CEST: Loading chart db version: V016
19:24:47 CEST: Chartdb: Chart directory list follows
19:24:47 CEST: Chart directory #0: /Users/peter/Documents/Søkort/CM93
19:24:47 CEST: Chart directory #1: /Users/peter/Documents/Søkort/S57
19:24:47 CEST: GPS Watchdog Timeout is: 6 sec.
19:24:47 CEST: Initializing Chart /Users/peter/Documents/Søkort/CM93/00300000/A/00300000.A
19:24:47 CEST: CM93Composite Chart Root is /Users/peter/Documents/Søkort/CM93/
19:24:47 CEST: Loaded CM93 Dictionary from /Users/peter/Documents/Søkort/CM93/
19:24:47 CEST: Loading CM93 cell /Users/peter/Documents/Søkort/CM93/03900000/E/04370035.E
19:24:47 CEST: Loading CM93 cell /Users/peter/Documents/Søkort/CM93/03900000/E/04370036.E
19:24:47 CEST: Loading CM93 cell /Users/peter/Documents/Søkort/CM93/03900000/E/04370037.E
19:24:48 CEST: Loading CM93 cell /Users/peter/Documents/Søkort/CM93/03900000/C/04260024.C
19:24:48 CEST: Loading CM93 cell /Users/peter/Documents/Søkort/CM93/03900000/C/04260036.C
19:25:09 CEST: Got quitflag from SIGUSR1
19:25:09 CEST: opencpn::MyFrame exiting cleanly.
19:25:09 CEST: Chart cache purge
19:25:09 CEST: PlugInManager: UnLoading PlugIn: /Volumes/OpenCPN_3.0.2/OpenCPN.app/Contents/PlugIns/libdashboard_pi.dylib
19:25:09 CEST: PlugInManager: UnLoading PlugIn: /Volumes/OpenCPN_3.0.2/OpenCPN.app/Contents/PlugIns/libgrib_pi.dylib
19:25:09 CEST: Chart cache purge
19:25:09 CEST: LOGBOOK: 2012-07-15 17:25:09 UTC OFF: Lat 55.86730 Lon 12.07090
19:25:09 CEST: opencpn::MyApp exiting cleanly...
baerentp is offline   Reply With Quote
Old 15-07-2012, 10:33   #4
Registered User

Join Date: Jul 2012
Posts: 20
Re: GPSD not working - OSX

This is the debug out of gpsd

gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1342373448.353498 (errno 0)
gpsd:PROG: checking client(0)
gpsd:IO: <= client(0): lO\x0a
gpsd:IO: => client(0): =
gpsd:SPIN: select() {3 4 5 6} -> { 5 } at 1342373449.104284 (errno 0)
gpsd:SPIN: packet_get() fd 5 -> 67 (0)
gpsd:RAW: tcp://10.0.20.133:11123 is known to be Generic NMEA
gpsd:RAW: packet sniff on tcp://10.0.20.133:11123 finds type 1
gpsd:RAW: raw packet of type 1, 67:$GPGGA,173049,5552.037,N,01204.255,E,1,8,0.9,14 .5,M,46.9,M,0,2*44\x0d\x0a
gpsd:IO: <= GPS: $GPGGA,173049,5552.037,N,01204.255,E,1,8,0.9,14.5, M,46.9,M,0,2*44
gpsdATA: GPGGA: registers fractional time 173049.00
gpsdATA: GGA: hhmmss=173049 lat=55.87 lon=12.07 alt=14.50 mode=3 status=1
gpsdATA: GPGGA time is 1342373449.000000 = 2012-07-15T17:30:49.00Z
gpsd:PROG: GPGGA sentence timestamped 173049.00.
gpsd:PROG: GPGGA starts a reporting cycle.
gpsdATA: packet type 1 from tcp://10.0.20.133:11123 with {ONLINE|TIME|LATLON|ALTITUDE|STATUS|MODE|PACKET|CL EAR|PPSTIME}
gpsd:RAW: NTPD ntpshm_put: Clock: 1342373449.000000 @ 1342373449.104484, fudge: 0.000
gpsd:SPIN: packet_get() fd 5 -> 0 (35)
gpsd:RAW: tcp://10.0.20.133:11123 is known to be Generic NMEA
gpsd:SPIN: select() {3 4 5 6} -> { 5 } at 1342373449.108700 (errno 0)
gpsd:SPIN: packet_get() fd 5 -> 64 (0)
gpsd:RAW: tcp://10.0.20.133:11123 is known to be Generic NMEA
gpsd:RAW: packet sniff on tcp://10.0.20.133:11123 finds type 1
gpsd:RAW: raw packet of type 1, 64:$GPRMC,173049,A,5552.037,N,01204.255,E,0.00,,15 0712,003.1,W*76\x0d\x0a
gpsd:IO: <= GPS: $GPRMC,173049,A,5552.037,N,01204.255,E,0.00,,15071 2,003.1,W*76
gpsdATA: merge_ddmmyy(150712) sets year 2012
gpsdATA: GPRMC: registers fractional time 173049.00
gpsdATA: RMC: ddmmyy=150712 hhmmss=173049 lat=55.87 lon=12.07 speed=0.00 track=0.00 mode=2 status=1
gpsdATA: GPRMC time is 1342373449.000000 = 2012-07-15T17:30:49.00Z
gpsd:PROG: GPRMC sentence timestamped 173049.00.
gpsdATA: packet type 1 from tcp://10.0.20.133:11123 with {ONLINE|TIME|LATLON|SPEED|TRACK|PACKET|PPSTIME}
gpsd:SPIN: packet_get() fd 5 -> 0 (35)
gpsd:RAW: tcp://10.0.20.133:11123 is known to be Generic NMEA
gpsd:SPIN: select() {3 4 5 6} -> { 5 } at 1342373449.112031 (errno 0)
gpsd:SPIN: packet_get() fd 5 -> 43 (0)
gpsd:RAW: tcp://10.0.20.133:11123 is known to be Generic NMEA
gpsd:RAW: packet sniff on tcp://10.0.20.133:11123 finds type 1
gpsd:RAW: raw packet of type 1, 43:$GPGLL,5552.037,N,01204.255,E,173049,A*24\x0d\x 0a
gpsd:IO: <= GPS: $GPGLL,5552.037,N,01204.255,E,173049,A*24
gpsdATA: GPGLL: registers fractional time 173049.00
gpsdATA: GLL: hhmmss=173049 lat=55.87 lon=12.07 mode=2 status=1
gpsdATA: GPGLL time is 1342373449.000000 = 2012-07-15T17:30:49.00Z
gpsd:PROG: GPGLL sentence timestamped 173049.00.
gpsd:PROG: GPGLL ends a reporting cycle.
gpsdATA: packet type 1 from tcp://10.0.20.133:11123 with {ONLINE|TIME|LATLON|STATUS|PACKET|REPORT|PPSTIME}
gpsd:SPIN: packet_get() fd 5 -> 0 (35)
gpsd:RAW: tcp://10.0.20.133:11123 is known to be Generic NMEA
gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1342373449.351899 (errno 0)
gpsd:PROG: checking client(0)
gpsd:IO: <= client(0): lO\x0a
gpsd:IO: => client(0): =
gpsd:SPIN: select() {3 4 5 6} -> { 5 } at 1342373450.091064 (errno 0)
gpsd:SPIN: packet_get() fd 5 -> 67 (0)
gpsd:RAW: tcp://10.0.20.133:11123 is known to be Generic NMEA
gpsd:RAW: packet sniff on tcp://10.0.20.133:11123 finds type 1
gpsd:RAW: raw packet of type 1, 67:$GPGGA,173050,5552.037,N,01204.255,E,1,8,0.9,14 .4,M,46.9,M,0,2*4D\x0d\x0a
gpsd:IO: <= GPS: $GPGGA,173050,5552.037,N,01204.255,E,1,8,0.9,14.4, M,46.9,M,0,2*4D
gpsdATA: GPGGA: registers fractional time 173050.00
gpsdATA: GGA: hhmmss=173050 lat=55.87 lon=12.07 alt=14.40 mode=3 status=1
gpsdATA: GPGGA time is 1342373450.000000 = 2012-07-15T17:30:50.00Z
gpsd:PROG: GPGGA sentence timestamped 173050.00.
baerentp is offline   Reply With Quote
Old 15-07-2012, 10:42   #5
Registered User

Join Date: Jul 2010
Location: Hannover - Germany
Boat: Amel Sharki
Posts: 2,541
Re: GPSD not working - OSX

Peter,

are you using iPhone-gpsd.py?
If yes, you need first to start another client like gpsmon or cgps to have OpenCPN receive any data.
The NMEA data source is "Network LIBGPS" and "localhost" in the OpenCPN settings.

Gerhard
CarCode is offline   Reply With Quote
Old 15-07-2012, 11:10   #6
Registered User

Join Date: Jul 2012
Posts: 20
Re: GPSD not working - OSX

Quote:
Originally Posted by CarCode View Post
Peter,

are you using iPhone-gpsd.py?
If yes, you need first to start another client like gpsmon or cgps to have OpenCPN receive any data.
The NMEA data source is "Network LIBGPS" and "localhost" in the OpenCPN settings.

Gerhard
Hello Gerhard,

I'm not quite sure how you got to that conclusion about "Network LIBGPS" - and I belive you are not quite right here.
Yes - I'm using the "GPS 2 IP" app on the iPhone and the gpsd daemon to collect the data and make it available to OpenCPN.

I have used socat in place of gpsd to test - that works... but I need to use gpsd as I need to collect data through a WiFi Pilot Plug... I hope :-)

Peter
baerentp is offline   Reply With Quote
Old 15-07-2012, 11:35   #7
Registered User

Join Date: Jul 2010
Location: Hannover - Germany
Boat: Amel Sharki
Posts: 2,541
Re: GPSD not working - OSX

Peter,

sorry, I do not use GPS2IP (payware) but the Python script from:
Making your iPhone look like a NMEA GPS receiver with gpsd and WiFi or Bluetooth | spench.net
(freeware) together with gpsd from MacPorts.
So I cannot help.

Gerhard
CarCode is offline   Reply With Quote
Old 15-07-2012, 11:48   #8
Registered User

Join Date: Jul 2012
Posts: 20
Re: GPSD not working - OSX

Quote:
Originally Posted by CarCode View Post
Peter,

sorry, I do not use GPS2IP (payware) but the Python script from:
Making your iPhone look like a NMEA GPS receiver with gpsd and WiFi or Bluetooth | spench.net
(freeware) together with gpsd from MacPorts.
So I cannot help.

Gerhard
Well - you might point me to where my problem is... if you are using gpsd (macports), I belive that must be version 3.5?? What version is your OpenCPN?
I can try it "your way" to see if that will get the gpsd working...

Could you try to run gpsd with -N -D 7 and, start OpenCPN. If you look from the top of the debug from gpsd look for 1-2 lines starting with "gpsd:IO: <= client(x):", where x is a number. It could look like this:

gpsd:IO: <= client(1): ?WATCH={"enable":true,"nmea":true};\x0a
json: json_read_object() sees '{"enable":true,"nmea":true};

Thanks,
Peter
baerentp is offline   Reply With Quote
Old 15-07-2012, 12:01   #9
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Re: GPSD not working - OSX

Peter...

Aha.

GPSD direct wire protocol is known broken in OpenCPN Version 3.
It has never been ported to JSON that the newest gpsd supports.
It will be fixed (or removed) from the next Version.

Can you use libgps?

Dave
bdbcat is offline   Reply With Quote
Old 15-07-2012, 13:25   #10
Registered User

Join Date: Jul 2012
Posts: 20
Re: GPSD not working - OSX

Quote:
Originally Posted by bdbcat View Post
Peter...

Aha.

GPSD direct wire protocol is known broken in OpenCPN Version 3.
It has never been ported to JSON that the newest gpsd supports.
It will be fixed (or removed) from the next Version.

Can you use libgps?

Dave
Hi Dave,

Sorry - did not know that...

About the libgps. I'm missing the libgps - OpenCPN throw an error. What is the way out of that one?

Peter
baerentp is offline   Reply With Quote
Old 15-07-2012, 14:05   #11
Registered User

Join Date: Jul 2012
Posts: 20
Re: GPSD not working - OSX

Hi Dave,

I should have been more specific.

From the log file of OpenCPN:
22:42:37 CEST: NMEA Data Source is....LIBGPS:localhost
22:42:37 CEST: Failed to load /opt/local/lib/libgps.dylib
22:42:37 CEST: Attempting to load /opt/local/lib/libgps.20.dylib
22:42:37 CEST: Failed to load /opt/local/lib/libgps.20.dylib
22:42:37 CEST: Attempting to load /opt/local/lib/libgps.19.dylib

Extract from /opt/local/lib:
-rwxr-xr-x 1 root admin 98468 3 Maj 01:53 /opt/local/lib/libgps.20.0.0.dylib
lrwxr-xr-x 1 root admin 19 3 Maj 01:53 /opt/local/lib/libgps.dylib -> libgps.20.0.0.dylib

Rgs,
Peter
baerentp is offline   Reply With Quote
Old 15-07-2012, 15:16   #12
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Re: GPSD not working - OSX

Peter....

As the pirates say..."Argh......"

libgps as part of GPSD Version 3.7 seems also to be broken on OpenCPN. gpsd authors routinely change the API between versions, which usually breaks OpenCPN.

It is on our list to fix this as well for the next version of OpenCPN.

Peter, maybe you can get and compile from source gpsd version 2.96, or so.
This is known to work, at least on i386 linux.
This is the only solution I can offer at present.

Sorry
Dave
bdbcat is offline   Reply With Quote
Old 15-07-2012, 15:55   #13
Registered User

Join Date: Jul 2012
Posts: 20
Re: GPSD not working - OSX

Quote:
Originally Posted by bdbcat View Post
Peter....

As the pirates say..."Argh......"

libgps as part of GPSD Version 3.7 seems also to be broken on OpenCPN. gpsd authors routinely change the API between versions, which usually breaks OpenCPN.

It is on our list to fix this as well for the next version of OpenCPN.

Peter, maybe you can get and compile from source gpsd version 2.96, or so.
This is known to work, at least on i386 linux.
This is the only solution I can offer at present.

Sorry
Dave
Hi Dave,

Thanks - I got the gpsd 2.96, ran the make and move the libgps.20.dylib into /opt/local/lib... same error :-(

No'tin' never easy :-)

I will look forward to a fix...

Rgs,
Peter
baerentp is offline   Reply With Quote
Old 15-07-2012, 18:23   #14
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Re: GPSD not working - OSX

Peter...
If you are able to build OpenCPN in Xcode, or debug with ddd/gdb, you may want to poke around a little at nmea.cpp, line 437

This is the libgps loader section, and it would help us to track this bug down more quickly if we could understand the code path.
I do not have access to a 10.7 OSX system....

Thanks
Dave
bdbcat is offline   Reply With Quote
Old 16-07-2012, 01:38   #15
Registered User

Join Date: Jul 2012
Posts: 20
Re: GPSD not working - OSX

Quote:
Originally Posted by bdbcat View Post
Peter...
If you are able to build OpenCPN in Xcode, or debug with ddd/gdb, you may want to poke around a little at nmea.cpp, line 437

This is the libgps loader section, and it would help us to track this bug down more quickly if we could understand the code path.
I do not have access to a 10.7 OSX system....

Thanks
Dave
Ok - I will take a crack on it... once I get to where I can build the 3.02 with no errors :-)

Peter
baerentp is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Advertise Here


All times are GMT -7. The time now is 20:53.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.