Chapterš5.šUsage and Features

Table of Contents

Discovering bluetooth devices in the neighbourhood
Finding available services on the remote bluetooth devices
Connecting to the remote bluetooth device
Setting up PPP connection
Using OBEX for file transfer to/from mobile phone
Handling Phonebook and Calendar entries.
The format of the Phonebook entry
The format of the Calendar entry
Managing Profiles
Other tools shipping with affix package
Programming interface
User space API
Socket interface
Assigned numbers
Difference beetwen Bluez and Affix sockets

Discovering bluetooth devices in the neighbourhood

There are two basic commands: inquiry and discovery. Both commands finds other bluetooth devices but discovery also shows name of the device but a bit slower.

Typical output of discovery command is shown below.

niko@niko:~$ btctl discovery 5
Searching ...
Searching done. Resolving names ...
done.
+1: Address: 00:02:ee:46:22:39, Class: 0x502204, Name: "Nokia 7650"
    Phone (Cellular) [Object Transfer,Telephony]
+2: Address: 00:e0:03:74:4e:3d, Class: 0x56010C, Name: "Windows 2k"
    Computer (Laptop) [Networking,Rendering,Object Transfer,Telephony]
    

Each device has its own number in the left column. This is the cache number for the given device. Later to access this device you can use this number as well as the bluetooth address. + means that device is in the cache and is discovered. - means that device is in the cache but is not discovered this time. See reference for more info.