Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 11-04-2011, 07:27   #1
Registered User
 
Tia Bu's Avatar

Join Date: Jul 2009
Location: South Carolina
Boat: 40' Jeanneau
Posts: 454
AIS installation- Open CPN and Ubuntu

I'm running Open CPN on a Dell notebook with Ubuntu Linux. I use a USB GPS puck. It all runs great. This weekend, I tried to hook up a used Nobletec 100 AIS receiver via the 9-pin serial port. I couldn't get it to work.

I'm beginning to think the problem might be in the baud rates of the two NMEA streams. The GPS transmits at 4800 baud. When I click on the "GPS" tab of the "Tools" menu in Open CPN, I can then open up the NMEA data stream box and see data streaming in from the GPS. When I unplug the GPS and leave the AIS receiver plugged in, no data streams through the window.

I know that the AIS receiver transmits data at 38,400 baud. As far as I can see, there is no window available in Open CPN to see the AIS NMEA data stream. Or would that data appear in the same window as the GPS data stream if I had it all set up correctly? Do I need to change the settings of the serial port in Linux? If so, how would I do that? (Of course, it's possible this receiver isn't transmitting data, but I can't find a way to confirm or deny this at this point.)

In the "GPS" tab in Open CPN, when I look at ports available, I see three COM ports (they're called something like "tty" in Linux). I also see a "tty" port that ends in "usb" (this is the one that the GPS works on). I also see a "shared AIS/GPS port" selection.

In the "AIS" tab, I only see the three COM ports listed. The USB port and the shared AIS/GPS port don't show up.

Does this make any sense to those of you who know the inner workings of the Open CPN program? Am I doing something wrong?

Ideas for a fix?

Thanks in advance.
__________________

__________________
Tia Bu is offline   Reply With Quote
Old 11-04-2011, 23:10   #2
Registered User

Join Date: Mar 2010
Location: Göteborg, Sweden
Boat: Seamaster 700
Posts: 96
Send a message via Skype™ to balp
Re: AIS installation- Open CPN and Ubuntu

Quote:
Originally Posted by Tia Bu View Post
I know that the AIS receiver transmits data at 38,400 baud. As far as I can see, there is no window available in Open CPN to see the AIS NMEA data stream.
On linux i only used OpenCPN against gpsd my self, for confuguring the serial port there is an command line utility setserial that can fix this outside opencpn.

sudo apt-get install setserial

to install on ubuntu/debian.

Maybe that can help you.
__________________

__________________
balp is offline   Reply With Quote
Old 12-04-2011, 08:04   #3
Registered User
 
Tia Bu's Avatar

Join Date: Jul 2009
Location: South Carolina
Boat: 40' Jeanneau
Posts: 454
Re: AIS installation- Open CPN and Ubuntu

That helps some. Thanks. Does anyone out there know if the AIS NMEA data and the GPS NMEA data have to come in to Open CPN through the same port?

Do they have to come in at the same baud rate?

Or can one come in through USB and the other through a serial port at different baud rates?

If they can come in through different ports, is there some way to see the AIS data stream in Open CPN or Ubuntu?
__________________
Tia Bu is offline   Reply With Quote
Old 12-04-2011, 11:51   #4
Registered User

Join Date: Mar 2010
Location: Normandy, France
Boat: Flush Poker, 8.25m (Point Barre)
Posts: 335
Re: AIS installation- Open CPN and Ubuntu

I'm using Fedora with a USB for AIS+GPS.

So my settings are:
- GPS > NMEA Options > NMEA Data Source = AIS Port (Shared)
- AIS > AIS General > AIS Data Port = /dev/ttyUSB0

There's never any "AIS shared" port in AIS settings. If your GPS comes with AIS input, you select that port into AIS settings and your select "AIS Shared" in GPS settings as described above.

If I understand your configuration,
- you've GPS coming from USB so the setting should be /dev/ttyUSBxx
- you've AIS coming from 9 pin COM port so the setting should be /dev/ttySxx
(xx being 0, 1 ore more depending on your hardware)

It should work without changing any setting for the COM port (with setserial)
Check opencpn log to see if the device opening failed.

PS : Even if the device is not listed in the drop down list, you can use whatever dev is appropriate for you, just type in the device full path: eg. /dev/ttyS6
__________________
SethDart is offline   Reply With Quote
Old 12-04-2011, 12:53   #5
Registered User
 
Tia Bu's Avatar

Join Date: Jul 2009
Location: South Carolina
Boat: 40' Jeanneau
Posts: 454
Re: AIS installation- Open CPN and Ubuntu

Many thanks.

I take it from your response that there is no way to see the AIS data stream in real time? I just tried opening my opencpn.log file, but the data there seems to be a couple of months old.
__________________
Tia Bu is offline   Reply With Quote
Old 12-04-2011, 15:00   #6
Registered User
 
Tia Bu's Avatar

Join Date: Jul 2009
Location: South Carolina
Boat: 40' Jeanneau
Posts: 454
Re: AIS installation- Open CPN and Ubuntu

Well, I'll try to answer my own question, since this forum is kind of the help desk for Open CPN, and maybe this will be of use to someone else later.

Is the Linux command "cat dev/tty##" a way to see the AIS data stream coming in through nine-pin serial port, where "##" is the number of the port?

I haven't gotten back to the Linux machine to try it yet.
__________________
Tia Bu is offline   Reply With Quote
Old 12-04-2011, 15:18   #7
mrm
Registered User

Join Date: Feb 2011
Location: Poland, EU
Boat: crew on Bavaria 38 Cruiser
Posts: 651
Re: AIS installation- Open CPN and Ubuntu

Quote:
Originally Posted by Tia Bu View Post
Well, I'll try to answer my own question, since this forum is kind of the help desk for Open CPN, and maybe this will be of use to someone else later.

Is the Linux command "cat dev/tty##" a way to see the AIS data stream coming in through nine-pin serial port, where "##" is the number of the port?

I haven't gotten back to the Linux machine to try it yet.
I believe I have seen this cat /dev/ttyXX method mentioned on OpenCPN web page somewhere, but, if you would like a bit more comfort, install Minicom package. It will give you a nicer interface to see what is transmitted on serial links.
__________________
mrm is offline   Reply With Quote
Old 12-04-2011, 17:12   #8
Registered User

Join Date: Mar 2010
Location: Normandy, France
Boat: Flush Poker, 8.25m (Point Barre)
Posts: 335
View in real time

"cat" doesn't work for a device, only for files. You shall use minicom.

First, install minicom

Code:
~$ sudo apt-get install minicom


Then run it

Code:
~$ minicom -s
Select "Serial port setup"
Change "Serial device" to /dev/ttyUSBxx or /dev/ttySxx, hit enter, and enter again
Select "Exit" - hit enter

Now you shall see output from your COM/USB port.


To exit, hit Ctrl-A then X
__________________
SethDart is offline   Reply With Quote
Old 13-04-2011, 08:45   #9
mrm
Registered User

Join Date: Feb 2011
Location: Poland, EU
Boat: crew on Bavaria 38 Cruiser
Posts: 651
Re: View in real time

Quote:
Originally Posted by SethDart View Post
"cat" doesn't work for a device, only for files.


With respect, I differ.
In UNIX, the "everthing is a file" paradigm is universally employed and
/dev/ttyXX is nothing but a special file. Problems may arise from incorrect user access permissions or the serial port hardware (driver) set to wrong defaults, like expecting hardware flow control. This is controlled via a set of dedicated IOCTL calls and can be set from userland by applications like setserial. Or, to have an easy, single step solution:

Quote:
You shall use minicom.
as I already suggested.

Alternative, and preferred in case a bi-directional connection is made, method of leaving Minicom would be to hit Ctrl-A Q. This avoids transmitting modem reset sequences down the serial link. Also:

Ctrl-A O brings a configuration dialog

Ctrl-A P brings a serial comm parameters setup dialog
__________________
mrm is offline   Reply With Quote
Old 13-04-2011, 10:21   #10
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,249
Re: AIS installation- Open CPN and Ubuntu

cat /dev/tty/USB0 works out of the box on Ubuntu 1010,... kind of. It prints between 0 and 10 lines before exiting. Same thing for "more" or "less".

To see a continuous readout, with some funny line brakes, try this one-liner.

Code:
while true; do read -n 80 LINE < /dev/ttyUSB1;echo $LINE; done
Stop with CTRL+C.

This is all you need, to see if your device is working and to identify the NMEA sentences.

Thomas
__________________
cagney is offline   Reply With Quote
Old 25-04-2011, 11:48   #11
Registered User
 
Tia Bu's Avatar

Join Date: Jul 2009
Location: South Carolina
Boat: 40' Jeanneau
Posts: 454
Re: AIS installation- Open CPN and Ubuntu

Thanks, all. This helped isolate the problem. It looks like the AIS receiver is not sending out data. Will have to get another one.

Hope this thread is of use to someone else in the future.
__________________
Tia Bu is offline   Reply With Quote
Old 25-04-2011, 17:49   #12
Registered User
 
HamishB's Avatar

Join Date: Jan 2010
Location: New Zealand
Posts: 286
Re: AIS installation- Open CPN and Ubuntu

fwiw "gtkterm" is a fine replacement for minicom.

Hamish
__________________

__________________
HamishB is offline   Reply With Quote
Reply

Tags
ais, open cpn

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenCPN Autopilot NEVERMIND Marine Electronics 7 06-05-2011 17:54
Open CPN - AIS Tab - No Rollover Options Colin Stone OpenCPN 1 14-10-2010 09:29
Open CPN for Windows 7 elleandi355 OpenCPN 3 09-09-2010 16:19
Open CPN speed? unbusted67 Marine Electronics 5 29-11-2009 22:30



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 19:46.


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.