[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-users] Issue with Rasbian Jessie
From: |
Bo Berglund |
Subject: |
Re: [gpsd-users] Issue with Rasbian Jessie |
Date: |
Sun, 06 Mar 2016 01:28:57 +0100 |
On Sun, 6 Mar 2016 00:13:38 +0100, Henrik Bieler
<address@hidden> wrote:
>put this as "gpsd.service" in /etc/systemd/system/
>
>[Unit]
>Description=GPS DaemonMOD #mod to disable sockets
>ConditionPathExists=|/usr/sbin
>After=network.target
>
>[Service]
>EnvironmentFile=-/etc/default/gpsd
>ExecStart=/usr/sbin/gpsd -N $GPSD_OPTIONS $DEVICES
>
>[Install]
>WantedBy=multi-user.target
>
>
>
>Then do the following:
>
>sudo systemctl daemon-reload
>sudo systemctl disable gpsd.socket
>sudo systemctl enable gpsd.service
>
>reboot. see if gpsd starts. you can give commandline options in
>/etc/default/gpsd
>
>Should work by then.
Did the above but gpsd is not running.
No orphaned TCP port 2947, though.
>**********************************
>Put the following in /etc/systemd/system/gpsd_settty.service
>
>[Unit]
>Description=gpsd set initial baudrate for BU-353 GPS
>Before=gpsd.service
>
>[Service]
>Type=oneshot
>RemainAfterExit=yes
>ExecStart=/bin/stty -F /dev/ttyUSB0 speed 4800
>
>[Install]
>WantedBy=gpsd.service
>
>
>Then do:
>sudo systemctl daemon-reload
>sudo systemctl enable gpsd_settty.service
>reboot
Did this too (changed to ttyUSB0 and 4800 baud as shown above)
After the reboot there is this response:
address@hidden:~ $ cgps -s
cgps: no gpsd running or network error: -6, can't connect to host/port
pair
So then I tried this to start gpsd service:
sudo systemctl start gpsd
There was no error message or such but the netstat did not show any
port listening and the command line response was the same.
Finally I edited the /etc/default/gpsd and entered ttyUSB0 as a device
to check.
Rebooted and waited a while.
Now gpsd is running and there is a TCP port listed so it should work.
But cgps -s just shows an empty screen with no data until it times
out.
I even tested:
sudo systemctl stop gpsd
sudo systemctl start gpsd
Same result..
Finally:
sudo systemctl stop gpsd
sudo gpsd /dev/ttyUSB0 -F /var/run/gpsd.sock
Now by manually starting the daemon it works and cgps -s displays
running data.
So it seems like gpsd will not work properly on boot for me but will
work when I manually start it......
This is what I have in the files mentioned above:
/etc/default/gpsd:
------------------
# Default settings for the gpsd init script and the hotplug wrapper.
# Start the gpsd daemon automatically at boot time
START_DAEMON="true"
# Use USB hotplugging to add new USB devices automatically to the
daemon
USBAUTO="true"
# Devices gpsd should collect to at boot time.
# They need to be read/writeable, either by user gpsd or the group
dialout.
DEVICES="ttyUSB0"
# Other options you want to pass to gpsd
GPSD_OPTIONS=""
/etc/systemd/system/gpsd_settty.service:
-----------------------------------------
[Unit]
Description=gpsd set initial baudrate for BU-353 GPS
Before=gpsd.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/stty -F /dev/ttyUSB0 speed 4800
[Install]
WantedBy=gpsd.service
Any suggestions?
--
Bo Berglund
Developer in Sweden
- Re: [gpsd-users] Issue with Rasbian Jessie, (continued)
- Re: [gpsd-users] Issue with Rasbian Jessie, Bo Berglund, 2016/03/05
- Re: [gpsd-users] Issue with Rasbian Jessie, Jon Brase, 2016/03/05
- Re: [gpsd-users] Issue with Rasbian Jessie, Alexander Carver, 2016/03/05
- Re: [gpsd-users] Issue with Rasbian Jessie, Bo Berglund, 2016/03/05
- Re: [gpsd-users] Issue with Rasbian Jessie, Alexander Carver, 2016/03/05
- Re: [gpsd-users] Issue with Rasbian Jessie, Henrik Bieler, 2016/03/05
- Re: [gpsd-users] Issue with Rasbian Jessie, Henrik Bieler, 2016/03/05
- Re: [gpsd-users] Issue with Rasbian Jessie,
Bo Berglund <=
- Re: [gpsd-users] Issue with Rasbian Jessie, Henrik Bieler, 2016/03/06
- Re: [gpsd-users] Issue with Rasbian Jessie, Bo Berglund, 2016/03/06
- Re: [gpsd-users] Issue with Rasbian Jessie, Alexander Carver, 2016/03/06
- Re: [gpsd-users] Issue with Rasbian Jessie, Bo Berglund, 2016/03/05
- Re: [gpsd-users] Issue with Rasbian Jessie, Bo Berglund, 2016/03/05