[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Ignore nmea checksum - possible?
From: |
Andreas B |
Subject: |
Ignore nmea checksum - possible? |
Date: |
Wed, 12 Jul 2023 15:57:13 +0200 |
Hi all,
Question:
Is there a way to make gpsd ignore the nmea checksum?
Case:
I've been playing with generated nmea sentences, and changing the
coordinates, without calculating a (new valid) checksum.
When using gpsfake, gpsd seems to refuse to output the nmea sentence
when the checksum is invalid.
Here's what I tried:
* Generate nmea (valid checksum):
$GPGGA,130333.468,7426.343,N,01901.370,E,1,12,1.0,0.0,M,0.0,M,,*6B
* Run gpsfake:
gpsfake -c 1 -b -o="-G -n" output.nmea
* Connect and test:
$ nc localhost 2947
{"class":"VERSION","release":"3.25.1~dev","rev":"release-3.25-109-g1a04cfab8","proto_major":3,"proto_minor":15}
?WATCH={"enable":true,"nmea":true}
{"class":"DEVICES","devices":[{"class":"DEVICE","path":"/dev/pts/2","driver":"NMEA0183","readonly":"true","activated":"2023-07-12T13:49:23.589Z","flags":1,"native":0,"bps":4800,"parity":"N","stopbits":1,"cycle":1.00}]}
{"class":"WATCH","enable":true,"json":false,"nmea":true,"raw":0,"scaled":false,"timing":false,"split24":false,"pps":false}
$GPGGA,130333.468,7426.343,N,01901.370,E,1,12,1.0,0.0,M,0.0,M,,*6B
$GPGGA,130333.468,7426.343,N,01901.370,E,1,12,1.0,0.0,M,0.0,M,,*6B
[..]
This works nicely.
* Now, make the checksum invalid, e.g. 6B -> 6A and try again:
$GPGGA,130333.468,7426.343,N,01901.370,E,1,12,1.0,0.0,M,0.0,M,,*6A
Run gpsfake again:
$ gpsfake -c 1 -b -o="-G -n" output.nmea
*Connect and test:
$ nc localhost 2947
{"class":"VERSION","release":"3.25.1~dev","rev":"release-3.25-109-g1a04cfab8","proto_major":3,"proto_minor":15}
?WATCH={"enable":true,"nmea":true}
{"class":"DEVICES","devices":[{"class":"DEVICE","path":"/dev/pts/2","readonly":"true","activated":"2023-07-12T13:51:31.886Z","native":0,"bps":9600,"parity":"N","stopbits":1,"cycle":1.00}]}
{"class":"WATCH","enable":true,"json":false,"nmea":true,"raw":0,"scaled":false,"timing":false,"split24":false,"pps":false}
[..no output..]
For testing purposes, it would be nice to be able to pass through nmea
sentences, even if the checksum is invalid.
Any tips or suggestions?
Best,
Andreas
- Ignore nmea checksum - possible?,
Andreas B <=