install the needed bluetooth files:
sudo apt-get install bluez-pin sudo apt-get install bluez-utils
Then edit the main bluetooth config file:
(This part not required in 7.04 feisty fawn)
sudo gedit /etc/bluetooth/hcid.conf
delete everything in the file and replace it with:
# 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;
}
restart the bluetooth services
sudo /etc/init.d/bluez-utils restart
(recommence here for feisty fawn)
and now to test the bluetooth:
hcitool scan
this should return a list of devices like:
00:0B:0D:85:28:4F HOLUX GPSlim236
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:0B:0D:85:28:4F HOLUX GPSlim236
so i want: 00:0B:0D:85:28:4F
to get the serial port do
sdptool browse 00:0B:0D:85:28:4F
which will return
Browsing 00:0B:0D:85:28:4F ...
Service Name: SPP slave
Service Description: Bluetooth SPP V1.52
Service RecHandle: 0x10000
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
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";
}
this is my rfcomm.conf file
rfcomm4 {
bind yes;
device 00:0B:0D:85:28:4F;
channel 1;
comment "Serial Port";
}
to start using the GPS type:
rfcomm connect 4
if for some reason you get
"Can't create RFCOMM TTY: Address already in use"
do:
sudo rfcomm release 4
again followed by
rfcomm connect 4
that should display:
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
Now to test the GPS install the GPS utils
sudo apt-get install gpsd-clients gpsd
the GPSD is the daemon for the GPS reciever so we want to bind the service with the device:
gpsd /dev/rfcomm4
alternatively we could use a usb gps with
gpsd /dev/ttyUSB0
http://myy.helia.fi/~karte/haicom_hi-204e_usb_gps_on_linux.html
and finally to see if were getting any information from the GPS device run
xgps
and that will give you something like this.
first thing wee need to do is install the program through wine, i simply used the option in nautilas to open using wine and followed the prompts.
this installed a desktop shortcut and from there a simple double click on the launcher and your away,
The problem with OziExplorer is it doesn't recognize ”/dev/…”, so we can get around the problem making a “sym link” from “COM to RFCOMM”. I chose COM4 to avoid interference with other things. remember that in linux, COM1=/dev/ttyS0, COM2=/dev/ttyS1, etc. (COM4=/dev/ttyS3).
In the terminal, type:
sudo ln -sb /dev/rfcomm4 /dev/ttyS3
(the “b” option makes a backup copy of ttyS3 in case you want to “get back”)
After that, you must start Oziexplorer again and:
In “Ozi”, go to the menu “File” > “Configuration” > “GPS” and choose your GPS make and model. Then, under “COM” choose COM4, leave the “Garmin USB” or other UNCHECKED (this way, the software “thinks” the GPS is under COM4…)
SAVE the configuration and exit.
FINISHED!!! By now, you will be able to communicate from the GPS, and have Oziexplorer working just fine!
Linux Distribution: Ubuntu Linux 6.10 edgy/7.04 feisty OziExplorer version: 3.95.4i Wine version: 0.9.22
sources