Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

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 02-07-2010, 11:25   #16
Registered User

Join Date: May 2010
Location: Cairns Nth Qld, Australia
Posts: 34
Sorry Thomas the script is the one for setting up GPS in the opencpn wiki

Install the gpsd and gpsd-clients packages
$ sudo apt-get install gpsd gpsd-clients
Go to Toolbox-->GPS and select "Network GPSD" as your "NMEA Data Source", unless you have a gpsd version in the 2.9.x series( Ubuntu 10.04 and other new distros). In this case choose Toolbox-->GPS --> "NMEA Data Source" -->"Network LIBGPS". Note that in this case you also have to use OpenCPN version greater than 2.1.0 Beta build 530.
On Ubuntu 9.10 and later, that is realy all you have to do. When you plug in your gps this will trigger gpsd to start.
If this this doesn't work for you, follow the instructions below.
Check first if gpsd is working:
$ ps aux | grep gpsd
nobody 12338 0.3 0.1 4124 1448 ? S<s 18:31 0:00 gpsd -F /var/run/gpsd.sock
you 12356 0.0 0.0 3036 800 pts/3 S+ 18:32 0:00 grep --color=tty -d skip gpsd
This or similar responses indicate that gpsd is running. If you only have something like the second line, ....it is not running.

Determine which device your GPS is on your linux system by checking the startup. Look for a line that says something about GPS and /dev/ttyUSB#
$ dmesg
Or even better, after connecting a gps mouse, BU-353, we look for a dmesg by running this command.
$ dmesg | grep tty
and get this response back.
[13616.095305] usb 2-3: pl2303 converter now attached to ttyUSB0

Add a script to start gpsd. I saved mine as startgps and set thet executeable attribute. Edit line 3 to match your device, ie /dev/ttyUSB0
#!/bin/sh
sudo killall gpsd
sudo gpsd -n -D 2 /dev/ttyUSB0
xgps -speedunits knots -l
Run the script:
$ ./startgps
I have tied this numerous time with no success
Thanks again
Steve
tebsin is offline   Reply With Quote
Old 02-07-2010, 14:51   #17
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Steve
See the line
Quote:
On Ubuntu 9.10 and later, that is really all you have to do.
Anything after this does not apply to you.No need for a script. This was only for earlier Ubuntus, where, due to a bug, gpsd didn't start automatically.

If xgps starts, gpsd is working, even if no data is visible.
I have seen this a few times, normally it is enough to pull the USB plug and connect again. Sometimes it helps to restart gpsd.
Quote:
$sudo killall gpsd
followed by
Quote:
$sudo /usr/sbin/gpsd -F /var/run/gpsd.sock -P /var/run/gpsd.pid
Then try again. Also, try different usb connectors.

I'm just trying to cover some simple things here. The questions Dave raises are still valid.

Thomas
cagney is offline   Reply With Quote
Old 02-07-2010, 15:33   #18
Registered User

Join Date: May 2010
Location: Cairns Nth Qld, Australia
Posts: 34
Did as requested

Thomas
I followed your procedures with still no luck, but I do have a couple of clues, when I start opencpn and set the NMEA data source to Network LIBGPS and open the Data stream window, randomly I get data, not all the time but just now and then, when i close the toolbox the data stops, If I open xgps again randomly I will get data but only for about 10 maybe 15 seconds and it says in data window under the main GPS circle '"class" "DEVICE","path""/dev/ttyUSB0.
I don't know if thats any help.
Thanks again
Steve
tebsin is offline   Reply With Quote
Old 03-07-2010, 03:23   #19
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Steve
Until you get going with xgps, it's not an OpenCPN "problem" as such.
You have gpsd going, Gpsd recognizes that a device is connected to /dev/ttyUSB0, but can't read any data from the device, that is how I read your info.
Did you use this gps-mouse with windows?
Did you fiddle with the "setup program" that comes with Haicom HI 204iii on win? If so, first reset it to default.
Do you have the opportunity to test the gps mouse now, on another computer, another Ubuntu box?

Thomas
cagney is offline   Reply With Quote
Old 03-07-2010, 10:02   #20
Registered User

Join Date: May 2010
Location: Cairns Nth Qld, Australia
Posts: 34
Maybe it's a hardware problem

Hi Thomas
I have come to the conclusion that it may well be a hardware problem, as I have done a fresh install of Ubuntu and Opencpn and the problem still exists.
Also you guys have guided me through the setup, with still no result, it worked perfectly on the same laptop using the same Usb GPS on XP and W7, I think I might do a complete format and reinstall one more time.
When I do get this thing happening I will post what was the cause here, thank you for your help anyway.
Rgards Steve
tebsin is offline   Reply With Quote
Old 03-07-2010, 14:17   #21
Registered User

Join Date: May 2010
Location: Cairns Nth Qld, Australia
Posts: 34
Update from my last

Hi
Hate to be the bearer of bad news, but I can safely say that the problem is not my computer or the GPS mouse, I installed Ubuntu on a different laptop, Hp pesario, then I loaded CM93, Opencpn and the required libwxgtk2.8-0, I then borrowed a USB mouse from the boat next to me in the marina, I then ran terminal and inserted $sudo killall gpsd enter, and ten $sudo /usr/sbin/gpsd -F /var/run/gpsd.sock -P /var/run/gpsd.pid, rebooted then i opened Opencpn, toolbox and NMEA data source, and guess what, exactly the same window came up, libgps can not be loaded, gpsd host is localhost.
I then uninstalled Opencpn and rebooted and then ran xgps, and it runs perfectly, so I have to conclude that the problem is in Opencpn or I am not installing it properly, which I think is very unlikely.
Could I suggest that someone might like to replicate this by installing the latest version of Ubutu and Opencpn and see if they have the same issues as me.

