[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] gpsfake, gpsd, printing, throttling?
From: |
Gary E. Miller |
Subject: |
Re: [gpsd-dev] gpsfake, gpsd, printing, throttling? |
Date: |
Thu, 18 Apr 2019 12:41:45 -0700 |
Yo Jiwon!
On Thu, 18 Apr 2019 04:43:02 -0400
Jiwon Joung <address@hidden> wrote:
> I ran gpsfake w/ vanilla gpsd and it was successful.
Cool. So gpsd is good.
> I edited gpsd to include some printf's and some dummy calls to a
> function in an external library.
> Now I get the error: "gpsfake: socket error [Errno 104] Connection
> reset by peer.".
Hard to debug your code for you without seeing your code, or even a
good debug log from you.
BUT: printf() is a bad idea. gpsd is multi-threaded, and stdout is not.
Best to use gpsd_log().
> However, this happens after a couple dozen calls to my dummy calls
> (args to the call don't change and yet the first few calls to my
> function succeed...)
Many ways to break sockets...
> Any thoughts on why this might be the case? I'm kind of at a loss.
I've got a hundred ideas on how you broek it, but no data to back up any
of them.
As always, when in doubt, run gpsd with a lot of debug. To do
that with gpsfake:
# gpsfake -o "-D 4" testdata.log
That is likely too much data, too fast, so run it with nohup to get a
file of the output.
> Is there some timeout in gpsd?
All over the place.
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
address@hidden Tel:+1 541 382 8588
Veritas liberabit vos. -- Quid est veritas?
"If you can’t measure it, you can’t improve it." - Lord Kelvin
pgp7Tb0iEiu1W.pgp
Description: OpenPGP digital signature