GPS povezivanje/Ubuntu

Izvor: HrOpenWiki
Inačica od 23:14, 2. prosinca 2008. koju je unio/unijela Grof (razgovor | doprinosi)

(razl) ←Starija inačica | vidi trenutačnu inačicu (razl) | Novija inačica→ (razl)
Skoči na: orijentacija, traži

and now to test the bluetooth: Code:

hcitool scan

this should return a list of devices like: Code:

       00:16:4E:D7:AE:5F       Nokia N70
       00:12:62:AF:C0:6E       Nino
       00:11:67:80:41:96       BT-GPS

Step 2

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

hcitool scan

and take the MAC address of the GPS unit in my case:

00:16:4E7:AE:5F Nokia N70
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

sdptool browse 00:11:67:80:41:96

which will return

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

the channel we want is 1

now create a file in /etc/bluetooth/ called rfcomm

sudo gedit /etc/bluetooth/rfcomm.conf

adding an entry:

rfcomm4 {
       bind yes;
       device < GPS MAC ADDRESS>;
       channel 1;
       comment "Serial Port";
       }