GPS on Raspberrypi

October 12, 2013 | In: gps, raspberrypi, rpi

I got a GPS usb device for my raspberrypi to play with some “geoloc” stuff and the first problem i encounter is i cannot make it to work. I got an error like this:

gpsd:ERROR: can't bind to IPv4 port gpsd, Address already in use
gpsd:ERROR: maybe gpsd is already running!
gpsd:ERROR: can't create IPv6 socket

When i tried the following:

pi@raspberrypi ~ $ sudo lsusb
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 004: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 001 Device 005: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter

It said , it has all our devices working. After googling in a few minutes, i found out that it is a “permission” problem , so i edit the file “/etc/init.d/gpsd” and added on it the line:

/bin/chmod 666 /dev/ttyUSB0

And now it’s working!



4 Responses to GPS on Raspberrypi

Avatar

Ahmed

March 11th, 2015 at 6:02 am

where i add this line /bin/chmod 666 /dev/ttyUSB0 ?

thanks in advance

Avatar

zeratool

March 24th, 2015 at 4:44 pm

Ahmed,

You will find the file to edit at /etc/init.d/gpsd

Avatar

June

November 16th, 2015 at 9:08 pm

where add this line /bin/chmod 666 /dev/ttyUSB0 ?

Avatar

zeratool

January 21st, 2016 at 10:47 pm

@June

/etc/init.d/gpsd

Comment Form