cowasaki
Posts: 16
Joined: Tue Jan 10, 2012 5:55 am

GPS module

Thu Sep 26, 2013 2:10 pm

I'm trying to setup a GPS module. I've bought the right one and looked at this page:

http://blog.petrilopia.net/linux/raspbe ... s-working/

How to install USB GPS dongle to Raspberry Pi Raspbian Wheezy.

"I needed GPS on my Raspberry Pi to do some wardriving and I found Globalsat BU-353 GPS USB receiver SiRF III dongle which has worked perfectly."


First we have to install GPSD and GPS-Clients with apt-get:

Code: Select all

apt-get install gpsd gpsd-clients

After that you could get gpsd working with it’s .conf file but I haven’t so I just use short script to get my GPS working:

Code: Select all

pkill gpsd
gpsd -n -D 2 /dev/ttyUSB0


Save that example as gps.sh and give it enough rights:

Code: Select all

chmod +x gps.sh


Now run that script and test if your GPS is working using cgps:

Code: Select all

cgps -s


"You should shortly see some NMEA data and more location data like latitude, longitude, time and so on… If you get those to your screen your GPS is working OK."



I've got a completely fresh default wheezy installation and try typing the first line:

apt-get install gpsd gpsd-clients

but get the response:

E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

I've tried "su pi" but it makes no difference. Any ideas?

Dutch_Master
Posts: 362
Joined: Sat Jul 27, 2013 11:36 am

Re: GPS module

Thu Sep 26, 2013 3:25 pm

Try sudo instead of su.

Code: Select all

sudo apt-get install gpsd gpsd-clients

cowasaki
Posts: 16
Joined: Tue Jan 10, 2012 5:55 am

Re: GPS module

Thu Sep 26, 2013 3:52 pm

Thanks I will try then wheni get home.

Whig
Posts: 7
Joined: Fri Oct 04, 2013 8:17 am
Contact: Website

Re: GPS module

Fri Oct 04, 2013 8:20 am

Hi,

Did you get GPS work with your raspberry pi?
Try to log in as a root and then try that apt-get install line again.
--
My projects and other stuff: http://www.petrilopia.net/

cowasaki
Posts: 16
Joined: Tue Jan 10, 2012 5:55 am

Re: GPS module

Fri Oct 04, 2013 12:42 pm

Thank you.

I am building a computer into my landrover so the GPS was really rather useful. I now have a screen which tells me that the GPS is working :D

cowasaki
Posts: 16
Joined: Tue Jan 10, 2012 5:55 am

Re: GPS module

Fri Oct 04, 2013 12:43 pm

Now I just need a UK navigation program :)

Return to “Beginners”