|
Before starting, you need to enable Bluetooth at runtime:
After that, the Bluetooth daemons will be running on your system. Now,after Bluetooth USB device plug-in,if the device is based on STLC2500 the following istruction is needed before to use it:
The hciattach tool is needed to attach the STLC2500 Bluetooth device to USB (handling the device by means of HCI). Moreover, after the hciattach istruction, the firmware suitable to setup the internal chip of the STLC2500 based Bluetooth devices will be loaded. For Linksys USBBT100 Bluetooth device the above istruction is not needed. After that, the associated USB device hci0 can be manually bring up using the hciconfig tool:
By means of hciconfig command, the device is now able to work handling other Bluetooth devices by its embedded discovery system. There are several tools provided by the installed Bluez-utils package. One of the most important tool is hcitool. Hcitool is used to configure Bluetooth connections and send some special command to Bluetooth devices. If no command is given, or if the option -h is used, hcitool prints some usage information and exits. By using the hcitool the Bluetooth functionalities can be managed easily. For istance, the discovery of the Bluetooth devices (with Bluetooth enabled) in the closed area can be obtained as follow:
If the Bluetooth system has been configured correctly, we can get something like that:
The number "00:16:....." is the MAC address of the associated Bluetooth device (a mobile Nokia for istance). Each time we want to handle the Nokia device we have to use its MAC address. For istance, if we want to ping the mentioned device, we can type as follow:
The tool l2ping is able to ping the discovered Bluetooth devices.If the Bluetooth system has been configured correctly and if the handled device has Bluetooth enabled, the l2ping command should provide an output like that:
Another useful Bluetooth tool is the sdptool. Sdptool provides the interface for performing SDP queries on Bluetooth devices, and administering a local sdpd (daemon). By using the sdptool we can get the features (ports, protocol, communication channels, etc..) of the Bluetooth device to be handled. For instance, in order to get a general overview of the features of the Bluetooth device we use the following command:
If there are no erros, we can get an output as follow:
From the above log, we can get the information about the channels to be used for Obex file exchanging via Bluetooth. For more detail, please see the Obex section. Note: Each of the released Bluetooth tools have an help to be invoked (tipically a -h option) at runtime.
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||