Bluetooth is another great technology that is helping drive mobile technology further and further. Bluetooth under Linux is quite mature, and KDE also includes programs to take advantage of your Bluetooth system.

For Bluetooth to work under Linux, do the following:

Install the bluez-* Bluetooth stack packages using YaST's package manager.

2. When installed, make sure Bluetooth has been turned on in your laptop (on the Thinkpad, press Fn+F5).

3. When running, start the Bluetooth service with rcbluetooth start.

4. When running, you need to bring up your Bluetooth network device with the hciconfig hci0 up command.

In many cases, if a Bluetooth device is present and has been detected by the system, you may be able to use it without explicitly going through Steps 3 and 4.

ei- Remember, here as elsewhere, /var/log/messages is your friend. If you physically

K-'-j '2 ^ ^.■¿'CV-.w -j- disable and enable the Bluetooth device, you should see useful messages in the logs indicating whether this has been successful.

As usual with the Bluetooth stack on other operating systems, you can scan for discoverable devices in range of the personal area network. To scan for Bluetooth devices, use the hcitool command:

thinkpad:~ # hcitool scan Scanning ...

Justin's Phone tibook

This scan has found two Bluetooth-aware devices in discoverable mode, my Powerbook and my T610 mobile phone.

When you have found a Bluetooth device, use the l2ping command to check connectivity (see Listing 15-22).


Checking Connectivity with l2ping thinkpad:~ # l2ping 00:0E:07:24 Ping: 00:0E:07:24:7E:D5 from 00

0 bytes from 00 0 bytes from 00 0 bytes from 00 0 bytes from 00

D5 D5 D5 D5


20:E0:73:EF:7F (data size 20) d 200 time 46.77ms d 201 time 50.29ms d 202 time 30.28ms d 203 time 43.26ms

4 sent, 4 received, 0% loss

As with the TCP/IP-based ping command, the Bluetooth stack sends an echo request to the Bluetooth ID specified and displays the time it takes to receive a ping response back from the device.

j f - - p It is beyond the scope of this quick introduction to Bluetooth on Linux to discuss

— , configuring General Packet Radio Service (GPRS), but if you have a GPRS-capable phone, you can now configure your dial-up settings to take advantage of this on the road.

As an example of the use of Bluetooth with command line tools, you can use the obexftp command to put and get files from a device. For a T610, you can view the hardware configuration by getting the file telecom/devinfo.txt. To do this, you can issue the obexftp command. Listing 15-23 shows an example of getting a file over Bluetooth.

Was this article helpful?

0 0

Post a comment