Setup GPS on Zubuntu
First, to setup the bluetooth connection I need to install bluez,
Next, gpsd,apt-get install bluez
And last tangoGPS, to present a moving map using the OpenStreetMap project (or other sources...)apt-get install gpsd
apt-get install tangogps
Next setup the bluetooth connection. I'll be using rfcomm, the configuration file can be found under /etc/bluetooth/rfcomm.conf. I'm using this one. To find the bluetooth address of the device I use (after I turn on the gps, obviously),
The hcid.conf is missing in Zubuntu for some reason, so I create it (under /etc/bluetooth/hcid.conf). I'm using this hcid.conf.hcitool scan
The pin code is saved under /etc/bluetooth/pin, and can be generated by
or any other pin code.echo "0000" > /etc/bluetooth/pin
I also need to create the /bin/bluepincat.sh script for hcid, which contains,
To bind rfcomm0 with the gps I do#!/bin/shecho -n "PIN:"cat /etc/bluetooth/pin
rfcomm bind /dev/rfcomm0
The configuration for gpsd is under /etc/default/gpsd, there START_DAEMON should be set to "true" and DEVICES should point to "/dev/rfcomm0". To start the gpsd daemon,
/etc/init.d/gpsd start
Now I can start using tangoGPS and connect to my bluetooth GPS device.
No comments:
Post a Comment