mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-10 00:04:06 -09:00
Usually, ubxtool, a python-based tool to drive u-blox devices, connects to a gpsd instance and delegates to it the responsibility to write to and read from the actual device. This is sane, because a serial device can only be opened once, and if gpsd is running, it has that device open. However, in some cases, ubxtool can be used to directly talk to the device, to pre-configure it before gpsd runs, or even in the absence of gpsd altogether. This is not used very often, except when setting up an RTK base, where gpsd is not needed. In that case, ubxtool will directly talk to the serial device. It uses the pyserial python module. Since this is not the traditional way to talk to the device, failure to import the module is ignored, and the error reporting is deferred until it is actually needed, which is why we did not catch the issue earlier. See [1] and [2]. Fixes:f3ef0723cf(package/gpsd: enable python support and modules) [1] https://gitlab.com/gpsd/gpsd/-/blob/release-3.25/clients/ubxtool.py.in#L47 [2] https://gitlab.com/gpsd/gpsd/-/blob/release-3.25/gps/gps.py.in#L36 Signed-off-by: Yann E. MORIN <yann.morin@orange.com> Cc: Bernd Kuhls <bernd@kuhls.net> [Julien: add link to described code portion] Signed-off-by: Julien Olivain <ju.o@free.fr> (cherry picked from commit5d2f3737a1) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>