![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Gee! These Aren't Roasted!
![]() |
Using Bluetooth GPS
This how too describes how to get your bluetooth GPS device to work under linux
This is my second how too and parts of the files needed were installed at different times ie the bluetooth a few months ago so if anyone has any problems / suggestions let me know Step 1 install the needed bluetooth files: Code:
sudo apt-get install bluez-pin sudo apt-get install bluez-utils Code:
sudo gedit /etc/bluetooth/hcid.conf Code:
#
# 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 user;
# Pairing mode
# none - Pairing disabled
# multi - Allow pairing with already paired devices
# once - Pair once and deny successive attempts
pairing multi;
# PIN helper
pin_helper /usr/bin/bluepin;
# D-Bus PIN helper
#dbus_pin_helper;
}
# Default settings for HCI devices
device {
# Local device name
# %d - device id
# %h - host name
name "Nino's Laptop";
# Local device class
class 0x3e0100;
# Default packet type
#pkt_type DH1,DM1,HV1;
# Inquiry and Page scan
iscan enable; pscan enable;
# 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;
# Authentication and Encryption (Security Mode 3)
#auth enable;
#encrypt enable;
}
Code:
sudo /etc/init.d/bluez-utils restart Code:
hcitool scan Code:
00:16:4E:D7:AE:5F Nokia N70
00:12:62:AF:C0:6E Nino
00:11:67:80:41:96 BT-GPS
With the bluetooth we need to create a serial connection between our GPS device and the computer to do this we first need some information on the device; the MAC code and the serial port. do a Code:
hcitool scan 00:16:4E 00:12:62:AF:C0:6E Nino 00:11:67:80:41:96 BT-GPS so i want: 00:11:67:80:41:96 to get the serial port do Code:
sdptool browse 00:11:67:80:41:96 Code:
Browsing 00:11:67:80:41:96 ...
Service Name: Bluetooth Serial Port
Service RecHandle: 0x10007
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
Profile Descriptor List:
"Serial Port" (0x1101)
Version: 0x0100
now create a file in /etc/bluetooth/ called rfcomm Code:
sudo gedit /etc/bluetooth/rfcomm.conf Code:
rfcomm4 {
bind yes;
device < GPS MAC ADDRESS>;
channel 1;
comment "Serial Port";
}
Code:
rfcomm connect 4 "Can't create RFCOMM TTY: Address already in use" do: Code:
sudo rfcomm release 4 Code:
rfcomm connect 4 nino@laptop:~$ rfcomm connect 4 Connected /dev/rfcomm4 to 00:11:67:80:41:96 on channel 1 Press CTRL-C for hangup any GPS software you are gonna use will make use of the /dev/rfcomm4 Step 3 Now to test the GPS install the GPS utils Code:
sudo apt-get install gpsd-clients sudo apt-get install gpsd Code:
gpsd /dev/rfcomm4 Code:
xgps ![]() if you want a tracking program have a looky at gpsdrive ![]() Enjoy Nino
__________________
1. A computer is a machine for rearranging bits 2. The Internet is a machine for moving bits from one place to another very cheaply and quickly Last edited by ninocass; April 11th, 2007 at 06:54 AM.. |
|
|
|
|
|
#2 |
|
5 Cups of Ubuntu
![]() Join Date: Mar 2006
Beans: 13
Kubuntu 6.10 Edgy
|
Re: Using Bluetooth GPS
I've done everything exactly like the howto, but when i type:
rfcomm connect 4 I'm getting this error: ruben-desktop:~$ rfcomm connect 4 syntax error line 3 Can't find a config entry for rfcomm4 Can you help me? |
|
|
|
|
|
#3 |
|
First Cup of Ubuntu
![]() Join Date: Aug 2006
Beans: 1
|
Re: Using Bluetooth GPS
When editing the /etc/bluetooth/rfcomm.conf file you have to make sure you enter the information without the < Brackets >
this is my rfcomm.conf file rfcomm4 { bind yes; device 00:08:1B:12:FA:BB; channel 1; comment "Serial Port"; } Just on a side note, thanks to ninocass for a fantastic HowTo. |
|
|
|
|
|
#4 |
|
First Cup of Ubuntu
![]() Join Date: Jul 2006
Beans: 6
|
Re: Using Bluetooth GPS
Hi, first thanks for the howto.
Following it, I manage to have my gps bt listed while scanning: Code:
$> hcitool scan Scanning ... 00:0D:B5:30:47:C3 BT-GPS-3047C3 Code:
sdptool browse 00:0D:B5:30:47:C3 Browsing 00:0D:B5:30:47:C3 ... Bye! |
|
|
|
|
|
#5 |
|
First Cup of Ubuntu
![]() Join Date: Aug 2006
Beans: 11
|
Re: Using Bluetooth GPS
It failed in this stage
Code:
root@ed-laptop:/home/ed# hcitool scan
Scanning ...
00:0B:0D:xx:04:xx HOLUX GPSlim236
Code:
root@ed-laptop:/home/ed# sdptool browse 00:0B:0D:xx:04:xx Failed to connect to SDP server on 00:0B:0D:xx:04:xx: Connection timed out I have tried "sdptool browse" with my Nokia N70 and tons of info come out. Wondering what was the problem. And thanks for the guide! REgards |
|
|
|
|
|
#6 |
|
First Cup of Ubuntu
![]() Join Date: Aug 2006
Beans: 11
|
Re: Using Bluetooth GPS
solved the problem
i typed "sdptool browse" for 2 times it just work! Regards |
|
|
|
|
|
#7 |
|
A Carafe of Ubuntu
![]() Join Date: May 2006
Beans: 85
Ubuntu 9.04 Jaunty Jackalope
|
Re: Using Bluetooth GPS
I can get /dev/rfcomm4 up and running but none of the gps software will read any thing. Do you have to worry about baud rates or does gpsd do all that for you? Other wise i might just have crap reception on my gps. Will xgps, just have nothing if it can not see enought satellites? Any how i'm using a ASUS BT-100 if anyone has had any luck.
|
|
|
|
|
|
#8 | |
|
Way Too Much Ubuntu
![]() Join Date: Oct 2006
Location: European Union
Beans: 283
Ubuntu Jaunty Jackalope (testing)
|
Re: Using Bluetooth GPS
Everything seems ok, but, like frankuzzo, I manage to have my gps bt listed while scanning, but then on the following browse command I get nothing. It just says
Quote:
What am I doing wrong?
__________________
Retire, miscreants, to your muddy billabongs and forget even passive attempts to educate windozian zombies: how can those of easy virtue, who simply stroll into a store and "buy" programs off the rack, compare to us? |
|
|
|
|
|
|
#9 |
|
Way Too Much Ubuntu
![]() Join Date: Oct 2006
Location: European Union
Beans: 283
Ubuntu Jaunty Jackalope (testing)
|
Re: Using Bluetooth GPS
Turns out now it works, despite the fact that the browsing still does not give any answer from the unit.
For me it works like this 1) sudo hcitool scan (find unit) 2) sudo sdptool browse 00:00:00:00:00:00 (whatever it is) 3) sudo rfcomm release 0 (very important for me) 4) sudo rfcomm connect 0 ...connected /dev/rfcomm0 to 00:00:00:00:00:00 (whatever) ...Press CTRL-C for hangup and then on a separate terminal 5) sudo gpsd /dev/rfcomm0 6) sudo xgps (of course rfcomm.conf is configured)
__________________
Retire, miscreants, to your muddy billabongs and forget even passive attempts to educate windozian zombies: how can those of easy virtue, who simply stroll into a store and "buy" programs off the rack, compare to us? |
|
|
|
|
|
#10 |
|
5 Cups of Ubuntu
![]() Join Date: Oct 2006
Location: Finland
Beans: 33
Ubuntu 7.10 Gutsy Gibbon
|
Re: Using Bluetooth GPS
You may try using sdptool records instead of browse. It worked for me.
Well, I still get nothing. xgps says "no data arriving". Has anyone had the same problem and found a solution for it? EDIT: solved by rebooting the computer Last edited by dotsi; February 18th, 2007 at 01:20 PM.. |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|