Usare Linux come navigatore GPS con Ubuntu e GPSDrive (un tomtom free)
Se volete usare il vostro sistema Linux come fosse un navigatore satellitare, una specie di TomTom gratuito, questa e’ una guida abbastanza esauriete di come fare e di che cosa avete bisogno.
– PC con installato Linux (in questo how-to ho usato Ubuntu)
– Periferica Bluetooth per il PC
– Antenna GPS Bluetooth (ho usato un HOLOX BT-321)
– Preferibile avere il PC connesso ad Internet (almeno per le impostazioni iniziali e per scaricare le mappe)
– Un po’ di pazienza ;)
How-to:
Prima di tutto e’ indispensabile che il vostro sistema Linux sia dotato di bluetooth sia hardware che software, un antenna GPS bluetooth costa qualcosa come 50 Euro, ne trovate parecchie su eBay per quel prezzo (spedizioni comprese).
Installiamo il software necessario al bluetooth (potreste averlo gia’ installato):
sudo apt-get install bluez-pin
sudo apt-get install bluez-utils
Controllate che il file /etc/bluetooth/hcid.conf sia simile a questo:
#
# HCI daemon configuration file.
## HCId options
options {
# Automatically initialize new devices
autoinit yes;# Security Manager mode
# none – Security manager disabled
# auto – Use local PIN for incoming connections
# user – Always ask user for a PIN
#
security auto;# Pairing mode
# none – Pairing disabled
# multi – Allow pairing with already paired devices
# once – Pair once and deny successive attempts
pairing multi;# Default PIN code for incoming connections
passkey “1234”;
}# Default settings for HCI devices
device {
# Local device name
# %d – device id
# %h – host name
name “%h-%d”;# Local device class
class 0x3e0100;# Default packet type
#pkt_type DH1,DM1,HV1;# Inquiry and Page scan
iscan enable; pscan enable;
discovto 0;# Default link mode
# none – no specific policy
# accept – always accept incoming connections
# master – become master on incoming connections,
# deny role switch on outgoing connections
lm accept;# Default link policy
# none – no specific policy
# rswitch – allow role switch
# hold – allow hold mode
# sniff – allow sniff mode
# park – allow park mode
lp rswitch,hold,sniff,park;
}
Riavviate il BT del pc con il comando:
sudo /etc/init.d/bluez-utils restart
Ora accendete il GPS Bluetooth e cerchiamo qual’e’ il suo mac address:
sudo hcitool scan
Vi riportera’ qualcosa come questo:
mik@goa:~$ sudo hcitool scan
Scanning …
00:16:CF:DC:B9:81 landsraad-0
00:15:4B:01:33:C5 BTGPS-321
Il mio ricevitore GPS BT ha come mac 00:15:4B:01:33:C5 e come nome BTGPS-321, ma a noi interessa il mac, copiatelo e usatelo in questo modo per verificare su che canale lavora:
sudo sdptool browse 00:15:4B:01:33:C5
che ci riportera’ il seguente output:
mik@goa:~$ sudo sdptool browse 00:15:4B:01:33:C5
Browsing 00:15:4B:01:33:C5 …
Service Name: SPP
Service RecHandle: 0x90001
Service Class ID List:
“Serial Port” (0x1101)
Protocol Descriptor List:
“L2CAP” (0x0100)
“RFCOMM” (0x0003)
Channel: 1
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
Ora che sappiamo che il GPS lavora sul canale 1 creiamo (o modifichiamo se esiste gia’) il file /etc/bluetooth/rfcomm.conf, inserendo le informazioni che abbiamo ricavato (mac address e canale):
#
# RFCOMM configuration file.
#rfcomm4 {
bind yes;
device 00:15:4B:01:33:C5;
channel 1;
comment “Serial Port”;
}
Non rimane altro che collegare il nostro PC al GPS BT creando una porta seriale chiamata /dev/rfcomm4
sudo rfcomm 4 connect
Se tutto e’ andato bene otterremo questo risultato:
mik@goa:~$ sudo rfcomm connect 4
Connected /dev/rfcomm4 to 00:15:4B:01:33:C5 on channel 1
Press CTRL-C for hangup
Abbiamo ora il nostro PC collegato a un antenna GPS via Bluetooth, in teoria siamo gia’ in grado di rilevare la nostra posizione, ma ci servono ancora un paio di programmi che facciano tutto loro:
sudo apt-get install gpsd gpsdrive
Colleghiamo il demone gpsd alla porta del nostro GPS BT:
sudo gpsd /dev/rfcomm4
Lanciamo gpsdrive e buon divertimento!
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.
14:27 on February 20th, 2013
[…] GPS Bluetooth on Ubuntu Linux Graphic by MicheleM_ How to link your Linux box with a Bluetooth GPS receiver […]
07:33 on November 8th, 2012
[…] GPS Bluetooth on Ubuntu Linux Image by MicheleM_ How to connect your Linux box with a Bluetooth GPS receiver […]
14:03 on November 26th, 2011
garmin 765t…
below are some links I found useful…
20:10 on November 6th, 2011
[…] GPS Bluetooth on Ubuntu Linux Image by MicheleM_ How to connect your Linux box with a Bluetooth GPS receiver […]
06:25 on October 4th, 2011
great submit, very informative. I ponder why the other specialists of this sector do not understand this. You should proceed your writing. I am confident, you’ve a great readers’ base already!
11:05 on October 2nd, 2011
Heya i?m for the first time here. I came across this board and I find It truly useful & it helped me out much. I hope to give something back and help others such as you helped me.
21:17 on September 12th, 2011
Hello, i think that i saw you visited my website thus i came to ?return the prefer?.I’m trying to in finding issues to improve my web site!I guess its adequate to use a few of your ideas!!
14:14 on September 7th, 2011
[…] GPS Bluetooth on Ubuntu Linux Image by MicheleM_ How to connect your Linux box with a Bluetooth GPS receiver […]
15:29 on August 27th, 2011
Wonderful items from you, man. I’ve consider your stuff previous to and you are just extremely magnificent. I really like what you have bought right here, really like what you’re stating and the best way during which you are saying it. You’re making it entertaining and you continue to take care of to stay it smart. I cant wait to read far more from you. This is really a wonderful website.
13:45 on April 21st, 2011
[…] GPS Bluetooth on Ubuntu Linux Image by MicheleM_ How to connect your Linux box with a Bluetooth GPS receiver […]
22:40 on March 3rd, 2011
[…] loan calculator Bluetooth GPS on Ubuntu Linux Image by MicheleM_ How to connect your Linux with a Bluetooth GPS receiver instantempo instantempo instantempo Author: admin on March 3, 2011 Category: Linux Tags: […]
00:36 on January 26th, 2011
[…] GPS Bluetooth on Ubuntu Linux Image by MicheleM_ How to connect your Linux box with a Bluetooth GPS receiver […]
02:31 on December 4th, 2010
[…] GPS Bluetooth on Ubuntu Linux Image by MicheleM_ How to connect your Linux box with a Bluetooth GPS receiver […]
01:43 on October 21st, 2010
[…] Some cool navigation gps bluetooth images:GPS Bluetooth on Ubuntu Linux Image by MicheleM_ How to connect your Linux box with a Bluetooth GPS receiverHolux bluetooth GPS with Nokia N70 and tomtom Image by larskflem A friend had to test my Holux on […]
06:08 on September 8th, 2010
[…] GPS Bluetooth on Ubuntu Linux Image by MicheleM_ How to connect your Linux box with a Bluetooth GPS receiver […]
13:41 on August 25th, 2010
[…] out these linux images: GPS Bluetooth on Ubuntu Linux Image by MicheleM_ How to connect your Linux box with a Bluetooth GPS receiver Share and […]
05:41 on August 24th, 2010
[…] Bluetooth on Ubuntu Linux Image by MicheleM_ How to connect your Linux box with a Bluetooth GPS receiver Share and […]
19:12 on July 5th, 2010
[…] GPS Bluetooth on Ubuntu Linux Image by MicheleM_ How to connect your Linux box with a Bluetooth GPS receiver […]
18:03 on January 29th, 2010
Ciao a tutti desidererei sapere se qualcuno ha utilizzato Gpsdrive con le OSM. In caso positivo potreste indicarmi le linee guida per farlo funzionare con queste mappe?? Grazie President.
13:40 on January 14th, 2010
Ciò vale anche su cellulare con sistema operativo Linux Mobile?