Thanks Steve
tebsin is offline   Reply With Quote
Old 03-07-2010, 15:29   #22
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
I was thinking of uploading an alternative package to opencpn.org for you to test, unfortunately I'm not able to do so for the moment, due to some problems with the site. Meanwhile, we could perhaps exclude another possibility. If you first un-install opencpn and then install libgps-dev
Quote:
sudo apt-get install libgps-dev
and then once again install opencpn and test.

Thomas
cagney is offline   Reply With Quote
Old 03-07-2010, 18:32   #23
Registered User

Join Date: May 2010
Location: Cairns Nth Qld, Australia
Posts: 34
update from my last

Hi Thomas
Did as you requested but then Opencpn would not load, then I again ran "sudo apt-get install libgps-dev" then Opencpn opened ok, but came up with in the data source window with "could not load libgps, because Opencpn requires libgps3.0"
You work that one out, its well beyond me.
Thanks Thomas
tebsin is offline   Reply With Quote
Old 03-07-2010, 19:35   #24
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
tebsin....

Is this the EXACT wording on the message?
Code:
libgps API Version mismatch.
Opencpn found version 3.0, but requires at least version 3.1
Dave
bdbcat is offline   Reply With Quote
Old 03-07-2010, 19:38   #25
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Thomas....

Maybe you could hack around this clause in nmea.cpp, and upload something for tebsin to try.... I would, except my Wifi is net good right now....

Code:
            if((check_version.proto_major >= 3) && (check_version.proto_minor >= 1))
            {
                  m_fn_gps_stream(m_gps_data, WATCH_ENABLE, NULL);
                  TimerLIBGPS.Start(TIMER_LIBGPS_MSEC,wxTIMER_CONTINUOUS);
            }
            else
            {
                  wxString msg;
                  msg.Printf(_("libgps API Version mismatch.\nOpencpn found version %d.%d, but requires at least version 3.1"), check_version.proto_major, check_version.proto_minor);
                  wxMessageDialog md(this, msg, _("OpenCPN Message"), wxICON_ERROR );
                  md.ShowModal();

                  m_fn_gps_close(m_gps_data);
                  m_gps_data = NULL;

                  return;
            }
Patch it be simply:
Code:
          {
                  m_fn_gps_stream(m_gps_data, WATCH_ENABLE, NULL);
                  TimerLIBGPS.Start(TIMER_LIBGPS_MSEC,wxTIMER_CONTINUOUS);
            }
Might not work, but it might. I think this may be another latent pickiness in libgps...

Thanks
Dave
bdbcat is offline   Reply With Quote
Old 03-07-2010, 19:54   #26
Registered User

Join Date: May 2010
Location: Cairns Nth Qld, Australia
Posts: 34
Yes I think that was it

I am 90% sure that was what came up on the NMEA DATA source, I tried reproducing it with out any success.
Thank Again for your kind help
Steve
tebsin is offline   Reply With Quote
Old 04-07-2010, 03:21   #27
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Dave & Steve
After some fiddling with my netbook and a rarely used website here is a link to download the package Dave suggested. Note to I was forced to stick a .doc extension on the .deb package. Just delete this extension.

Thomas
cagney is offline   Reply With Quote
Old 04-07-2010, 10:58   #28
Registered User

Join Date: May 2010
Location: Cairns Nth Qld, Australia
Posts: 34
Do I just install it as normal

Do I just install this as normal ? do I need the "libwxgtk2.8-0" installed as well ?
Regards Steve
tebsin is offline   Reply With Quote
Old 04-07-2010, 11:11   #29
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Quote:
Originally Posted by tebsin View Post
Do I just install this as normal ? do I need the "libwxgtk2.8-0" installed as well ?
Regards Steve
Affirmative on both. Just a normal package, with the same dependencies as before.
Thomas
cagney is offline   Reply With Quote
Old 04-07-2010, 12:07   #30
Registered User

Join Date: May 2010
Location: Cairns Nth Qld, Australia
Posts: 34
Hi Thomas
Installed as instructed, Intially it came up with Data in the NMEA source window on Network LIBGPS for about 10 sec, then the data froze, but it seems to be working ok on /dev/ttyUSB1 with AIS data on /dev/tty/USB0, I don't think it is working as intended but at least it is working, XGPS opened ok, but will only show AIS data only. If I disconnect AIS reboot, the GPS source is still USB1, If i rebuild the gps client base as in terminal, it tries to connect to USB0 but disconnects and reconnects on USB1, I tried swapping over the USB leads to no avail, very strange.

Thanks heaps to you guys for helping me.
Steve
tebsin is offline   Reply With Quote
Reply

Tags
ais


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
OpenCPN Linux / Ubuntu Issues and Questions yachtmanforfun OpenCPN 65 24-01-2018 08:06
Ubuntu 10.4 and OpenCPN cagney OpenCPN 24 07-01-2011 12:16
Garmin 60CSx and Ubuntu with Kernel 2.6.31-20-Generic - Solution ? amadeus OpenCPN 37 30-07-2010 14:44
Raymarine Bi-Data Transducer Problems off-the-grid Marine Electronics 1 12-05-2010 16:06
LIGHTNING - Some new data. Swinger5000 General Sailing Forum 17 17-12-2004 16:44

Advertise Here


All times are GMT -7. The time now is 23:43.


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.