Jendker
Posts: 28
Joined: Tue Oct 13, 2015 7:46 am

GPS Neo-6M with Raspbian Jessie

Sat Dec 05, 2015 3:20 pm

Hello,

I have a problem, I was able to use GPS module on Raspbian Wheezy without any problems.
I am using this tutorial: https://github.com/mcauser/Raspberry-Pi ... GPS-NEO-6M but since Raspbian Jessy has changed to systemd i cannot use their description on how to disable serial port. I was trying to use raspi-config to disable the serial port, but while starting the gpsd command:

sudo gpsd -b -N -D 3 -n -F /var/run/gpsd.sock /dev/ttyAMA0 (which is the command to start the gpsd in the debug mode, normal command doesn't show any errors but doesn't start gpsd at all... I always used the debug to check GPS module on Wheezy)

The answer:
gpsd:INFO: launching (Version 3.11)
gpsd:ERROR: can't bind to IPv4 port gpsd, Address already in use
gpsd:ERROR: maybe gpsd is already running!
gpsd:ERROR: can't bind to IPv6 port gpsd, Address already in use
gpsd:ERROR: maybe gpsd is already running!
gpsd:INFO: command sockets creation failed, netlib errors -1, -1

Did anyone of you have more luck with running GPS Neo-6M on Raspbian Jessie?

punktea
Posts: 21
Joined: Thu Jul 18, 2013 8:55 am

Re: GPS Neo-6M with Raspbian Jessie

Sun Dec 06, 2015 3:10 pm

I have Neo-6M GPS device working fine with Jessie. I only needed to edit /boot/cmdline.txt (remove ttyAMA0) and reboot.

To run gpsd as daemon:
cat /etc/default/gpsd
START_DAEMON="true"
GPSD_OPTIONS=""
DEVICES="/dev/ttyAMA0"
USBAUTO="false"
GPSD_SOCKET="/var/run/gpsd.sock"

To run manually to debug:
/usr/sbin/gpsd -N -D 4 -F /var/run/gpsd.sock -P /var/run/gpsd.pid /dev/ttyAMA0

Jendker
Posts: 28
Joined: Tue Oct 13, 2015 7:46 am

Re: GPS Neo-6M with Raspbian Jessie

Sun Dec 06, 2015 3:47 pm

Thank you punktea, setting the values in the /etc/default/gpsd solved the issue :)

Everything works fine.

terilars
Posts: 5
Joined: Sat Jan 23, 2016 2:34 pm

Re: GPS Neo-6M with Raspbian Jessie

Sat Jan 23, 2016 3:21 pm

I run an Adafruit GPS on Jessie. I have followed Adafruit tutorials and modified/etc/default/gpsd excactly like punktean said. In addition, I have edited /boot/cmdline.txt. I get exact same error message as OP from /usr/sbin/gpsd -N -D 4 -F /var/run/gpsd.sock -P /var/run/gpsd.pid /dev/ttyAMA0.

sudo killall gpsd and ps aux | grep ttyAMA0 gives:
pi 1298 0.0 0.1 4232 1832 pts/0 S+ 15:20 0:00 grep --color=auto ttyAMA0

Any ideas to further problem solving?

huseyinkoc
Posts: 1
Joined: Sat Feb 06, 2016 12:33 pm

Re: GPS Neo-6M with Raspbian Jessie

Sat Feb 06, 2016 12:41 pm

gps.PNG
gps.PNG (15.76 KiB) Viewed 14697 times


Why can not I get the latitude and longitude data.

Dingo_aus
Posts: 15
Joined: Wed Sep 28, 2011 5:50 am
Contact: Website

Re: GPS Neo-6M with Raspbian Jessie

Sun Mar 13, 2016 2:33 am

Jendker,
I think the issue you have is that Raspbian is not letting you open port 2947.

e.g. If you add -S 99 to your gpsd string does it change and open the port?

I suspect there is a default security setting blocking gpsd opening port 2947.
www.adventuresinsilicon.com

Dingo_aus
Posts: 15
Joined: Wed Sep 28, 2011 5:50 am
Contact: Website

Re: GPS Neo-6M with Raspbian Jessie

Sun Mar 13, 2016 2:58 am

Personally I have had much more success starting gpsd as a service than manually.

e.g. instead of gpsd -D8 -N ...

I run:

sudo service gpsd start

Then "cgps -s" gives me the right data.
www.adventuresinsilicon.com

rvn
Posts: 9
Joined: Thu Aug 08, 2013 9:41 am

Re: GPS Neo-6M with Raspbian Jessie

Mon Apr 18, 2016 11:47 pm

Hello,

i just had a hard time solving this problem, but then i found the solution in this thread from Per Linderholm: viewtopic.php?f=28&t=138711

Just change in

/lib/systemd/system/gpsd.socket

ListenStream=127.0.0.1:2947
to
ListenStream=0.0.0.0:2947

Return to “Automation, sensing and robotics”