Bluetooth

From MEPIS Documentation Wiki

Jump to: navigation, search

Contents

MEPIS 11

Bluetooth file transfer is somewhat flaky: sometimes working, sometimes not. It may work one direction and not another.

MEPIS 8.5

At the time of release, bluetooth functionality in MEPIS 8.5 is limited to input devices such as a mouse or keyboard. Installing kdebluetooth puts an icon in the system tray, but no file transfer is available.

MEPIS 8

NOTE: MEPIS 8 users will need to install package 'kdebluetooth'. The User's Manual, Section 5.8, has more detailed information regarding Bluetooth support.

Introduction

Bluetooth server (kbluetoothd in MEPIS 7, replaced by kdebluetooth in MEPIS 8) is part of a set of tools built on top of the Linux Bluetooth stack BlueZ. It is installed by default in MEPIS 7 but not in MEPIS 8; in both cases, the user is given the option during installation of not starting the BlueZ service.

The Linux kernel's HOTPLUG service should detect the insertion of a USB-based Bluetooth adapter, but it does not pop up a DESKTOP-icon upon detection. [KDE however should put a Bluetooth-icon in the tray upon insertion/detection.] To see whether the driver-portion had any errors from detection, connect the device, then open a terminal and type:

dmesg | tail 

to look for how the device was processed.

One primary use of a Bluetooth adapter is to synch with a mobile phone (cellphone). To set up that functionality, you will first need to 'pair' your PC's Bluetooth adapter with that device.

Installation/configuration and Device-pairing

  1. Check that 'kbluetoothd' got started. (It sometimes needs to be started twice until the icon shows up in the System Notifications Tray.) Make sure that, if your Bluetooth-adapter is USB-based, you have inserted it. The tray icon appears as a big white 'K' with an en-circling light-blue background. )
  2. To 'pair' a device to it, you need to enable Bluetooth-pairing on that Device (e.g. Mobile Phone etc.)
  3. Phone should discover PC's adapter during pairing, and ask for a PIN. Just choose/supply one (1234), and after that, a popup on the PC should occur, asking for the same PIN. After pairing, you may need to (and should) reboot the phone (recycle its power).

Depending on your configuration, you may be able to also send/receive files from the Phone and your PC, once paired. If a request is made from the phone to send a file, a popup-window on the PC might appear, asking you if you wish to receive the file. This functionality varies among various phone-types/carriers. You might need an application, such as ObexFTP. [Also, click on the 'Phone' link in the links-section below for further details, which discusses the BitPim application for 'CDMA' phones), as well as other tools.] The types of files (e.g. ring-tones, backgrounds, call-histories, etc) varies widely among the programs and types/models of cellphones.

[If you click on the kbluetoothd Icon, it should launch the application 'konqueror', which will show the "bluetooth:/" location, which should try (but might not) to list all BT Devices found. An alternate method is to right-click the icon, and choose 'configuration->Paired/Trusted devices'.]

CLI tools

You can use the CLI tool hcitool to work with the bluetooth device. For instance,

hcitool scan

will scan for any bluetooth-enabled device within reach and report back the results. And

hcitool dev

will list known devices. See the man page for more.

ObexFTP

If that method of uploading does not work, some people have luck by installing:

obexftp

from the repos. You can use that as a CLI application, or use this GUI for it, available from the repos in MEPIS 8, or in MEPIS 7 by installing the deb file in the usual manner.

Understanding Bluetooth Services and Transfer protocols

Once you are paired with a cellphone, you can query it to see what services exist and their attributes, such as channels, ports, protocols, encoding, etc. To do that, first jot down the hex-string representing the unique MAC-ADDRESS of the paired-phone, retrievable from tray-icon's configuration->Paired/Trusted Devices, in the form XX:XX:XX:XX:XX:XX. From the cmd-line, execute the command:

 sdptool browse XX:XX:XX:XX:XX:XX

and you should see a list of services available and their attributes. As one example, if you see a service named'BT DIAG' on channel 16, you could create a link to it via a command like:

 rfcomm connect 0 XX:XX:XX:XX:XX:XX 16

and you should get confirmation via the adapter's LED getting more solidly lit. Hovering the mouse over the tray-icon should show that a connection exists and the tray-icon should become darker-blue.

It is these various services that programs such as ObexFTP and BitPim, etc are using to communicate with the paired device.

For more information on programming Bluetooth, see the 'Bluetooth Programming' link in the Links section below.

Troubleshooting

If you are unable to get a response from the command:

hcitool scan

OR you can not see your adapter in the response to the root command:

hciconfig -a

and you know that your device is bluetooth enabled and visible and that your host computer's bluetooth adapter is good, then try opening a root terminal and typing:

hciconfig hci0 reset
hciconfig hci0 inqmode 0

Then reboot the machine, and you may be back in business.

Links

Personal tools