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 13-03-2012, 23:53   #1
Registered User

Join Date: Mar 2012
Location: Fort Gibson, Oklahoma
Boat: Gulf Craft, 165 ft.
Posts: 9
Ubuntu OpenCPN & GPS 2 IP

Hello Cruisers,

I started this new thread because after scouring the net high and low there seems to be a lack of information on setting up Ubuntu OpenCPN on a network, fed data by GPS 2 IP. Hopefully this thread will be of help to others trying to achieve the same type of setup. Any ideas to help forward the progress of this setup for those of us who are having trouble would be greatly appreciated.

This is a link to the GPS 2 IP website for those who are not familiar with the app.

CapsicumDreams | iPhone apps - GPS 2 IP: Turn your iPhone into an NMEA gps receiver
Gokstad is offline   Reply With Quote
Old 01-04-2012, 12:35   #2
Registered User

Join Date: Mar 2012
Location: Fort Gibson, Oklahoma
Boat: Gulf Craft, 165 ft.
Posts: 9
Re: Ubuntu OpenCPN & GPS 2 IP

I am having some trouble getting OpenCPN to work properly with my iPhone NMEA server (GPS 2 IP). I do not feel that the trouble is related to GPS 2 IP as xgps seems to be reading the data from the server properly. I have tried to pipe the data read from server IP and port to local virtual/serial ports to be read by OpenCPN. I have also tried to use OpenCPN with Network GPSD and Network LIBGPS as NMEA data source. It seems to me that if xgps can handle the NMEA data from the server then OpenCPN should have no problem using it as well. For what its worth, OpenCPN works properly with a usb gps physicaly attached on /dev/ttyS4. Anyone have any ideas? I've exhausted all of my own.
Gokstad is offline   Reply With Quote
Old 01-04-2012, 17:20   #3
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,395
Re: Ubuntu OpenCPN & GPS 2 IP

Gokstad....

This should work....

Tell us more.

What exactly happens if you try gpsd, as described on the referenced IP website. Seems like it should work....

Any other scenarios which you have tried, and can describe in detail will also be helpful. More bloody entrails, please.

Thanks
Dave
bdbcat is offline   Reply With Quote
Old 02-04-2012, 00:33   #4
Registered User

Join Date: Mar 2012
Location: Fort Gibson, Oklahoma
Boat: Gulf Craft, 165 ft.
Posts: 9
Re: Ubuntu OpenCPN & GPS 2 IP

Dave,

Thank you for your reply. I will do my best to describe the process with as much detail as I can muster, but please bear with me as I am a bit of a noob to linux and may need some babysitting at the command line. When I started the thread I was running Ubuntu, but the troubleshooting process has brought me to Linux Mint 12. Still Ubuntu based.

I am using an iphone 4 iOS 5.0.1 and a laptop running Linux Mint 12 Lisa. Both my phone (192.168.1.101) and laptop (192.168.1.100) are connected to the same network with no firewall rules in place. I start GPS 2 IP running on the iPhone in socket mode so I can use gpsd, telnet, or netcat to connect. I have tried all three of these methods. first I will start out with gpsd. Just to verify the output of my phone:

gokstad@Blackbox ~ $ telnet 192.168.1.101 11123
Trying 192.168.1.101...
Connected to 192.168.1.101.
Escape character is '^]'.
GPS 2 IP Server started. "exit" to finish.
$GPGGA,031528,2932.446,N,9218.613,W,1,8,0.9,15.2,M ,46.9,M,,*6B
$GPRMC,031528,A,2932.446,N,9218.613,W,0.00,,020412 ,003.1,W*58
$GPGLL,2932.446,N,9218.613,W,031528,A*0F
$GPGGA,031529,2932.446,N,9218.613,W,1,8,0.9,16.5,M ,46.9,M,,*6E
$GPRMC,031529,A,2932.446,N,9218.613,W,0.00,,020412 ,003.1,W*59
$GPGLL,2932.446,N,9218.613,W,031529,A*0E
^C
exit
Connection closed by foreign host.


Durring the telnet session I have good looking NMEA data and my phone shows 1 client connected to it. Since I'll be using gpsd (ver 2.95) I'll make sure gpsd is not already running, start gpsd, and then verify that it is running:

gokstad@Blackbox ~ $ ps -ef | grep gpsd
gokstad 5574 5220 0 23:17 pts/0 00:00:00 grep --colour=auto gpsd

