Problem installing Openplotter on a Raspberry Pi

cpedw

Well-Known Member
Joined
1 Jun 2001
Messages
1,346
Location
Oban
Visit site
It all seemed to be going well, though taking a lot of time (not in short supply just now!) After failing miserably using OpenPlotter, Stable V2, install guide , I followed https://sailoog.gitbooks.io/openplotter-documentation/content/en/getting_started.html which eventually got me a working version.

Then I tried to connect a USB GPS and that started to work too but Open CPN crashed as soon as I tried to communicate with it - zooming in was the cause. Trying to restart OpenCPN just crashes immediately now.

Do I need to I reload the SD card or can I recover with less effort?
Are there any tips how I can avoid a recurrence with the GPS?

I'm installing Openplotter with an eye to future developments but for the moment just trying to get OpenCPN to work.
It's a shiny new RPi 4B, $GB. The GPS is a USB ND 100 S from a few years ago. I've also got this serial GPS but the USB was simpler to connect. Will it be simpler to use the GPIO connected GPS?

Thanks for putting up with me right to the end.
Derek
 
I loaded openplotter on a pi4 the other day headless. Current docs here.
Downloading — OpenPlotter 2 documentation
Though used the noobs version, the other img didn't seem to boot headless. Then maybe 15 minutes after turning in it was up and running and I could connect over wifi using vnc. (and over the Web)
If the USB GPS is working it should show up in the serial app, it doesn't connect to opencpn but through openplotter first. Should be all set up. Istr opencpn was already installed, and the wonderful signalk.
Maybe next day off on Sunday I'll redo the install with step by step notes. But it does work. The Pi4 does need a *lot* of power over 5v though, not all the time by it gets grumpy if the power isn't available during the spikes.
 
I tried a couple of years ago when the Pi4 first came out. Never managed it so gave up.

If you manage to post step by step instructions I'll give it another try, seeing as I have not much better to do!
 
I started again from scratch, following the instructions carefully. I installed the NOOBS Basic OpenPlotter Starting version. I found a step that I overlooked first time "Please note that in some cases it may extract the files into a folder; if this is the case, then please copy across the files from inside the folder rather than the folder itself. "

It made all the difference. The installation went very smoothly and without much intervention by me. One snag still to solve - it isn't yet connecting to the USB GPS.
 
When I got my Pi4 OpenPlotter wasn't ready for it. So I installed Raspian from scratch and then OpenCPN. This works for me as I only want the plotter and I now have all the other Pi software. It picked up all the USB , and the Serial to USB, data straight away.

Sorry if this isn't any use to you
 
Having got stuck, I tried Mattonthesea's approach. Installing opencpn has a few more steps than openplotter but doesn't take very long. I followed these instructions. But at first it still didn't connect to the GPS. There's a paragraph in the instructions:
"At least on Ubuntu 18.04, and other Debian based distros, there is one more step if you have a GPS with a Prolific chip, such as the popular BU353. The support for this chip is turned off by default. You have to edit the file “/lib/udev/rules.d/60-gpsd.rules”. Find the paragraph regarding Prolific Technolog, near the beginning, and remove the “#” from the line starting “#ATTRS{idVendor}”. Save and restart your computer. "
I did this (eventually - ordinary text editor couldn't save the edited file - I had to use sudo nano ...) and that got it working.
I plan to apply that edit to the OpenPLotter version and see if that's the problem there too. Watch this space if you're interested.

Derek
 
I got it working with OpenPlotter as well now. I had to alter the connection as described here, half way down the page - Linux, gpsd method.
How am I going to fill the rest of the lockdown?

Edit - The Check System at startup throws up an error - OpenCPN is not connected to SignalK. I don't understand SignalK so it's not yet a problem but I believe SignalK is useful so I should try to sort it out.
 
Last edited:
I would definitely keep at openplotter - all menu driven to install the progs and updates. Might be a good thing to ask re the GPS on here -
OpenMarine
Then if it is a bug the developers can be made aware of it and fix if.
And signalk is far beyond useful, it's fantastic :)
The sources for influxdb database are included in openplotter so not hard to get signalk to record whatever you want straight to a database and view on any machine attached to the openplotter network. There's a very good signalk simulator as well to see everything working.
Then if that's not enough you can get your own little circuit boards made at jlcpcb to send all sorts of data over wifi to the Pi :cool:
boatybits/boatymonpy
 
Glad to have been indirectly helpful :) OPenPlotter is fantastic.

