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 31-01-2011, 07:07   #1
Registered User

Join Date: Jan 2011
Location: France
Boat: Several boat rented for weeks
Posts: 9
OpenCPN and gpsd 2.95 (Revision 2010-11-02T15:45:01)

Hello,

I'm working under OpenSuse Linux 11.3 64bits with a serial over USB GPS antenna (Evermore SA-320 USB) that is working fine with gpsd and cgps in NMEA mode.

My version of OpenCPN is 2.3.1 compiled from source (using git), with gpsd-devel option.

I've wasted a lot of time to understand that to make the "Network LIBGPS" option available, I've to install gpsd-devel. So finally it works.

Now, my problem is that when I launch OpenCPN it randomly connect to GPSD without error message (if GPSD is not launched I get an error message), and after a certain number of try (with changing from "None" option to "Network LIBGPS) I can get again gps data display.

Is anybody know some workaround about this ?
cray is offline   Reply With Quote
Old 01-02-2011, 11:22   #2
Registered User

Join Date: Jan 2011
Location: France
Boat: Several boat rented for weeks
Posts: 9
From time to time, it's working fine

So, just a picture that show OpenCPN is working good from time to time, but only from time to time ....

Attached Thumbnails
Click image for larger version

Name:	libopencpngood.png
Views:	1187
Size:	99.7 KB
ID:	23404  
cray is offline   Reply With Quote
Old 03-02-2011, 11:28   #3
Registered User

Join Date: Jan 2011
Location: France
Boat: Several boat rented for weeks
Posts: 9
Tcpdump out

More information about my investigation :

When I launch OpenCPN while tcpdump is running the out is like this :

o.{"class":"SKY","tag":"GSV","device":"/dev/ttyUSB0","xdop":1.51,"ydop":0.97,"vdop":2.38,"tdop ":1.99,"hdop":1.80,"gdop":3.58,"pdop":2.98,"satell ites":[{"PRN":5,"el":55,"az":199,"ss":45,"used":true},{"P RN":8,"el":53,"az":55,"ss":44,"used":true},{"PRN": 26,"el":69,"az":308,"ss":43,"used":true},{"PRN":28 ,"el":49,"az":118,"ss":51,"used":true},{"PRN":7,"e l":20,"az":58,"ss":50,"used":true},{"PRN":10,"el": 17,"az":161,"ss":0,"used":false},{"PRN":15,"el":27 ,"az":291,"ss":0,"used":false},{"PRN":21,"el":13," az":308,"ss":0,"used":false},{"PRN":27,"el":19,"az ":242,"ss":0,"used":false},{"PRN":33,"el":31,"az": 203,"ss":43,"used":true}]}

20:18:40.116791 IP6 localhost.32990 > localhost.gpsd: Flags [.], ack 13017, win 386, options [nop,nop,TS val 34239072 ecr 34239072], length 0

So gpsd is working, but OpenCPN seems to not be able to display data. But it's listening on data and connect to gpsd.




cray is offline   Reply With Quote
Old 03-02-2011, 12:49   #4
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
How is your gps working if you kill gpsd and do a direct connection via /dev/ttyUSB0 ?

Thomas
cagney is offline   Reply With Quote
Old 03-02-2011, 13:13   #5
Registered User

Join Date: Jan 2011
Location: France
Boat: Several boat rented for weeks
Posts: 9
I've tried this way, but it doesn't work. Anything to test via direct connection ?

Yann
cray is offline   Reply With Quote
Old 03-02-2011, 13:27   #6
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Quote:
Originally Posted by cray View Post
I've tried this way, but it doesn't work. Anything to test via direct connection ?

Yann
I have tried to find what chip is in your gps, but I fail to find out. Do you know.
Have you read this Setting Up GPS | Official OpenCPN Homepage?

When trying a direct connection, is there anything in your "NMEA data stream window" ?
If you only see binary garbage, try to reset your gps to NMEA mode.

Thomas
cagney is offline   Reply With Quote
Old 04-02-2011, 11:41   #7
Registered User

Join Date: Jan 2011
Location: France
Boat: Several boat rented for weeks
Posts: 9
Some more test

Hello,

Yes I've read and read again this page .... (and all the help)

After plugged in the gps receiver (dmesg out) :

[ 9023.522098] usb 4-1: new full speed USB device using uhci_hcd and address 2
[ 9023.675140] usb 4-1: New USB device found, idVendor=10c4, idProduct=ea60
[ 9023.675147] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 9023.675153] usb 4-1: Product: CP2102 USB to UART Bridge Controller
[ 9023.675157] usb 4-1: Manufacturer: Silicon Labs
[ 9023.675162] usb 4-1: SerialNumber: 0001
[ 9024.035920] usbcore: registered new interface driver usbserial
[ 9024.035938] USB Serial support registered for generic
[ 9024.035989] usbcore: registered new interface driver usbserial_generic
[ 9024.035992] usbserial: USB Serial Driver core
[ 9024.046558] USB Serial support registered for cp210x
[ 9024.046596] cp210x 4-1:1.0: cp210x converter detected
[ 9024.199089] usb 4-1: reset full speed USB device using uhci_hcd and address 2
[ 9024.334426] usb 4-1: cp210x converter now attached to ttyUSB0
[ 9024.334465] usbcore: registered new interface driver cp210x
[ 9024.334469] cp210x: v0.09:Silicon Labs CP210x RS232 serial adaptor driver

