Klings.NoWires.How-To()

Home

J2ME CDC CLDC MIDP 1.0 MIDP 2.0 MIDlets JABWT

Bluetooth

BTBrowser BTBenchmark KlingsLib

Code Structure Inquiry Service
search
RFCOMM Pitfalls Service record usage Service record manipulation

Devices Developers

Tools Rococo IDEs WTK NDS Antenna

How-To Bluez OBEX Eclipse NetBeans JBuilder WAP

About me

Bluez Setup on Redhat Linux 9

Bluetooth support is already available in the Redhat 9 kernel. To get Bluetooth up and running you'll need to download the following packages:

bluez-libs-2.7-1.i386.rpm
bluez-utils-2.7-1.i386.rpm

They are available from http://www.bluez.org, the official Bluez site. Depending on your Bluetooth dongle, you might also need the bluefw package. Find out at: http://www.holtmann.org/linux/bluetooth/devices.html.

Install the RPMs. If you have a directory containing only these packages, as root, cd to it an install with:

rpm -Uvh *

Loading modules

On Redhat 9 modules will be dynamically loaded by the kernel. To make the kernel aware of the new modules you must add the following lines to your /etc/modules.conf

alias net-pf-31 bluez
alias bt-proto-0 l2cap
alias bt-proto-2 sco
alias bt-proto-3 rfcomm
alias bt-proto-4 bnep
alias tty-ldisc-15 hci_uart

Starting Bluetooth service

Now you're almost there! Edit /etc/bluetooth/hcid.conf. Here you can change your device's friendly name. Then it's time to startup the Bluetooth service!

service bluetooth start

Check local devices with:

hcitool dev

If no devices show up, check the Bluefw section below.

Scan for nearby devices:

hcitool scan

Browse all available services on nearby devices:

sdptool browse

You now have a working minimum install of Bluez! Have fun!

Bluefw

If no device showed up after starting the Bluetooth service, you may have a Bluetooth dongle with an odd firmware. To get everything working the bluefw package may help. To get the Keyspan dongle working (which I reported to http://www.holtmann.org/linux/bluetooth/devices.html) I needed the bluefw package. You'll have to find the BUS/DEVICE number of the Bluetooth dongle. Listing all your usb-devices should give you this information:

lsusb

For the keyspan dongle I get:

Bus 004 Device 003: ID 0a5c:2033 Broadcom Corp. BCM2033 Bluetooth

Make sure the Bluetooth service is not running:

service bluetooth stop

To get it running I had to do:

bluefw usb 004/003;service bluetooth start

The reason for running both commands on one line is that the bluefw command will make the kernel dynamically load a module. If you do not start the bluetooth service within a few seconds, the kernel will unload the module since it's not in use. If this command gives you anything near:

bluefw[23382]: Loading firmware to usb device 0a5c:2033
bluefw[23382]: FW loaded
Starting Bluetooth: [ OK ]

Then you are good to go.

hcitool dev

Should then list your Bluetooth device.

More information

The official bluez website offers downloads and several how-to's.
http://bluez.sourceforge.net

Marcel Holtmann has a great collection of links to how-to's on his website.
http://www.holtmann.org/linux/bluetooth/



This page was last updated 14. Jul. 2006

Comments and feedback are highly appreciated.

You can reach me at: klings (at) nowires (dot) org