From e377d07afd05e4d14cc13a20b5cfeb3e1831f62d Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Fri, 14 Feb 2025 13:10:06 +0100 Subject: [PATCH] gpsd: add readonly option to uci 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 --- utils/gpsd/Makefile | 2 +- utils/gpsd/files/gpsd.init | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/gpsd/Makefile b/utils/gpsd/Makefile index aaa7e118d5..806740b42c 100644 --- a/utils/gpsd/Makefile +++ b/utils/gpsd/Makefile @@ -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) diff --git a/utils/gpsd/files/gpsd.init b/utils/gpsd/files/gpsd.init index 6f1a09e6ba..5aad90ffc6 100644 --- a/utils/gpsd/files/gpsd.init +++ b/utils/gpsd/files/gpsd.init @@ -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 -- 2.30.2