Blog Code Forum



Jump to: navigation, search


Software requirements

GPS setup

# hciconfig
hci0:   Type: BR/EDR  Bus: USB
        BD Address: 10:20:30:40:50:60  ACL MTU: 192:8  SCO MTU: 64:8
        RX bytes:991486 acl:56018 sco:0 events:1228 errors:0
        TX bytes:16043 acl:1179 sco:0 commands:33 errors:0
# hciconfig hci0 up
# hcitool scan
Scanning ...
        10:20:30:40:50:60       GSpace GS-R238
# rfcomm connect rfcomm0 10:20:30:40:50:60
Connected /dev/rfcomm0 to 10:20:30:40:50:60 on channel 1
Press CTRL-C for hangup
# chmod o+r /dev/rfcomm0


$ nano ~/.navit/navit.xml

        <!-- Vehicle with GPS enabled for bluetooth on unix -->
        <vehicle name="Local GPS" profilename="car" enabled="yes" active="1" source="file://dev/rfcomm0" gpsd_query="w+xj">
                <!-- Navit can write a tracklog in several formats (gpx, nmea or textfile): -->
                <log enabled="no" type="gpx" attr_types="position_time_iso8601,position_direction,position_speed,profilename,position_radius" data="track_%Y%m%d-%%i.gpx" flush_size="1000" flush_time="30"/>
        <!-- If you dont want to use the sample map, either set enabled="no" in the next line or remove the xml file from the maps directory -->
        <mapset enabled="no">
                <xi:include href="$NAVIT_SHAREDIR/maps/*.xml"/>
        <!-- Mapset template for openstreetmaps -->
        <mapset enabled="yes">
                <map type="binfile" enabled="yes" data="/home/cyril/Download/GPS/maps/osm/osm_idf.bin"/>


$ nano .gpsdrive/gpsdriverc

geoinfofile = /home/cyril/.gpsdrive/geoinfo.db
mapnik_font_path = /usr/share/fonts/TTF

$ sudo systemctl start gpsd
$ systemctl status gpsd
gpsd.service - GPS (Global Positioning System) Daemon
   Loaded: loaded (/usr/lib/systemd/system/gpsd.service; static)
   Active: active (running) since sam. 2013-08-31 14:58:55 CEST; 3s ago
 Main PID: 18186 (gpsd)
   CGroup: name=systemd:/system/gpsd.service
           └─18186 /usr/bin/gpsd -N /dev/rfcomm0
Personal tools