Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 04-07-2015, 13:41   #46
Sponsoring Vendor
 
Schooner Chandlery's Avatar

Community Sponsor

Join Date: Jan 2007
Location: home port Washington DC
Boat: SS Crocker design #131
Posts: 914
Re: OpenCPN on Raspberry PI2

Spart, This may be helpful to you. David and I have had problems in the past with the on-boat network and the Pi. He recalls:

We had problems making the Airmar data available to multiple users on the network. Early attempts just time-multiplexed the data when there were multiple listeners--sending one NMEA line to the first listener, the second NMEA line to the next listener and so forth. The only solution we found that supported multiple listeners and provided all data to all listeners was a commercial product called "remserial." The licence allows for "free" use depending on how it is used. Our usage qualifies for free, so we use remserial (LPC Computer Consulting - Linux).

Actually, we first take in the data using a bash script which tees the data into an archive stream stored on disk and sends the data to remserial using nc (netcat). Our applications use the remserial network port to access data. For some reason, with many listeners and using wifi on the Pi B+ we sometimes have the data stream crash (2 weeks to 3 months between crashes), but the problem may not be with remserial.

We wrote a cron watchdog to check the archive file for new writes and if too much time passes, the script automatically kills everything and restarts remserial and the bash script. Normal startup on our Raspberry Pi B+ running Rasbian is via a udev script and requires "at" scheduler so that the process isn't killed prematurely (before it can be made a daemon).

We are currently setting up a Raspberry Pi 2 running Debian Jessie. We do expect that the startup sequence may need to be changed due to new more strict udev script constraints.

Also, our QT application which displays the Airmar WX data needs to be recompiled for the new ARM architecture.

We hope our experience with our Pi B+ is helpful to you.
Best regards, Brenda and David
__________________
"The only noble thing a man can do with money is to build a schooner." Robert Louis Stevenson

Schooner Chandlery is offline   Reply With Quote
Old 04-07-2015, 13:45   #47
Sponsoring Vendor
 
Schooner Chandlery's Avatar

Community Sponsor

Join Date: Jan 2007
Location: home port Washington DC
Boat: SS Crocker design #131
Posts: 914
Re: OpenCPN on Raspberry PI2

PS -- is there a generic Raspberry Pi thread around here somewhere? I'd love to be chatting Pi on a Pi thread rather than OpenCPN thread. Should I start a thread and link to these posts if there is not already a thread? Perhaps a moderator/admin can chime in/move or help! Thanks
__________________
"The only noble thing a man can do with money is to build a schooner." Robert Louis Stevenson

Schooner Chandlery is offline   Reply With Quote
Old 04-07-2015, 18:04   #48
Registered User

Join Date: Jul 2014
Posts: 61
Re: OpenCPN on Raspberry PI2

This thread is about opencpn on the Rpi2 so works for me. Don't know why we need another.

I type a long post but clearly it took me too long and then when I went post it had timed out and I had to start again. Can;t be bothered at this time.

TCALSS - long and frustrating testing day with the Rpi2

We have an seemingly intermittent issue with the serial to usb converter connection. We use it to get WMV from the wind instrument and as the standard output port to the repeater and AP.

Very simple wiring. Works perfectly with OpenCPN and PolarNav on the linux laptop.

Was working on the Rpi2 all morning then I started seeing these errors in the log and lost wind data and all output data to the repeater and AP. Literally hundreds of these messages:

Jul 4 18:13:14 pi kernel: [ 2027.067907] pl2303 ttyUSB1: usb_serial_generic_write_bulk_callback - urb stopped: -32

I think it means the USB device has crashed!

I though at first it was a faulty adaptor so plugged in the spare and cold booted everything inc. instruments. Same issue.

It seems to work intermittently. Have to disable and enable the port in OpenCPN but random on the amount of time it works for.

Without basic nmea in out this is a non starter for us. This is before we worry about any network connectivity!

Cheers
Spart
__________________
sparticle is offline   Reply With Quote
Old 04-07-2015, 19:10   #49
Sponsoring Vendor
 
Schooner Chandlery's Avatar

Community Sponsor

Join Date: Jan 2007
Location: home port Washington DC
Boat: SS Crocker design #131
Posts: 914
Re: OpenCPN on Raspberry PI2

We sometimes have usb lockups that require a reboot (every 6mos). First thought is if the usb serial device is switching name midstream (e.g. ttyUSB0 becomes ttyUSB1) due to some glitch? If name is not changing, will have to ponder further on cause. The usb system on the rpi B B+ was very glitchy for a long time until drivers were improved. Could be we are in for a period of glitchy usb on the rpi 2.