lsusb out :
Bus 004 Device 002: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x Composite Device

Now I launch OpenCPN, so it complain that gpsd is not running, and choose /dev/ttyUSB0 from NMEA data source and activate the NMEA data dump windows.

But nothing is displayed, not the position, nor the NMEA data dump in the windows that is untitled "/dev/ttyUSB0".

I'm very disapointed ... because I think that OpenCPN is a very very good work.

Yann
cray is offline   Reply With Quote
Old 04-02-2011, 12:38   #8
Registered User

Join Date: Jan 2011
Location: France
Boat: Several boat rented for weeks
Posts: 9
xgps running fine, but not OpenCPN

Attached Thumbnails
Click image for larger version

Name:	xgps.png
Views:	984
Size:	52.7 KB
ID:	23491  
cray is offline   Reply With Quote
Old 04-02-2011, 14:28   #9
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Yann
Please attach your ~opencpn.log
Thomas
cagney is offline   Reply With Quote
Old 05-02-2011, 00:35   #10
Registered User

Join Date: Jan 2011
Location: France
Boat: Several boat rented for weeks
Posts: 9
OpenCPN log file

Hello,

Thanks a lot for your help. Opencpn.log is attached. Please rename it as .txt .

Yann
Attached Files
File Type: doc opencpn-log.doc (34.9 KB, 100 views)
cray is offline   Reply With Quote
Old 05-02-2011, 02:44   #11
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Yann
Thanks for the log file.
Two things caught my eye. You have a later version of gpsd and libgps than what is currently used on Ubuntu 10.10. This probably doesn't mean a thing, but maybe....
When you tried a direct connection you probably did not kill gpsd first.
Quote:
21:08:24: NMEA input device open failed: /dev/ttyUSB0
This most likely means that gpsd is blocking /dev/ttyUSB0.
To try again first
Quote:
#killall gpsd
The direct connection should work. Something should come up in the data stream window if a connection is established.

Back to gpsd. First if xgps works so should OpenCPN. If you read this bug report:
FS#221 : OpenCPN and GPSD you will find out that we have been through similar bugs before.
It is possible that the code still isn't right.
If I understand you correctly gps works on OpenCPN sometimes?
When it works....do you have any other problems.
Is there a scenario, that you can repeat, when OpenCPN can't connect to gpsd?
What are your results, if you try similar tests, as I did in the bug report?

Nice to have a Suse user here, by the way. Perhaps this could be the start of a dedicated Suse rpm package

Thomas
cagney is offline   Reply With Quote
Old 12-02-2011, 06:22   #12
Registered User

Join Date: Jan 2011
Location: France
Boat: Several boat rented for weeks
Posts: 9
And all is working good now

Hello,

Here is the solution :

cray@linux-495g:~$ ls -l /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 févr. 12 15:07 /dev/ttyUSB0

So, we can see that the virtual tty that is linked to the gps device is owned by root and dialout group, so I've just added my user to the dialout device that and all is working fine.

I've got the idea to verify this right issue because I've launched OpenCPN with the root user and all was became to run with my GPS.


Here is a screen capture where we can see that gps is working, and now I know where I live :




Mr cagney thanks a lot for your help and attention, and sorry for my later answer but I was very busy this week ;-)
Attached Thumbnails
Click image for larger version

Name:	opencpn-gps-ok.png
Views:	1006
Size:	119.1 KB
ID:	23709  
cray is offline   Reply With Quote
Old 12-02-2011, 10:28   #13
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Cray
I'm happy you found the problem.
In Ubuntu the user is automatically added to the "dialout" group.
So, it is one of these small differences between Linux distros.
I'll make a note about this in the wiki text.

Thomas
cagney 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
OpenCPN - Fedora 14 - GPSD michaeld OpenCPN 9 30-08-2011 08:44
Setup Ubuntu GPSd/GPSLib, AIS and Other NMEA Data bluearcus OpenCPN 8 31-08-2010 02:50
AIS Under gpsd Seaspray OpenCPN 0 20-07-2010 08:59
GPSD to Remove D-BUS Support in Favor of GeoClue antonm OpenCPN 4 24-03-2010 04:50
OpenCPN bdbcat OpenCPN 1343 19-09-2009 15:59

Advertise Here


All times are GMT -7. The time now is 17:16.


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.