gpsd: add readonly option to uci
authorFlorian Eckert <fe@dev.tdt.de>
Fri, 14 Feb 2025 12:10:06 +0000 (13:10 +0100)
committerFlorian Eckert <Eckert.Florian@googlemail.com>
Fri, 28 Feb 2025 07:13:00 +0000 (08:13 +0100)
The 'readonly' option tells the GPSD that it is not allowed to write to the
GPS TTY, only reading the NMEA data stream is allowed. This option of the
GPSD must be set for my mobile radio device MV31, otherwise the GPSD can not
read the NMEA data stream on the GPS TTY because the GPSD blocks during
plugin probing.

gpsd:PROG: CORE: Probing "Garmin USB binary" driver...
gpsd:PROG: CORE: Probe not found "Garmin USB binary" driver...
gpsd:PROG: CORE: Probing "GeoStar" driver...
gpsd:PROG: Sent GeoStar packet id 0xc1

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
utils/gpsd/Makefile
utils/gpsd/files/gpsd.init

index aaa7e118d592f44e22461454105db045d6891ee8..806740b42c70506e28040956b8381342d4e1da0b 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gpsd
 PKG_VERSION:=3.25
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME)
index 6f1a09e6baa9ab19a4a59399b2e1b0a99924b0e1..5aad90ffc64dab83b98d74c21a4b231eff7958a6 100644 (file)
@@ -12,6 +12,7 @@ validate_section_gpsd()
 {
        uci_load_validate gpsd gpsd "$1" "$2" \
                'enabled:bool:1' \
+               'readonly:bool:1' \
                'device:string' \
                'listen_globally:bool:0' \
                'port:port:2947'
@@ -32,6 +33,7 @@ gpsd_instance()
        [ "$listen_globally" -ne 0 ] && procd_append_param command -G
        procd_append_param command -S "$port"
        procd_append_param command -D "$LOG_LEVEL"
+       [ "$readonly" = "1" ] && procd_append_param command -b
        procd_append_param command -F /var/run/gpsd.sock
        [ -n "$device" ] && procd_append_param command "$device"
        procd_set_param respawn