This issue is not OpenCPN related, it is rpi - centered.
__________________
"The only noble thing a man can do with money is to build a schooner." Robert Louis Stevenson

Schooner Chandlery is offline   Reply With Quote
Old 04-07-2015, 19:41   #50
Registered User

Join Date: Jul 2014
Posts: 61
Re: OpenCPN on Raspberry PI2

Hi thanks for your note. No switching of ports.

And no issue with the AIS/GPS port, solid and reliable so far.

Cheers
Spart
__________________
sparticle is offline   Reply With Quote
Old 04-07-2015, 19:52   #51
Sponsoring Vendor
 
Schooner Chandlery's Avatar

Community Sponsor

Join Date: Jan 2007
Location: home port Washington DC
Boat: SS Crocker design #131
Posts: 914
Re: OpenCPN on Raspberry PI2

So you're using the same USB device driver for both ttyUSB0 and ttyUSB1? e.g. the hardware devices are the same type?
__________________
"The only noble thing a man can do with money is to build a schooner." Robert Louis Stevenson

Schooner Chandlery is offline   Reply With Quote
Old 05-07-2015, 04:21   #52
Registered User

Join Date: Jul 2014
Posts: 61
Re: OpenCPN on Raspberry PI2

So you're using the same USB device driver for both ttyUSB0 and ttyUSB1? e.g. the hardware devices are the same type?

No, as I said previously.

The AIS/GPS feed is native USB so just plugs in and is configured as /dev/ttyUSB0 the unit is a Digital Yacht AIS PRO. (Which we can recommend to anyone as a serious bit of kit it only cost us 120GBP and it takes the NMEA out from the GPS and muxes it into the AIS data stream. So we get a single high speed connection with AIS and GPS data been rock solid since purchase 2 years ago).

The Serial to USB adaptor is connected on pin 2 to the wind Instrument which send us WMV and on pin 3 to the Repeater, On Board Garmin GPS 295 (for upload of and course data) and the AP and receives and sends out standard 4800 NMEA. This is seen and configured as:

Kernel: [ 2027.067907] pl2303 ttyUSB1:

If we substitute the Ubuntu Laptop all works fine.

Cheers
Spart
__________________
sparticle is offline   Reply With Quote
Old 05-07-2015, 04:57   #53
Registered User

Join Date: Jul 2010
Location: Monastir, Tunisia
Boat: Westerly Pentland
Posts: 1,515
Re: OpenCPN on Raspberry PI2

Spart,
it doesn't matter which operating system, for each USB device a driver is needed to get a virtual com port. This driver depends only of the serial/USB chip used in the device. This seems to be a FTDI chip in your Digital Yacht device and a Prolific chip in your other USB adapter. So you need a FTDI driver and a Prolific driver. And if you have several devices with the same chip you will have only one driver for different ports.
Gerhard
__________________
CarCode is online now   Reply With Quote
Old 05-07-2015, 05:36   #54
Registered User
 
NahanniV's Avatar

Join Date: Mar 2011
Location: On the Boat
Boat: Finnsailer 38
Posts: 1,026
Re: OpenCPN on Raspberry PI2

Spart,

Get a Usb<->Serial converter with the FTDI chipset, they are not too expensive, the ones with the Prolific chipset are known to be problematic (Google it).

Cheers,
JM.
__________________
NahanniV is offline   Reply With Quote
Old 05-07-2015, 05:38   #55
Registered User

Join Date: Jul 2014
Posts: 61
Re: OpenCPN on Raspberry PI2

Quote:
Originally Posted by NahanniV View Post
Spart,

Get a Usb<->Serial converter with the FTDI chipset, they are not too expensive, the ones with the Prolific chipset are known to be problematic (Google it).

Cheers,
JM.
Any specific products that are known to work?

Just wondering is we could hard wire into the Rpi2 GPIO pins. Anyone got any advice? All the listeners are powered independantly. So in theory I could set the /dev/ttyAMA0 port to 4800 and connect to Ground (06) RX (10) & TX (12) pins. Disable the boot messages on /dev/ttyAMA0 in cmdline.txt and in theory I should be able to use the native UART to do the simple 2 wire nmea......

Cheers
Spart
__________________
sparticle is offline   Reply With Quote
Old 05-07-2015, 06:18   #56
Registered User

Join Date: Jul 2010
Location: Monastir, Tunisia
Boat: Westerly Pentland
Posts: 1,515
Re: OpenCPN on Raspberry PI2

Best product and of course most expensive is the Keyspan USA-19HS. Also available for 4 serials.

