Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 20-05-2013, 05:50   #1
Registered User

Join Date: May 2013
Location: UK - South East
Boat: Beneteau Oceanis 393
Posts: 26
OpenCPN serialUSB Ubuntu 12.04

I've recently started using OpenCPN under Ubuntu 12.04 connecting through a USB-serial connection at 38400 through an ark3116 attached to ttyUSB0.
Data coming from a NASA AIS engine (version3).

I've been through the usual problems getting this going, inserting the correct vendor and product codes and adding myself to the dialout user group.

The problem I'm having is that the connection only seems to work after unplugging the usb and reconnecting it a number of times.

The device is clearly recognised as attached to ttyUSB0 (with dmesg) and can also be seen with ls- al /dev/ttyUSB0 showing dialout in the list.

Start up OpenCPN, selecting connections and the port ttyUSB0 is sometimes selectable, sometimes not. I always have to reselect the port.
Opening up the nmea data window shows nothing happening.

I now have to unplug the USB, wait a few seconds and then re-insert it, wait a few seconds, sometimes having to do this upto 10 times before data starts to appear. I have found that disconnecting the rs232 side before re-inserting the USB seems to have a greater chance of success.

Once the data comes through everything works reliably for many hours.

I'm probably missing something but I don't understand the intermittent nature of this which is really annoying when on a passage.

I would be grateful if anyone could give me a pointer to a reliable set-up method that didn't require so many unplug/plug operations which can ultimately lead to connector problems.
__________________

__________________
silentwings39 is offline   Reply With Quote
Old 20-05-2013, 06:35   #2
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,020
Re: OpenCPN serialUSB Ubuntu 12.04

silentwings39...
First make sure that the data actually is coming from the port with eg. minicom.
My personal answer to all prolific/ark/whatever problems is called FTDI, never had a problem with USB/UART converters with their chip. On Linux I actually never had a problem with any converter, but it might be plain luck...

Pavel
__________________

__________________
nohal is online now   Reply With Quote
Old 20-05-2013, 07:37   #3
Registered User

Join Date: May 2013
Location: UK - South East
Boat: Beneteau Oceanis 393
Posts: 26
Re: OpenCPN serialUSB Ubuntu 12.04

Thanks for the reply Pavel.
Data is coming from the port, sometimes. For some reason I have to unplug the USB and then re-insert it - a number of times before it streams, although on all occasions it is clearly there as "ls- al /dev/ttyUSB0" shows.
I have not used minicom but have used "screen" which sometimes shows the port is busy for some reason but I don't know how to free it.

What I would like is someway of configuring it such that OpenCPN can instantly access it.
__________________
silentwings39 is offline   Reply With Quote
Old 20-05-2013, 08:13   #4
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,020
Re: OpenCPN serialUSB Ubuntu 12.04

Do you have gpsd installed? Let aside that you should and it's the preferred way to access the data on Linux and you should use GPSD as the data source. If you do, Ubuntu is probably starting it automatically so you are not able to open the port with another application. Might be that sometimes you are faster than GPSD in acquiring the port during your disconnects/reconnect.

Pavel
__________________
nohal is online now   Reply With Quote
Old 20-05-2013, 09:12   #5
Registered User

Join Date: May 2013
Location: UK - South East
Boat: Beneteau Oceanis 393
Posts: 26
Re: OpenCPN serialUSB Ubuntu 12.04

Hi Pavel,
I don't have GPSD installed to my knowledge, I may be missing something but I don't have a dedicated GPS receiver on the laptop.
I have my GPS NMEA data connected to my AIS receiver (NASA AIS Engine) which then outputs the GPS data together with the received AIS messages at 38400 which I have coming into my serial-USB adapter.

What I have noticed after a little experimentation is that from a fresh system boot dmesg shows a few messages containing-
usb 3-1: ark3116: don't know how to do software flow control

starting minicom shows nothing.

If I unplug the usb-serial adapter then re-insert it dmesg shows:-
[ 404.408202] usb 3-1: USB disconnect, device number 2
[ 404.408803] ark3116 ttyUSB0: ark3116 converter now disconnected from ttyUSB0
[ 404.408905] ark3116 3-1:1.0: device disconnected
[ 407.696147] usb 3-1: new full-speed USB device number 3 using uhci_hcd
[ 407.860576] ark3116 3-1:1.0: ark3116 converter detected
[ 407.871203] usb 3-1: ark3116 using RS232 mode
[ 407.871687] usb 3-1: ark3116 converter now attached to ttyUSB0

Starting minicom again comes up with jibberish (like a binary file).
If I now unplug the USB and re-insert it while minicom is running, then minicom starts reporting valid data.

It seems that each time the usb is unplugged and re-inserted the same thing happens unless minicom is running at the time.

I'm still confused.
__________________
silentwings39 is offline   Reply With Quote
Old 20-05-2013, 09:17   #6
Registered User

Join Date: May 2013
Location: UK - South East
Boat: Beneteau Oceanis 393
Posts: 26
Re: OpenCPN serialUSB Ubuntu 12.04

For information I also have a Raymarine C80 on board which receives the AIS data from the NASA AIS engine which correctly displays the AIS data on the C80.
The GPS data for my C80 comes from a dedicated Seatalk GPS receiver.

