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 29-01-2020, 04:18   #1
Registered User

Join Date: Jan 2020
Location: Göteborg
Posts: 4
OpenCPN (Linux version) cannot receive GPS data

I have used the Windows version of OpenCPN for many years and now want to try the Linux version.

Linux and OpenCPN installations were carried out without any problems.
I have followed the setup in the OpenCPN user manual.
The HW (HP Laptop and Asus Eeebox) have also been used for the OpenCPN Windows version without any problem.
My problem is that OpenCPN for Linux don’t receive GPS (NMEA) data.

SW:
Ubuntu 18.04.3 LTS (Bionic Beaver)
OpenCPN 4.99.1508
gpsd 3-17-5

HW:
GPS: Global Sat BU-353S4 (USB)
HP EliteBook 840 G3
Asus EB1033 (Eeebox)

What I have done/tested:
With Terminal window verified that gps data i received:
$ stty -F /dev/ttyUSB0 ispeed 4800 && cat </dev/ttyUSB0
Also checked that gpsd is working:
$ ps aux | grep gpsd

Network (gpsd):
- OpenCPN setup (Connections): Network - GPSD - localhost - Port 2947
- In OpenCPN no data is displayed in the NMEA Debug Window.
Serial:
- Killed the gpsd application
- Checked that user belong to the dialout group
- OpenCPN setup (Connections): Serial - NMEA 0183 - /dev/ttyUSB0/ 4800 baud
- Get KERNAL warning.
- Added requested file /etc/udev/rules.d/70-opencpn.rules
- Still no data displayed in the NMEA Debug Window.
branno is offline   Reply With Quote
Old 29-01-2020, 10:27   #2
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: OpenCPN (Linux version) cannot receive GPS data

The only reason to use gpsd is if you need to run another gpsd client at the same time as OpenCPN.
I have not used gpsd for years, and doing a quick test , I can not get it to work either.
Of course this needs sorting out, but I definitely recommend using a direct connection.

Your test probably did not work because gpsd already occupied /dev/ttyUSB0.
You should have changed to /dev/ttyUSB1.....

Once you have plugged in the gps, run
Quote:
dmesg | grep tty
and you will see what port is connected.

Ubuntu has changed over the past few years. Years ago you had to uninstall gpsd if you did not use it. Currently on my 19.10 that is not the case.
I can't say how it works on 18.04, in this regard, right now.

Thomas
cagney is offline   Reply With Quote
Old 29-01-2020, 12:56   #3
Registered User

Join Date: Jan 2020
Location: Göteborg
Posts: 4
Re: OpenCPN (Linux version) cannot receive GPS data

Thanks for quick reply!
It seems that the gps is connected via USB0 anyway:
[ 0.292649] printk: console [tty0] enabled
[ 9.417873] usb 3-1: pl2303 converter now attached to ttyUSB0

Still no gps data to Open CPN.
How about the KERNEL warning and the rules.d file I added? Do I need it?
branno is offline   Reply With Quote
Old 29-01-2020, 13:45   #4
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: OpenCPN (Linux version) cannot receive GPS data

You have the connection
Quote:
- OpenCPN setup (Connections): Serial - NMEA 0183 - /dev/ttyUSB0/ 4800 baud
Hopefully this is the only enabled connection.

Do you have any other programs running that uses the gps? If so - kill them.

Try uninstalling gpsd. Restart.

The udev rules are for persistent connections. Not really necessary in a simple case like this.

Quote:
- Added requested file /etc/udev/rules.d/70-opencpn.rules
What is the content of this file?

Quote:
How about the KERNEL warning
What was the content of the warning?

Thomas

PS
Please upgrade to OpenCPN version 5.0, so that we know that we are on the same page.
cagney is offline   Reply With Quote
Old 30-01-2020, 04:26   #5
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: OpenCPN (Linux version) cannot receive GPS data

Regarding gpsd. I come as far as you, and note that gpsd restarts automatically
if killed. But as "cgps" ( or xgps) shows no data the problem is not with OpenCPN.
It may be a problem with the Ubuntu Udev Hotplug rules.
https://gpsd.gitlab.io/gpsd/troubleshooting.html

Use the direct connect option!

Thomas
cagney is offline   Reply With Quote
Old 30-01-2020, 04:59   #6
Registered User

Join Date: Aug 2016
Location: Stockholm, Sweden
Posts: 289
Re: OpenCPN (Linux version) cannot receive GPS data

branno, using udev rules could be an advantage as it allows for distinct naming of e.g. GPS or other devices connected to the USB ports. It may otherwise happen that the 'ttyUSB'-number varies due to recognition order.

Look at this, all under Unix:
Connect the device and use the 'lsusb' command, it will display (as for my GPS) something like: Bus 005 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
The section ' 067b:2303' is the important one, it tells the vendor and product ID's.
Now do ''dmesg | grep usb', it will display that the device is connected to a 'ttyUSB'-port, this assuming there is a suitable kernel module loaded.
Disconnect the GPS and edit the udev rules, e.g. using 'sudo vi /etc/udev/rules.d/99-gps.rules' (or whatever editor you prefer) and add the line:

KERNEL=="ttyUSB*", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", GROUP="adm", SYMLINK+="ttyGPS", MODE="0666"

