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 11-04-2011, 06:27   #1
Registered User
 
Tia Bu's Avatar

Join Date: Jul 2009
Location: South Carolina
Boat: 40' Jeanneau
Posts: 492
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, 22:10   #2
Registered User

Join Date: Mar 2010
Location: Svanesund, Orust, Sweden
Boat: Forgus 31
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, 07:04   #3
Registered User
 
Tia Bu's Avatar

Join Date: Jul 2009
Location: South Carolina
Boat: 40' Jeanneau
Posts: 492
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, 10:51   #4
Registered User

Join Date: Mar 2010
Location: Normandy, France
Boat: Flush Poker, 8.25m (Point Barre)
Posts: 340
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, 11:53   #5
Registered User
 
Tia Bu's Avatar

Join Date: Jul 2009
Location: South Carolina
Boat: 40' Jeanneau
Posts: 492
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, 14:00   #6
Registered User
 
Tia Bu's Avatar

Join Date: Jul 2009
Location: South Carolina
Boat: 40' Jeanneau
Posts: 492
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, 14:18   #7
mrm
Registered User

Join Date: Feb 2011
Location: Poland, EU
Boat: crew on Bavaria 38 Cruiser
Posts: 654
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, 16:12   #8
Registered User

Join Date: Mar 2010
Location: Normandy, France
Boat: Flush Poker, 8.25m (Point Barre)
Posts: 340
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, 07:45   #9
mrm
Registered User

Join Date: Feb 2011
Location: Poland, EU
Boat: crew on Bavaria 38 Cruiser
Posts: 654
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, 09:21   #10
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
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, 10:48   #11
Registered User
 
Tia Bu's Avatar

Join Date: Jul 2009
Location: South Carolina
Boat: 40' Jeanneau
Posts: 492
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, 16: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


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 16:54
Open CPN - AIS Tab - No Rollover Options Colin Stone OpenCPN 1 14-10-2010 08:29
Open CPN for Windows 7 elleandi355 OpenCPN 3 09-09-2010 15:19
Open CPN speed? unbusted67 Marine Electronics 5 29-11-2009 21:30

Advertise Here


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


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.