gokstad@Blackbox ~ $ gpsd tcp://192.168.1.101:11123

gokstad@Blackbox ~ $ ps -ef | grep gpsd
gokstad 5590 1 0 23:20 ? 00:00:00 gpsd tcp://192.168.1.101:11123
gokstad 5592 5220 0 23:20 pts/0 00:00:00 grep --colour=auto gps


I get no error messages and gpsd seems to have started correctly. My iPhone shows no connected clients. I am not sure if the phone should show a connected client at this point, or if it should show after the next steps which is setting OpenCPN to Network GPSD for the NMEA Data Source and setting the GPS Data Source IP Address to 192.168.1.100. Either way the phone never does show a connected client, and OpenCPN fails to plot my position.
I test dgps by:

gokstad@Blackbox ~ $ xgps

It appears that dgps is working properly. It shows my correct position but OpenCPN's NMEA data window shows nothing coming through. Listing open files shows:

gokstad@Blackbox ~ $ lsof -i :2947
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
gpsd 5590 gokstad 3u IPv4 4700903 0t0 TCP localhost:gpsd (LISTEN)
gpsd 5590 gokstad 4u IPv6 4700904 0t0 TCP ip6-localhost:gpsd (LISTEN)
opencpn 7232 gokstad 6u IPv4 6072265 0t0 TCP localhost:57417->localhost:gpsd (ESTABLISHED)

Anything I can try to assist in the troubleshooting?
Gokstad is offline   Reply With Quote
Old 02-04-2012, 06:33   #5
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,395
Re: Ubuntu OpenCPN & GPS 2 IP

Gokstad...

Your process sounds OK so far.

Lets look at the OpenCPN logfile:

$cat ~/opencpn.log

Just the last session (at the bottom of the file) should be enough.

Thanks
Dave
bdbcat is offline   Reply With Quote
Old 02-04-2012, 18:39   #6
Registered User

Join Date: Mar 2012
Location: Fort Gibson, Oklahoma
Boat: Gulf Craft, 165 ft.
Posts: 9
Re: Ubuntu OpenCPN & GPS 2 IP

Dave,

This is the last session from opencpn.log:

20:21:23 CDT:


20:21:23 CDT: 2012-04-02
20:21:23 CDT: -------Starting opencpn-------
20:21:23 CDT: Version 2.5.0 Build 2011-07-26
20:21:23 CDT: MemoryStatus: mem_total: 5902 mb, mem_initial: 194 mb
20:21:23 CDT: SData_Locn is /usr/local/share/opencpn/
20:21:23 CDT: Using existing Config_File: /home/gokstad/.opencpn/opencpn.conf
20:21:23 CDT: Setting Viewpoint Lat/Lon 29.5049, -92.2774
20:21:23 CDT: Setting Ownship Lat/Lon 29.5048, -92.2774
20:21:23 CDT: System default Language: en_US
20:21:23 CDT: Opencpn language set to: en_US
20:21:23 CDT: Using s57data in /usr/local/share/opencpn/s57data
20:21:23 CDT: Using Tide/Current data from: /usr/local/share/opencpn/tcdata/
20:21:23 CDT: Setting Viewpoint Lat/Lon 29.5049, -92.2774
20:21:23 CDT: Setting Ownship Lat/Lon 29.5048, -92.2774
20:21:23 CDT: NMEA Data Source is....GPSD:192.168.1.101
20:21:23 CDT: AIS Data Source is....None
20:21:24 CDT: Using WVSChart datafile: /usr/local/share/opencpn/wvsdata/wvs43.dat
20:21:24 CDT: NMEA AutoPilot Port is....None
20:21:24 CDT: PlugInManager searching for PlugIns in location /usr/local/lib/opencpn
20:21:24 CDT: PlugInManager: Loading PlugIn: /usr/local/lib/opencpn/libdashboard_pi.so
20:21:24 CDT: PlugInManager: Loading PlugIn: /usr/local/lib/opencpn/libgrib_pi.so
20:21:24 CDT: ChartDB Cache policy: Max open chart limit is 20.
20:21:24 CDT: Loading chart db version: V016
20:21:24 CDT: Chartdb: Chart directory list follows
20:21:24 CDT: Chart directory #0: /home/gokstad/Nav_charts/BSB_ROOT
20:21:24 CDT: GPS Watchdog Timeout is: 6 sec.
20:21:24 CDT: Initializing Chart /home/gokstad/Nav_charts/BSB_ROOT/11349/11349_1.KAP
20:22:06 CDT: PlugInManager: Deactivating PlugIn: /usr/local/lib/opencpn/libdashboard_pi.so
20:22:06 CDT: opencpn::MyFrame exiting cleanly.
20:22:06 CDT: PlugInManager: UnLoading PlugIn: /usr/local/lib/opencpn/libdashboard_pi.so
20:22:06 CDT: PlugInManager: UnLoading PlugIn: /usr/local/lib/opencpn/libgrib_pi.so
20:22:06 CDT: LOGBOOK: 2012-04-03 00:22:06 UTC OFF: Lat 29.50480 Lon -92.27740
20:22:06 CDT: opencpn::MyApp exiting cleanly...
Gokstad is offline   Reply With Quote
Old 02-04-2012, 19:57   #7
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,395
Re: Ubuntu OpenCPN & GPS 2 IP