I also have a back-up GPS receiver (old Navman NMEA) which provides position info for my DSC radio and also the AIS receiver.

Having sailed for many years I have discovered that having separate back-up systems is essential.
__________________
silentwings39 is offline   Reply With Quote
Old 21-05-2013, 02:19   #7
Registered User

Join Date: May 2013
Location: UK - South East
Boat: Beneteau Oceanis 393
Posts: 26
Re: OpenCPN serialUSB Ubuntu 12.04

Here's what I've found.

Fresh start from boot up with the USB serial plugged in and the AIS data running.
1. Start OpenCPN
2. Enter connections, select the previously present ttyUSB0 entry.
3. Click OK.
4. Unplug the USB serial and re-insert.
5. Wait about 5 seconds, if no data repeat step 4 (usually works after 2nd insert).

This is exactly what I found was needed to establish a reliable stream with minicom and seems to be repeatable.

It's obviously a problem with my set-up, whether this is inherent to Ubuntu 12.04 I don't know. I've seen reports of other people having serialUSB problems with 12.04 that were OK with some previous version.

OK so it's not a problem with OpenCPN itself, I never really thought it was.

I'm sure there must be something missing to correctly set-up my serialUSB.
I just wish I could overcome this by putting some commands in a startup file or something.

I did try adding "usbserial vendor=0x6547 product=0x0232" into my /etc/modules file but this seemed to prevent any comms at all, so I removed it.

Any help would be appreciated.
__________________
silentwings39 is offline   Reply With Quote
Old 21-05-2013, 06:45   #8
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,020
Re: OpenCPN serialUSB Ubuntu 12.04

silentwings39...
As I wrote in my first post, I would get a cable with an FTDI chip as it never failed me over the years.
If this is a problem specific to Precise, try different kernel version or try to boot another live CD and check if the same problem appears there. The cause for this can be about a zillion things.

Pavel
__________________
nohal is online now   Reply With Quote
Old 21-05-2013, 10:39   #9
Registered User

Join Date: May 2013
Location: UK - South East
Boat: Beneteau Oceanis 393
Posts: 26
Re: OpenCPN serialUSB Ubuntu 12.04

Hi Pavel,
May give that a try when we get back home. We're on tour at the moment sailing slowly around the UK. Just thought there might be a simple fix.
Many thanks
__________________
silentwings39 is offline   Reply With Quote
Old 23-05-2013, 04:13   #10
Registered User

Join Date: Jul 2010
Location: Monastir, Tunisia
Boat: Amel Sharki
Posts: 1,778
Re: OpenCPN serialUSB Ubuntu 12.04

Quote:
Originally Posted by nohal View Post
silentwings39...
As I wrote in my first post, I would get a cable with an FTDI chip as it never failed me over the years.
If this is a problem specific to Precise, try different kernel version or try to boot another live CD and check if the same problem appears there. The cause for this can be about a zillion things.

Pavel
Pavel,
do you know any USB GPS mouse with a FTDI chip inside?
I recently changed a computer for a harbour neighbor from Win8 to Ubuntu because his mouse (Prolific) doesn't work with Win8. Works well now with Ubuntu. But I want to give advices to people which GPS mouse to buy.
Gerhard
__________________
CarCode is offline   Reply With Quote
Old 23-05-2013, 05:38   #11
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,020
Re: OpenCPN serialUSB Ubuntu 12.04

Gerhard...
As far as pucks go I was always buying Navilock NL-402U while in Europe. Always worked well but I have never tried them with W8. Now there's 602U available, but haven't used that. For USB-Serial anything from eBay that says FTDI and throw it away if it does not work...

Pavel
__________________
nohal is online now   Reply With Quote
Old 23-05-2013, 07:45   #12
Registered User

Join Date: Jul 2010
Location: Monastir, Tunisia
Boat: Amel Sharki
Posts: 1,778
Re: OpenCPN serialUSB Ubuntu 12.04

Pavel,
your suggestions all works with Prolific and with older chipsets doesn't work with Win8 as also the Prolific website says.
I need an advice for a puck with real FTDI chip. FTDI chips are some Cents more expensive than Prolific and so puck manufacturers don't use them I guess.
Gerhard
__________________
CarCode is offline   Reply With Quote
Old 23-05-2013, 08:08   #13
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,020
Re: OpenCPN serialUSB Ubuntu 12.04

Gerhard...
Navilock explicitly states W8 compatibility, so I'm a bit confused. But I've never used W8 so really can't say if they lie or not... The only one I can say has FTDI integrated for sure is EZ-GPS – USB GPS Dongle | Inventek Systems

Pavel
__________________
nohal is online now   Reply With Quote
Old 23-05-2013, 08:26   #14
Registered User

Join Date: Jul 2010
Location: Monastir, Tunisia
Boat: Amel Sharki
Posts: 1,778
Re: OpenCPN serialUSB Ubuntu 12.04

Pavel,
if they use the latest Prolific chip then the driver is Win8 compliant. But most people wants to use their old pucks and Prolific doesn't produce an update for the old driver.
Good hint for the EZ-GPS, thanks. FTDI is a good and reliable british company and I have used their chips in my former company for a long time.
Gerhard
__________________

__________________
CarCode is offline   Reply With Quote
Reply

Tags
opencpn

Thread Tools
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




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 22:32.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.