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.

Requisiti:

- 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: 0×90001
Service Class ID List:
“Serial Port” (0×1101)
Protocol Descriptor List:
“L2CAP” (0×0100)
“RFCOMM” (0×0003)
Channel: 1
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0×100

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!

Tags: , , , , , , , ,

Post simili:

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.

22 Responses to “Usare Linux come navigatore GPS con Ubuntu e GPSDrive (un tomtom free)”
  1. GPS Bluetooth on Ubuntu Linux | IT Computer Software & Linux
    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 [...]

  2. Nice “linux” photos | IT Computer Software & Linux
    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 [...]

  3. The A2Z Articles Directory | Lastest GPS News
    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 [...]

  4. President
    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.

  5. Marina
    13:40 on January 14th, 2010

    Ciò vale anche su cellulare con sistema operativo Linux Mobile?

  6. Mirko
    16:59 on February 6th, 2009

    A me invece non mi fa modificare il file rfcomm.conf!!!!

  7. Alessandro
    21:51 on December 17th, 2008

    for elbambolo:

    ciao, anche a me da quell’errore, però poi eseguendo il comando di gpsd e gpsdrive funge tutto.

    Ciao!

  8. donvito
    15:30 on December 4th, 2008

    Se utilizzate linux, ie Ubuntu,
    Cercate con Synaptic “blueproximity” e hop !

  9. amedeo
    01:46 on August 28th, 2008

    Per Mauri:
    Ho avuto lo stesso problema con un GPS Bluetooth Kraun:
    dopo aver trovato il mac address, prova semplicemente ad agganciarlo con il comando

    rfcomm connect 0 00:0B:0D:19:20:D6

    ovviamente sostituendo il mac address con quello tuo

    (da http://gentoo-wiki.com/HOWTO_use_Bluetooth_GPS_device_(_with_GPSD_) )

  10. navigatore con tangogps e mappe di openstreetmap | La scrivania virtuale di Sdonk
    11:50 on August 18th, 2008

    [...] l’antenna al demone che gestisce il gps (gpsd), per farlo ho seguito pedissequamente l’ottima guida del blog di [...]

  11. Royaltek RBT-2210 Ubuntu. | pwrusr.com
    23:46 on July 27th, 2008

    [...] searched for wiki infos and howtos to make this gps bluetooth receiver work correctly under my favourite open source distro, and after [...]

  12. Stemby
    01:40 on January 1st, 2008

    Sul wiki di navit c’è questo:

    http://wiki.navit-project.org/index.php/OpenStreetMaps

    Non so se possa tornarti utile…

    Fate sapere le vostre esperienze, è un argomento che mi interessa ma che non ho ancora esplorato (e sinceramente non sono ancora sicuro di aver capito quali siano gli strumenti più promettenti).

    Buon anno!

  13. carlo
    16:43 on December 13th, 2007

    ho installato gpsdrive svn e il pachetto .deb di openstreetmap-mapnik-world-boundaries, e in modo mapnik riesco a vedere solo una mappa del mondo in bianco e azzurro. come si ottengono le carte dettagliate di OMS? riesco a scaricare e vedere quelle di expedia soltanto.
    grazie

  14. Stemby
    13:01 on December 9th, 2007

    Chi è dotato di antenna GPS, dovrebbe provare Navit + OpenStreetMap

    * http://navit.sourceforge.net/
    * http://www.openstreetmap.org/

    Finalmente un sistema TOTALMENTE LIBERO e dalle enormi potenzialità. Unico limite: le mappe OSM, in Italia, sono ancora estremamente limitate, dovremmo contibuire in massa! Se fate un giro ad esempio per l’Olanda, vedrete che lì il territorio è ormai interamente mappato, e quindi gli olandesi hanno davvero un’alternativa libera.

    Fatemi sapere come se la cava: a quel punto ci farei un pensierino (acquisto di un palmare col pinguino a bordo e antenna GPS).

  15. elbambolo
    17:23 on November 29th, 2007

    Dimenticavo…
    l’errore che mi da è il seguente:

    Can’t create RFCOMM TTY: address already in use.

    sapete da cosa puo dipendere?

  16. elbambolo
    17:10 on November 29th, 2007

    Ciao, quando do questo comando:

    mik@goa:~$ sudo rfcomm connect 4
    Connected /dev/rfcomm4 to 00:15:4B:01:33:C5 on channel 1
    Press CTRL-C for hangup

    mi dice che non è possibile connettersi.
    come posso risolvere?

  17. Raffaele Diotallevi
    20:11 on September 3rd, 2007

    Dovrei aver risolto grazie 1000

  18. michele
    18:50 on August 31st, 2007

    @Raffaele: che problemi hai? di solito basta inserire la chiavetta e Ubuntu fa il miracolo ;)
    https://help.ubuntu.com/community/BluetoothSetup

  19. Raffaele
    18:47 on August 31st, 2007

    Per poter fare funzionare il tutto mi serve fare funzionare un adattatore/convertitore Bluetooth USB Dongle perche il mio HP portatile non è provvisto di connessione Bluetooth. Mi sapete dire come si installa l’adattatore USB su UBUNTU 7.04 ?

    Grazie Raffaele

  20. michele
    12:29 on August 25th, 2007

    Ciao Zeno, grazie per il commento chiaro ed esaustivo, quello di paragonarlo a un tomtom in effetti era solo un modo per far capire di cosa si stesse parlando, e’ chiaro che le differenze sono sostanziali e non paragonabili a un navigatore satellitare “commerciale”.

Leave a comment

(required)

(required)


Comments links could be nofollow free.

Categories