Gokstad....

OK. Two things:

1. OpenCPN 2.5.0 has some trouble with gpsd. Can you get and compile the latest Beta?

2. You may add to the config file

[Settings]
DebugGPSD=1

This will produce some more log output regarding gpsd. It is worth a try on 2.5.0, although I recommend moving to 2.6 Beta for better results.

Dave
bdbcat is offline   Reply With Quote
Old 02-04-2012, 20:28   #8
Registered User

Join Date: Mar 2012
Location: Fort Gibson, Oklahoma
Boat: Gulf Craft, 165 ft.
Posts: 9
Re: Ubuntu OpenCPN & GPS 2 IP

Dave,

I will do what you have recommended and get the latest beta as "better results" is exactly what I need. I will post the results of the newer version with GPS 2 IP.

Thanks
Gokstad is offline   Reply With Quote
Old 03-04-2012, 21:43   #9
Registered User

Join Date: Mar 2012
Location: Fort Gibson, Oklahoma
Boat: Gulf Craft, 165 ft.
Posts: 9
Dave,

I have tried the precompiled 64 bit beta for Ubuntu, and also the compiled beta source package. The compiled version did fix a scaling issue i was having with chart quilting option, but I am still having the same problem. I am now wondering if the telnet method would not be a better way to go about achieving a successful setup between the two programs. I have had the same measure of success with telnet as gpsd. Any other suggestions?

Thanks
Gokstad is offline   Reply With Quote
Old 04-04-2012, 04:50   #10
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,395
Re: Ubuntu OpenCPN & GPS 2 IP

Gokstad....

Lets see the logfile, please, with

[Settings]
DebugGPSD=1


Thanks
Dave
bdbcat is offline   Reply With Quote
Old 04-04-2012, 10:48   #11
Registered User

Join Date: Mar 2012
Location: Fort Gibson, Oklahoma
Boat: Gulf Craft, 165 ft.
Posts: 9
Re: Ubuntu OpenCPN & GPS 2 IP

Dave,

Added DebugGPSD=1 to opencpn.conf

12:40:03 CDT:


12:40:03 CDT: 2012-04-04
12:40:03 CDT: -------Starting opencpn-------
12:40:03 CDT: Version 2.6.1524 Build 2012-03-24
12:40:03 CDT: MemoryStatus: mem_total: 5902 mb, mem_initial: 191 mb
12:40:03 CDT: SData_Locn is /usr/local/share/opencpn/
12:40:03 CDT: Using existing Config_File: /home/gokstad/.opencpn/opencpn.conf
12:40:03 CDT: Setting Viewpoint Lat/Lon 29.484, -92.3126
12:40:03 CDT: Setting Ownship Lat/Lon 29.474, -92.3195
12:40:03 CDT: System default Language: en_US
12:40:03 CDT: Opencpn language set to: en_US
12:40:03 CDT: Using s57data in /usr/local/share/opencpn/s57data
12:40:03 CDT: Using Tide/Current data from: /usr/local/share/opencpn/tcdata/
12:40:03 CDT: Setting Viewpoint Lat/Lon 29.484, -92.3126
12:40:03 CDT: Setting Ownship Lat/Lon 29.474, -92.3195
12:40:03 CDT: NMEA Data Source is....GPSD:192.168.1.101
12:40:03 CDT: AIS Data Source is....None
12:40:03 CDT: Using WVSChart datafile: /usr/local/share/opencpn/wvsdata/wvs43.dat
12:40:03 CDT: NMEA AutoPilot Port is....None
12:40:03 CDT: PlugInManager searching for PlugIns in location /usr/local/lib/opencpn
12:40:03 CDT: PlugInManager: Loading PlugIn: /usr/local/lib/opencpn/libdashboard_pi.so
12:40:03 CDT: /usr/local/lib/opencpn/libdashboard_pi.so Version detected: 106
12:40:03 CDT: PlugInManager: Loading PlugIn: /usr/local/lib/opencpn/libgrib_pi.so
12:40:03 CDT: /usr/local/lib/opencpn/libgrib_pi.so Version detected: 107
12:40:03 CDT: ChartDB Cache policy: Max open chart limit is 20.
12:40:03 CDT: Loading chart db version: V016
12:40:03 CDT: Chartdb: Chart directory list follows
12:40:03 CDT: Chart directory #0: /home/gokstad/Nav_charts/BSB_ROOT
12:40:03 CDT: GPS Watchdog Timeout is: 6 sec.
12:40:03 CDT: Initializing Chart /home/gokstad/Nav_charts/BSB_ROOT/11349/11349_1.KAP
12:40:04 CDT: Initializing Chart /home/gokstad/Nav_charts/BSB_ROOT/11340/11340_1.KAP
12:40:41 CDT: opencpn::MyFrame exiting cleanly.
12:40:41 CDT: PlugInManager: UnLoading PlugIn: /usr/local/lib/opencpn/libdashboard_pi.so
12:40:41 CDT: PlugInManager: UnLoading PlugIn: /usr/local/lib/opencpn/libgrib_pi.so
12:40:41 CDT: LOGBOOK: 2012-04-04 16:40:41 UTC OFF: Lat 29.47400 Lon -92.31950
12:40:41 CDT: opencpn::MyApp exiting cleanly...

Thanks
Gokstad is offline   Reply With Quote
Old 04-04-2012, 12:59   #12
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: Ubuntu OpenCPN & GPS 2 IP

Gokstad

To speed things up a bit....
I does not look like you tried to connect to gpsd in your published log excerpt. Try everything you have tried before to make gps work, and publish that sessions log.
Once again make sure that your opencpn.conf contains
Quote:
[Settings]
DebugGPSD=1
before you start. Add the line when OpenCPN is closed down.

Thomas
cagney is offline   Reply With Quote
Old 04-04-2012, 16:49   #13
Registered User

Join Date: Mar 2012
Location: Fort Gibson, Oklahoma
Boat: Gulf Craft, 165 ft.
Posts: 9
Re: Ubuntu OpenCPN & GPS 2 IP

Hello Thomas,

This is the first couple lines of opencpn.conf:

gokstad@Blackbox ~ $ cat .opencpn/opencpn.conf
[PlugIns]
[PlugIns/Dashboard]
bEnabled=0
[PlugIns/GRIB]
bEnabled=0
[ChartDirectories]
ChartDir1=/home/gokstad/Nav_charts/BSB_ROOT^302901390509
[Settings]
DebugGPSD=1
ConfigVersionString=Version 2.6.1524 Build 2012-03-24
NavMessageShown=1
ShowDebugWindows=1
ShowPrintIcon=0
SetSystemTime=0
ShowGrid=0

Then I do:

gokstad@Blackbox ~ $ ping 192.168.1.101
PING 192.168.1.101 (192.168.1.101) 56(84) bytes of data.
64 bytes from 192.168.1.101: icmp_req=1 ttl=64 time=116 ms
^C
--- 192.168.1.101 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 116.389/116.389/116.389/0.000 ms
gokstad@Blackbox ~ $ ps -ef | grep gpsd
nobody 1287 1 0 18:22 ? 00:00:00 /usr/sbin/gpsd -F /var/run/gpsd.sock -P /var/run/gpsd.pid
gokstad 2278 2220 0 18:36 pts/0 00:00:00 grep --colour=auto gpsd
gokstad@Blackbox ~ $ sudo killall gpsd
[sudo] password for gokstad:
gokstad@Blackbox ~ $ ps -ef | grep gpsd
gokstad 2283 2220 0 18:37 pts/0 00:00:00 grep --colour=auto gpsd
gokstad@Blackbox ~ $ gpsd tcp://192.168.1.101:11123
gokstad@Blackbox ~ $ ps -ef | grep gpsd
gokstad 2287 1 0 18:38 ? 00:00:00 gpsd tcp://192.168.1.101:11123
gokstad 2289 2220 0 18:38 pts/0 00:00:00 grep --colour=auto gpsd
gokstad@Blackbox ~ $ opencpn