Now for my lockdown project: I want to set a drupal form so that if it is saved with a term selected from a taxonomy list, then it will choose one particular Entity Reference Widget list to show in another field for later editing. :sleep:
 
Best of luck with that , Mattonthsea.
[smug git mode] I "fixed" the SignalK connection in OpenPlotter by following the advice of "CheckSystem". (Openplotter runs Check System automatically at each startup. It gives error messages and advice on fixing them - that's neat for the likes of me,)

The solution is to add the connection. In OpenCPN, Settings, Connections, Add Connection - Network, TCP, Address - localhost, DataPort - 10110. Apply.

I don't understand all that but the result seems to be a fully operational OpenPlotter on my Raspberry Pi. Currently I'm using CM93 and Antares charts. When lockdown looks like ending, I plan to get VMH charts instead of CM93 so prepare for more enquiries.

Thanks for advice and encouragement.

Derek
 
Best of luck with that , Mattonthsea.
[smug git mode] I "fixed" the SignalK connection in OpenPlotter by following the advice of "CheckSystem". (Openplotter runs Check System automatically at each startup. It gives error messages and advice on fixing them - that's neat for the likes of me,)

The solution is to add the connection. In OpenCPN, Settings, Connections, Add Connection - Network, TCP, Address - localhost, DataPort - 10110. Apply.

I don't understand all that but the result seems to be a fully operational OpenPlotter on my Raspberry Pi. Currently I'm using CM93 and Antares charts. When lockdown looks like ending, I plan to get VMH charts instead of CM93 so prepare for more enquiries.

Thanks for advice and encouragement.

Derek

Did an install from scratch today, it was (nearly) all set up fine, there wasn't actually any need to 'fix' the signalk connection. What was needed was to turn on signalk to nmea converter in the server plugins menu, it wasn't activated. Might make more sense for this to be enabled by default in openplotter. And select it to send RMC at least. Then add your usb gps in the openplotter serial devices app as signalk. Leave opencpn connections as they are, with a tcp connection to localhost port 10110. Better idea to put everything through signalk first then let it send the data to opencpn & anything else interested.





9QBc5q5.png


Edit - I was wrong, you don't need to activate the signalk-nme converter, just set up the usb gps as a signalk connection, click auto when adding it and it sets it up for you. Opencpn already has the tcp 10110 port set up.
YcmAlXA.png
 
Last edited:
I tried a fresh install of OpenPlotter and all seemed to go well but - OpenCPN sees no gps. I tried without and with the modification of 60-gpsd.rules file (post 6) but I don't think that should matter as gpsd isn't being used if I understand correctly. SignalK is showing a gps but 0 activity.

Are there any diagnostic steps I could follow? Any remedial action that might help?

Thanks,
Derek
 
I tried a fresh install of OpenPlotter and all seemed to go well but - OpenCPN sees no gps. I tried without and with the modification of 60-gpsd.rules file (post 6) but I don't think that should matter as gpsd isn't being used if I understand correctly. SignalK is showing a gps but 0 activity.

Are there any diagnostic steps I could follow? Any remedial action that might help?

Thanks,
Derek
Not at the Pi right now but you could try this...
open a terminal , think it's in the accessories menu, then type or copy paste thie>
This will show everything in the /dev/ directory, which is where the usb device should be. In there you will hopefully find one called something like 'ttyUSB0'
If it's there then try typing this >
cat /dev/ttyUSB0
ttyUSB might not be exactly that, so type what shows up. This should show the output of the GPOS with lots of nmea messages scrolling down the screen.
If you can see that then looks like your gps is working ok. Press control C to stop the messages scrolling.

Next go into the openplotter menu and open Serial, the gps shold show up on the tab on the left which you enable then next tab along highlight and click 'add to signalk'
Should be done, I'll do a few screen grabs tonight if the web is up, good luck!
 
Thanks. ls/dev shows it is ttyUSB0.

cat /dev/ttyUSB0 replies

cat /dev/ttyUSB0 : Device or resource busy

or it doesn't show anything.

gpsmon, cgps and xgps all show sensible GPS data but not in NMEA style.

Can I conclude that the GPS is working but isn't connected in the right way somehow?
 
Thanks. ls/dev shows it is ttyUSB0.

cat /dev/ttyUSB0 replies

cat /dev/ttyUSB0 : Device or resource busy

or it doesn't show anything.

gpsmon, cgps and xgps all show sensible GPS data but not in NMEA style.

Can I conclude that the GPS is working but isn't connected in the right way somehow?
Sounds like maybe it's working but something has got it already, there shouldn't be any programs talking to it until you connect it to openplotter in the serial app. Maybe try running 'htop' in the terminal to see if gpsd or something might be running in the background? Mine will show data in the terminal even after it's connected to signalk..
y4Z3cww.png

yMdn5C3.png

U8DhDc9.png

Are you seeing anything in openplotter data browser?
GPS is inside so not seeing any sats here >
jZPhOOr.png



Also, might be worth undoing the changes in /lib/udev/rules.d/60-gpsd.rules, in a terminal 'lsusb' will list usb devices, mine looks like it's prolyfic as well and it works fine >
'Bus 001 Device 003: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port' Though saying that the file looks like it just for gpsd so shouldn't matter as gpsd isn't being used...
 
Last edited:
Definite progress. Rebooting has got cat /dev/ttyUSB0 showing characters but they are gobbledegook, as if the baud rate is wrong. I tried all available from 4800 to 38400. The appearance changed a bit with baud rate but no sense is apparent.
My Device and Connection tabs are identical to yours except the unlabeled leftmost column under Device is blank in mine where yours shows no Hub.
The Data Browser shows "Select a Context" in the dropdown box where you show "Self". Nothing else shows when it's dropped down. The rest is blank.
I restored the 60-gpsd file to its original state but no change.
lsusb gives an identical result except it's Device 005.

Any suggestions how to proceed? I'm out of ideas and well past understanding it.
 
Definite progress. Rebooting has got cat /dev/ttyUSB0 showing characters but they are gobbledegook, as if the baud rate is wrong. I tried all available from 4800 to 38400. The appearance changed a bit with baud rate but no sense is apparent.
My Device and Connection tabs are identical to yours except the unlabeled leftmost column under Device is blank in mine where yours shows no Hub.
The Data Browser shows "Select a Context" in the dropdown box where you show "Self". Nothing else shows when it's dropped down. The rest is blank.
I restored the 60-gpsd file to its original state but no change.
lsusb gives an identical result except it's Device 005.

Any suggestions how to proceed? I'm out of ideas and well past understanding it.
Not sure........ One thing to try and maybe just see something, unplug the GPS and go into the app store and install sksim. Then at least you can see it all working with simulated data. And maybe ask on the openplotter forum, they know loads more than me:)

Edit. Quick thought, you said device and connection tabs were nearly the same, quick Google suggests yours is 4800 baud rate, is the rate set to 4800 in your connections?
 
Last edited:
I had an issue where there was no nmea0183 data arriving in ocpn from signalk. This turned out to be a line in "settings.json" in ".signalk" folder.

The line was "suppressnmea0183:true" I changed it to false & all good.

"telnet 10110" will show the flow (need to install telnet if using OP2)

Might help someone.
 
Top