gpsd-users
[Top][All Lists]
Advanced

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

Re: [gpsd-users] Issue with Rasbian Jessie


From: Alexander Carver
Subject: Re: [gpsd-users] Issue with Rasbian Jessie
Date: Sun, 6 Mar 2016 11:08:31 -0800
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

On 2016-03-06 01:07, Bo Berglund wrote:
> On Sun, 6 Mar 2016 08:38:47 +0100, Henrik Bieler
> <address@hidden> wrote:
> 
>> My /etc/default/gpsd looks like this:
>>
>> START_DAEMON="true"
>> GPSD_OPTIONS="-G -n"
>> DEVICES="/dev/ttyAMA0"
>> USBAUTO="false"
>> GPSD_SOCKET="/var/run/gpsd.sock"
>>
>>
>> see manpage for what -D and -n do. Maybe you don't need -G
>>
>> cgps timing out might be because the gps has no fix yet. I use gpspipe
>> -r instead.
>>
>> for further debugging you could add -D 5 option and check whats happening.
>>
>> sudo journalctl -b -u gpsd.service
>>
> 
> Thanks for that!
> I added the differences between your and my /etc/default/gpsd file
> into mine using ttyUSB0.
> 
> After reboot the gpsd is working!
> 
> Question #1:
> The -G switch supposedly opens listening ports not only on localhost
> but also on the other network interfaces.
> So I set it too hoping I could connect to the socket from my PC and
> see the GPS data stream.
> 
> But is there some way to watch the stream using a browser or similar
> on the PC (Windows7)?
> Right now when I enter URL=http://192.168.0.148:2947/ into Firefox it
> just sits and sisplays "Transferring data from 192.168.0.148:2947"
> So it actually connects and apparently loads data but nothing shows
> up.
> Not unexpected but it would be nice to be able to see the data also on
> my PC when the port is opened...
> 
> Question #2:
> Is it possible to make gpsd NOT use IPv6? I see no reason whatsoever
> for the RPi3 to even run IPv6 when my network is exclusively IPv4...
> 

Browsers don't work that way.  They expect properly formatted data with
a header explaining what is arriving so it knows how to render the
subsequent data.  The gpsd port is also bidirectional and doesn't issue
any data at first.  When you connect to that port you have to send a
command to gpsd to have data start flowing (the WATCH command):

?WATCH={"enable":true,"json":true}

You could do this using telnet and then manually type in the watch
command once the connection is made.   A browser can't do this for you
which is why you see nothing.

You'll need to disable the watch when you want to close the connection:

?WATCH={"enable":false}



As for IPv6, gpsd is going to use what the system says is available.  If
your network is only IPv4 and not likely to change then you can disable
IPv6 system wide by the following two commands:

echo net.ipv6.conf.all.disable_ipv6=1 > /etc/sysctl.d/disableipv6.conf

sysctl -p

(You may need to reboot in order for other services to release IPv6
addresses).

Just remember you did this in case you need IPv6 in the future.



reply via email to

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