gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gpsd autobaud and cpu usage


From: sean d'epagnier
Subject: gpsd autobaud and cpu usage
Date: Mon, 21 Sep 2020 18:26:46 -0400

I am using gpsd on a raspberry pi zero w.   This is a long standing
issue with no resolution:

gpsd uses 5% of the cpu just reading from a single gps.    The
"pselect" call that gpsd uses never blocks and always returns 1 even
if there is no data.   I realize this is due to bugs in the usb
drivers, but in other applications which use poll, this doesn't seem
to be an issue.   If I insert nanosleep of 100ms after the call, the
cpu usage goes down to 0.3% and does not seem to affect gpsd in other
ways but I am not sure possible implications especially with higher
rate gps (mine is 1hz)


My other issue is with autobauding.   It was claimed the baud could be
detected in 1 second, but this does not seem to be the case.   gpsctl
-f takes 3-4 seconds even if the baud is set correctly, and if not, it
takes 15, 28, or maybe it just hangs for 5 minutes until I kill it and
it never finds the baud rate.   The same behavior occurs with gpsd or
gpsctl -f.   In the code it does not seem to have a timeout to detect
the baud rate.   Maybe this worked better in older versions of gpsd?


Sean



reply via email to

[Prev in Thread] Current Thread [Next in Thread]