You recognize the GPS ID-numbers from the 'lsbusb' and the line should be self-explonatory.
Now connect the GPS again and do a 'ls -la /dev/tty*', you will find the GPS both as a symlink and under the autodetected name as the GPS will now (also) show up as 'ttyGPS'. You may now connect to '/dev/ttyGPS' in OpenCPN and that name will then never change.

/Lennart
LennartG is offline   Reply With Quote
Old 30-01-2020, 05:43   #7
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: OpenCPN (Linux version) cannot receive GPS data

Quote:
Originally Posted by LennartG View Post
branno, using udev rules could be an advantage as it allows for distinct naming of e.g. GPS or other devices connected to the USB ports. It may otherwise happen that the 'ttyUSB'-number varies due to recognition order.
Also, Openplotter does all that for you, in the 'serial' app. And will set up the input into signalk for you with the click of a mouse >

conachair is offline   Reply With Quote
Old 30-01-2020, 05:49   #8
Registered User

Join Date: Aug 2016
Location: Stockholm, Sweden
Posts: 289
Re: OpenCPN (Linux version) cannot receive GPS data

That's nice but I got the impression he is running Ubuntu 18.04 and then openplotter is another platform, right?
LennartG is offline   Reply With Quote
Old 30-01-2020, 06:11   #9
Registered User

Join Date: Oct 2014
Location: Netherlands
Boat: Halmatic 30
Posts: 1,159
Re: OpenCPN (Linux version) cannot receive GPS data

Quote:
Originally Posted by LennartG View Post
That's nice but I got the impression he is running Ubuntu 18.04 and then openplotter is another platform, right?
The OpenPlotter add-ons running also in other Linux systems and work just the same.

But you must of course install the SignalK server.

Here running the OpenPlotter applications on my Linux Mint Tricia AMD64.

The OpenCPN with direct input from SignalK is allready running here.

Bram
verkerkbr is offline   Reply With Quote
Old 30-01-2020, 06:15   #10
Registered User

Join Date: Aug 2016
Location: Stockholm, Sweden
Posts: 289
Re: OpenCPN (Linux version) cannot receive GPS data

This is spinning off-track. The user had a problem connecting a GPS, not connecting openplotter add-ons onto Linux systems.
LennartG is offline   Reply With Quote
Old 30-01-2020, 06:22   #11
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 18,094
Images: 2
Re: OpenCPN (Linux version) cannot receive GPS data

Guys, do the instructions for connecting gps in linux need update and or additional detail?
rgleason is online now   Reply With Quote
Old 30-01-2020, 06:25   #12
Registered User

Join Date: Oct 2014
Location: Netherlands
Boat: Halmatic 30
Posts: 1,159
Re: OpenCPN (Linux version) cannot receive GPS data

My remarks are about the information from Conachair. OpenPlotter runs in Linux systems and have an easy way to add a serial device.

I don't see a problem with direct input in OpenCPN if there is only one nmea talker on the line.

OpenPlotter indicates the usb serial automatic.
verkerkbr is offline   Reply With Quote
Old 30-01-2020, 06:27   #13
Registered User

Join Date: Aug 2016
Location: Stockholm, Sweden
Posts: 289
Re: OpenCPN (Linux version) cannot receive GPS data

Rick, what I added above could be a useful addition or comment as it ensures the name used in OpenCPN will be consistent.
Can't tell if the same can be applied to Windows, haven't used Windows in a decade or more, but assume something similar can be found there
/Lennart
LennartG is offline   Reply With Quote
Old 30-01-2020, 06:32   #14
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: OpenCPN (Linux version) cannot receive GPS data

Quote:
Originally Posted by LennartG View Post
That's nice but I got the impression he is running Ubuntu 18.04 and then openplotter is another platform, right?
Ooopps, wrong thread... though the openplotter deb can be run on any linux, not sure if the serial will work for sure though.
conachair is offline   Reply With Quote
Old 30-01-2020, 10:06   #15
Registered User

Join Date: Jan 2020
Location: Göteborg
Posts: 4
Re: OpenCPN (Linux version) cannot receive GPS data

Since I am completely new to Linux, I think the first step is to understand why I do not have the latest Linux version of OpenCPN (5.0?).

I installed OpenCPN from the “Ubunto Software” application.

Then I executed:
sudo add-apt-repository ppapencpn/opencpn
sudo apt-get update
and updates (even OpenCPn) seemed to be downloaded correct.

In the Software&Updates application (Other Software) I can see:
http://ppa/launchpad.net/opencpn/opencpn/ubuntu bionic main
http://ppa/launchpad.net/opencpn/opencpn/ubuntu bionic main (Source Code)

When I then start open OpenCPN I still have 4.99.1508

I have Ubunto 18.04.3 LTS. Shall I try with a later version?

/Ralf
branno is offline   Reply With Quote
Reply

Tags
enc, gps, linux, opencpn

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Linux Mint 18.2 - cannot install from instructions on launchpad jafa OpenCPN 10 16-08-2019 08:58
cannot get Google earth running on version 3.2 OpenCPN On Vista Robin3 OpenCPN 13 21-01-2014 16:18
OpenCPN Fails to Receive Bluetooth Data Feed haydude OpenCPN 83 20-05-2012 05:19
Linux Version gpsd Selection for GPS Port sdowney717 OpenCPN 3 30-08-2011 11:02

Advertise Here


All times are GMT -7. The time now is 08:38.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.