[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sending commands to device while gpsd is running
From: |
Filip Kubicz |
Subject: |
Sending commands to device while gpsd is running |
Date: |
Thu, 30 Dec 2021 12:53:51 +0100 |
User-agent: |
Zoho Mail |
Hi gpsd mailing list,
I have a LC29D GNSS module that talks over UART with NMEA sentences.
Receiving part is easy, gpsd parses the UART data and I can read the SKY and
TPV in my client program.
However, I also need to send some commands over UART to configure it and then
feed it with the information it needs (e.g. vehicle wheel ticks).
So far I assumed that the correct way to send such commands is with gpsctl -x
"$COMMAND". But I see it behaves in a strange way, possibly trying to
re-activate the device:
# gpsctl -x "$COMMAND" -D 5 /dev/ttyGPS0
gpsctl:INFO: SER: opening GPS data source type 2 at '/dev/ttyGPS0'
gpsctl:INFO: SER: speed 115200, 8N1
gpsctl:INFO: gpsd_activate(1): activated GPS (fd 3)
gpsctl:INFO: device /dev/ttyGPS0 activated
gpsctl:INFO: startup at 2021-12-30T10:55:48.000Z (1640861748)
gpsctl:PROG: switching to match packet type 1:
$GNRMC,105549.43,V,,,,,,,301221,,,N,V*11\x0d\x0a
gpsctl:PROG: switch_driver(NMEA0183) called...
gpsctl:PROG: selecting NMEA0183 driver...
gpsctl:INFO: /dev/ttyGPS0 identified as type NMEA0183, 1 sec @ 115200bps
gpsctl:PROG: => Probing for Garmin NMEA
gpsctl:IO: SER: => GPS: $PGRMCE*0E\x0d\x0a
gpsctl:IO: <= GPS: $GNRMC,105549.43,V,,,,,,,301221,,,N,V*11
gpsctl:WARN: cycle-start detector failed.
gpsctl:WARN: device error, bailing out.
When I just send the command over UART, the command succeeds and the device
sends back
$COMMANDACKOK*16
What would be the best way to send a command to a device while gpsd is running?
The commands are NMEA-like text.
The commands are independent from the daemon operation.
Kind regards,
Filip Kubicz
- Sending commands to device while gpsd is running,
Filip Kubicz <=