Skip to content

Commit

Permalink
workaround gpsd(8) bug "device read of xxx returned error or packet s…
Browse files Browse the repository at this point in the history
…niffer failed sync"
  • Loading branch information
Matija Nalis committed Jun 23, 2014
1 parent 750e301 commit f227db0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ or
(2b) killall gpsd; /usr/sbin/gpsd -b -N SLCLog.bin & sleep 1; cgps


if you suffer from gpsd(8) "device read of SLCLog.bin returned error or packet sniffer failed sync"
bug (https://savannah.nongnu.org/bugs/index.php?36409), or bigger captures you'll instead have to feed
it via TCP instead:

(1) tcpserver localhost 50100 ./gp2_to_bin.pl data/2/SLCLog.gp2 &
(2a) /usr/sbin/gpsd -b -N -D4 -n tcp://localhost:50100 >& SLCLog.gpsd.txt # ctrl-c when you think it is finished
or
(2b) killall gpsd; /usr/sbin/gpsd -b -N tcp://localhost:50100 & sleep 1; cgps


Raw strace log, when formatted nicely with parse_strace.pl only on first
look looks somewhat similar to SiRF binary format, but is quite different.

Expand Down
2 changes: 2 additions & 0 deletions gp2_to_bin.pl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Usage: ./gp2_to_bin.pl data/2/SLCLog.gp2 > slclog.bin
#

$|=1;

while (<>) {
next if /^\s*$/; # skip empty lines
Expand All @@ -14,4 +15,5 @@
s/#.*$//; # remove comments at the end of line
s/\s+//g; # no whitespace allowd for pack
print pack "H*", $_;
# sleep 1; # comment out if not affected by gpsd(8) bug https://savannah.nongnu.org/bugs/index.php?36409
}

0 comments on commit f227db0

Please sign in to comment.