2025-02-02, 07:07 PM
Hi,
not sure whether its a bug or a feature, but it drove me almost nuts until I found the solution to it eventually.
First the setup:
Initially, I added the GPS NMEA0183 with 38,400 baud directly to Signal K via the Serial 4.1.0 app, using the serial connection provided nicely by the MCS board from GeDaD. I like the board very much, as its gives me lots of freedom with the connections and provides this tiny lilttle +12V enable thing with its auto off/op topic. But thats a bit of topic here. Anyhow.
After this I wanted to "rightfully" ;-) connect the GPS to the gpsd, using the OP Serial app. This also worked out nicely and I could get all data from the OpenPlotter GPSD and also - and this was for me the main driving force here- cgps -s, gpsmon and xgps showed not only the NMEA stream but also the satellites in view etc.
But, the GPSD connection did not survive any reboot! No matter what I did -reinstalling gpsd, changing the ports, writing small start up scripts, removing openplotter-serial and binding the ports manually, changing the baud rate (of course on bith sides), etcetcetc- if the serial port was connected to GPSD, after a reboot no data was shown. The MCS LED RX of course was flashing. It drove me totally nuts.
After a reboot the only chance to get the connection to GPSD working again, was to remove that connection, restart Signal K, wait, connect the serial to Signal K, confirm 38,400 baud, restart Signal K, wait, remove the connection from Signal K, restart Signal K, wait, add the connection to GPSD, confirm AUTO, restart Signal K, wait, done. Of course that was not anything which is close to a desired usability.
More and more I came to the conclusion, that either OpenPlotter or Signal K interferes with the serial interface initialization - incorrectly.
Long story short - the solution is:
change the gpsd config file in /etc/default/gpsd from what is OpenPlotter writing into it to:
That way you fix the initial baud rate of the GPSD serial to what my device is using and GPSD survives reboots. Obviously the AUTO setting does not work here for any reason.
Now final question: why isnt there any possibility in the Serial app to set also the baud rate, but only AUTO. If I could have set it, it would have saved me for sure days and nights. Setting the correct baud rate, data, parity, stop bit correctly is something pretty crucial for a serial connection and for sure I would have tried the set baud rate here.
If its a bug, than I would say, the bug is, that the AUTO set of the baud rate wont work; if its a feature, I would say, make the baud rate also for the GPSD settable.
not sure whether its a bug or a feature, but it drove me almost nuts until I found the solution to it eventually.
First the setup:
- OpenPlotter 4.2.7 (Bookworm)
- Signal K 2.13.0
- Raspi 4B, 4GB, 64bit
- 256 SSD via USB 3.0
- MCS board (GeDad) 2.0
- Camino 108S GPS/AIS Class B, NMEA0183 connected via MCS ttySC0 (alias ttyOP_gps), 38,400 baud
Initially, I added the GPS NMEA0183 with 38,400 baud directly to Signal K via the Serial 4.1.0 app, using the serial connection provided nicely by the MCS board from GeDaD. I like the board very much, as its gives me lots of freedom with the connections and provides this tiny lilttle +12V enable thing with its auto off/op topic. But thats a bit of topic here. Anyhow.
After this I wanted to "rightfully" ;-) connect the GPS to the gpsd, using the OP Serial app. This also worked out nicely and I could get all data from the OpenPlotter GPSD and also - and this was for me the main driving force here- cgps -s, gpsmon and xgps showed not only the NMEA stream but also the satellites in view etc.
But, the GPSD connection did not survive any reboot! No matter what I did -reinstalling gpsd, changing the ports, writing small start up scripts, removing openplotter-serial and binding the ports manually, changing the baud rate (of course on bith sides), etcetcetc- if the serial port was connected to GPSD, after a reboot no data was shown. The MCS LED RX of course was flashing. It drove me totally nuts.
After a reboot the only chance to get the connection to GPSD working again, was to remove that connection, restart Signal K, wait, connect the serial to Signal K, confirm 38,400 baud, restart Signal K, wait, remove the connection from Signal K, restart Signal K, wait, add the connection to GPSD, confirm AUTO, restart Signal K, wait, done. Of course that was not anything which is close to a desired usability.
More and more I came to the conclusion, that either OpenPlotter or Signal K interferes with the serial interface initialization - incorrectly.
Long story short - the solution is:
change the gpsd config file in /etc/default/gpsd from what is OpenPlotter writing into it to:
Code:
START_DAEMON="true"
USBAUTO="false"
DEVICES="/dev/ttyOP_gps" #or whichever alias you have
GPSD_OPTIONS="-s 38400"
That way you fix the initial baud rate of the GPSD serial to what my device is using and GPSD survives reboots. Obviously the AUTO setting does not work here for any reason.
Now final question: why isnt there any possibility in the Serial app to set also the baud rate, but only AUTO. If I could have set it, it would have saved me for sure days and nights. Setting the correct baud rate, data, parity, stop bit correctly is something pretty crucial for a serial connection and for sure I would have tried the set baud rate here.
If its a bug, than I would say, the bug is, that the AUTO set of the baud rate wont work; if its a feature, I would say, make the baud rate also for the GPSD settable.