And this is the last session in opencpn.log

18:40:25 CDT:


18:40:25 CDT: 2012-04-04
18:40:25 CDT: -------Starting opencpn-------
18:40:25 CDT: Version 2.6.1524 Build 2012-03-24
18:40:25 CDT: MemoryStatus: mem_total: 5902 mb, mem_initial: 191 mb
18:40:25 CDT: SData_Locn is /usr/local/share/opencpn/
18:40:25 CDT: Using existing Config_File: /home/gokstad/.opencpn/opencpn.conf
18:40:25 CDT: Setting Viewpoint Lat/Lon 29.4841, -92.3126
18:40:25 CDT: Setting Ownship Lat/Lon 29.474, -92.3195
18:40:25 CDT: System default Language: en_US
18:40:25 CDT: Opencpn language set to: en_US
18:40:25 CDT: Using s57data in /usr/local/share/opencpn/s57data
18:40:25 CDT: Using Tide/Current data from: /usr/local/share/opencpn/tcdata/
18:40:25 CDT: Setting Viewpoint Lat/Lon 29.4841, -92.3126
18:40:25 CDT: Setting Ownship Lat/Lon 29.474, -92.3195
18:40:25 CDT: NMEA Data Source is....GPSD:192.168.1.101
18:40:25 CDT: AIS Data Source is....None
18:40:26 CDT: Using WVSChart datafile: /usr/local/share/opencpn/wvsdata/wvs43.dat
18:40:26 CDT: NMEA AutoPilot Port is....None
18:40:26 CDT: PlugInManager searching for PlugIns in location /usr/local/lib/opencpn
18:40:26 CDT: PlugInManager: Loading PlugIn: /usr/local/lib/opencpn/libdashboard_pi.so
18:40:26 CDT: /usr/local/lib/opencpn/libdashboard_pi.so Version detected: 106
18:40:26 CDT: PlugInManager: Loading PlugIn: /usr/local/lib/opencpn/libgrib_pi.so
18:40:26 CDT: /usr/local/lib/opencpn/libgrib_pi.so Version detected: 107
18:40:26 CDT: ChartDB Cache policy: Max open chart limit is 20.
18:40:26 CDT: Loading chart db version: V016
18:40:26 CDT: Chartdb: Chart directory list follows
18:40:26 CDT: Chart directory #0: /home/gokstad/Nav_charts/BSB_ROOT
18:40:26 CDT: GPS Watchdog Timeout is: 6 sec.
18:40:26 CDT: Initializing Chart /home/gokstad/Nav_charts/BSB_ROOT/11349/11349_1.KAP
18:40:33 CDT: Initializing Chart /home/gokstad/Nav_charts/BSB_ROOT/1116A/1116A_1.KAP
18:41:16 CDT: opencpn::MyFrame exiting cleanly.
18:41:16 CDT: PlugInManager: UnLoading PlugIn: /usr/local/lib/opencpn/libdashboard_pi.so
18:41:16 CDT: PlugInManager: UnLoading PlugIn: /usr/local/lib/opencpn/libgrib_pi.so
18:41:16 CDT: LOGBOOK: 2012-04-04 22:41:16 UTC OFF: Lat 29.47400 Lon -92.31950
18:41:16 CDT: opencpn::MyApp exiting cleanly...

After all of this the only thing that works is xgps.

Thanks
Gokstad is offline   Reply With Quote
Old 05-04-2012, 07:29   #14
Registered User

Join Date: Mar 2012
Location: Fort Gibson, Oklahoma
Boat: Gulf Craft, 165 ft.
Posts: 9
Thomas,

I misunderstood what you were asking me to do. I'll try EVERYTHING and post the log.

Thanks
Gokstad 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Series Drogues & Heaving To Dpoissant Seamanship & Boat Handling 123 11-11-2014 08:29
Inverter & Charger - Combi or Standalone SV Sedna Electrical: Batteries, Generators & Solar 7 18-03-2012 13:59
OpenCPN 2.5.0 Win 7 problems jimbim OpenCPN 19 14-03-2012 04:09
Managing Charts in Opencpn SV Demeter OpenCPN 8 13-03-2012 17:52

Advertise Here


All times are GMT -7. The time now is 03:39.


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.