GPS settings are _not_ persistent!!!

Home Forums Forums Technical Support for BerryGPS and BerryGPS-IMU GPS settings are _not_ persistent!!!

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #17045
    Michael Sacarny

    What I wanted to do was configure the GPS permanently for 5 Hz sampling and 57,600 baud. That way, GPSD could be configured to start at boot time, set system time, and produce info for my GPSD client. However, the settings on the UBlox in the BerryGPS-IMU V4 are not saved by any command I could find. I suspect this is due to the lack of flash on the UBlox CAM-M8 chipset. Settings may survive a warm reboot, but not a cold restart.

    In the end, I set baud and sampling rate in a boot script, which then started GPSD. This took me several rather frustrating days to work out. I think the lack of persistent settings of the GPS should be made more clear in the documentation. Also, the ability to make settings persistent would make cleaner designs possible.

    Mark Williams

    Hi Michael

    You are right, none of the settings are kept as the GPS module has no flash.

    Ill update our documentation to clearly state this.

    I can also create a guide on how to set it on boot.  So i don’t have to “reinvent the wheel”, are you able to share what you did?

    Mark --

    Michael Sacarny


    I’ll outline it here, but an easier alternative would have been if gpsctl worked as stated. Although the -s command changes gps baud rate, I could never get the -c command to change sampling rate. Any help on tracking down that problem would be worthwhile, as that would result in a simpler, cleaner scripting solution.

    What I ended up doing is letting gpsd boot up at start time as is the usual case. However, I make sure a gps configuration service runs first:

    1. Create shell script to set gps baud and sample rates:

    <p style=”margin-left: 40px;”>#!/bin/bash
    stty -F /dev/serial0 9600
    echo -e -n "\xB5\x62\x06\x08\x06\x00\xC8\x00\x01\x00\x01\x00\xDE\x6A" > /dev/serial0
    echo -e -n "\xB5\x62\x06\x00\x14\x00\x01\x00\x00\x00\xD0\x08\x00\x00\x00\xE1\x00\x00\x07\x00\x03\x00\x00\x00\x00\x00\xDE\xC9" > /dev/serial0
    stty -F /dev/serial0 57600

    1. Make script executable: sudo chmod u+x /path/to/script/
    2. Create a gps_config.service file in /etc/systemd/system as follows:

    <p style=”margin-left: 40px;”>[Unit]
    Description=Configures gps sampling and baud rate for gpsd service.
    ExecStart=/bin/bash /path/to/script/

    1. Set privileges: sudo chmod 644 /etc/systemd/system/gps_config.service
    2. Enable service: sudo systemctl enable gps_config.service
    3. Copy /lib/systemd/system/gpsd.service to /etc/systemd/system
    4. Edit /lib/systemd/system/gpsd.service:
      Add to [Unit] section: After=gps_config.service

    After reboot, gpsd will start after gps has been configured. PPS synchronizes ntp as expected and gpsd clients are serviced as usual.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Blip, blop, bloop…