Gerhard
__________________
CarCode is online now   Reply With Quote
Old 05-07-2015, 15:13   #57
Sponsoring Vendor
 
Schooner Chandlery's Avatar

Community Sponsor

Join Date: Jan 2007
Location: home port Washington DC
Boat: SS Crocker design #131
Posts: 914
Re: OpenCPN on Raspberry PI2

Quote:
Originally Posted by nohal View Post
Tell him to use the current master code of OpenCPN, it is using wx3.0 by default - exactly for this reason.
Just did the download and installing now. dri2 dev doesn't exist for the rpi. how to get around?

We have libxcb-dri2-0-dev and xproto-dir2-dev but we're getting error on compile stating it can't find -ldri2 ....

So, next trick the compiler using make arguments... using either one of the above -dev

but today's a sunny day and the boat's bottom is crying out to be cleaned... no more playing with the rpi2

PS this is using debian jessie not raspbian on the rpi2.
__________________
"The only noble thing a man can do with money is to build a schooner." Robert Louis Stevenson

Schooner Chandlery is offline   Reply With Quote
Old 05-07-2015, 15:35   #58
Sponsoring Vendor
 
Schooner Chandlery's Avatar

Community Sponsor

Join Date: Jan 2007
Location: home port Washington DC
Boat: SS Crocker design #131
Posts: 914
Re: OpenCPN on Raspberry PI2

Quote:
Originally Posted by NahanniV View Post
Spart,

Get a Usb<->Serial converter with the FTDI chipset, they are not too expensive, the ones with the Prolific chipset are known to be problematic (Google it).

Cheers,
JM.
That's what I was getting at with asking about drivers.
__________________
"The only noble thing a man can do with money is to build a schooner." Robert Louis Stevenson

Schooner Chandlery is offline   Reply With Quote
Old 05-07-2015, 15:48   #59
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 3,903
Re: OpenCPN on Raspberry PI2

SC...
You can probably replace "-ldri2" with "-lxcb-dri2" to make it link, but this is exactly the spot that needs the work of someone who actually knows how the acceleration stuff works on these ARM machines, it is not just about making it link somehow against some random library that happens to fit there, which is what this "fix" does...

Pavel
__________________
nohal is offline   Reply With Quote
Old 06-07-2015, 12:34   #60
Registered User

Join Date: Jul 2013
Location: Washington State, USA
Boat: 1983 Fu Hwa Seahorse
Posts: 86
Re: OpenCPN on Raspberry PI2

Quote:
Originally Posted by Schooner Chandlery View Post
We sometimes have usb lockups that require a reboot (every 6mos). First thought is if the usb serial device is switching name midstream (e.g. ttyUSB0 becomes ttyUSB1) due to some glitch? If name is not changing, will have to ponder further on cause. The usb system on the rpi B B+ was very glitchy for a long time until drivers were improved. Could be we are in for a period of glitchy usb on the rpi 2.

This issue is not OpenCPN related, it is rpi - centered.
This is a RPI issue, you are absolutely correct.

I have had lots of struggles with USB and the Rpi, especially boards prior to the 2.

To test, get a POWERED USB hub, and run everything, as is, though that. I would put money down that this will fix the issue.

If it does, you have a few options:
  1. Run the powered USB hub
  2. Get a legit PSU for the Pi
  3. Reduce power consumption through configuration, hardware, or programming
  4. Live with the occasional reconfigure task (what I do)
__________________

__________________
Thanks, Matt B.
1983 Fu Hwa Seahorse
http://mvcesc.wordpress.com/
mattkab is offline   Reply With Quote
Reply

Tags
enc, 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenCPN on Raspberry PI Raspbian Captain_Steve OpenCPN 12 08-02-2015 11:45
Comproblem on Raspberry Pi and OpenCPN vagspel OpenCPN 4 26-12-2012 06:01
Raspberry Pi and OpenCPN 3.1.915 spillemw OpenCPN 20 24-09-2012 03:30
Raspberry PI compiles OpenCPN monstads OpenCPN 7 15-03-2012 13:41
The Perfect Platform for OpenCPN ? Raspberry Pi night0wl OpenCPN 10 08-09-2011 20:09


Our Communities

Our communities encompass many different hobbies and interests, but each one is built on friendly, intelligent membership.

» More about our Communities

Automotive Communities

Our Automotive communities encompass many different makes and models. From U.S. domestics to European Saloons.

» More about our Automotive Communities

Marine Communities

Our Marine websites focus on Cruising and Sailing Vessels, including forums and the largest cruising Wiki project on the web today.

» More about our Marine Communities


Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 09:35.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.