Bluetooth is a wireless communications protocol which allows short range communication between Bluetooth-equipped devices. The communication range is typically between 10 and 100 meters. The protocol supports authentication, service discovery and various forms of data transfer. Typically this is used for file transfer, wireless headsets (audio), synchronization, dial up networking, printing and other capabilities. The services provided by the bluetooth device are generally referred to as Profiles. Qtopia Bluetooth support can be enabled for any device with a Linux BlueZ compatible Bluetooth host adapter.
Qtopia fully supports the Bluetooth Generic Access Profile (GAP). GAP handles discovery and establishment of connections between Bluetooth devices. GAP also defines how secure connections can be established between two devices by a mechanism referred to as 'pairing'. GAP also defines the basic user-interface paradigm that must be used by all Bluetooth devices.
Qtopia Bluetooth API allows its clients to discover remote devices and various relevant attributes, such as device name, device manufacturer, Bluetooth protocol version supported, etc. Additionally, establishment of trust relationships by pairing remote devices is also supported.
SDAP
SDAP describes how an application should use the Service Discovery Protocol (SDP) to discover services on a remote device. Using the Qtopia Bluetooth API, clients can enable any application to discover services running on a remote device.
Two discovery modes are supported: searching and browsing. Searching involves searching for a specific service or services, while browsing searches for any services which are accessible from the public browse group.
Device Configuration
The user has the capability to switch the Bluetooth adapter on or off. The device might need to be turned off for power consumption reasons, for instance.
Device visibility can also be controlled. Visibility is controlled by two variables: page scan and inquiry scan. Page scan is enabled, controls whether remote devices can connect to the local device. Inquiry scan controls whether remote devices can discover local device. Thus the user the 'discoverable' state by setting the inquiry scan appropriately.
The user can specify a name for the local device. This can help the user by letting him/her quickly identify the device later. Other attributes can also be viewed by the user, such as the device manufacturer and the Bluetooth protocol version the device supports.
The user can scan for services(profiles) which his or her device supports. Currently the only service supported by Qtopia is Object Push.
OPP
Object Push Profile deals with applications which use the object push model of interaction. Typical scenarios include: Object Push, Business Card Pull & Business Card Exchange. The Object Push Profile is supported in two modes, client and server.
The client mode can be used to initiate an object push request to a remote device. Only the object push feature is supported by the client. While the standard does define Business Card Pull and Business Card Exchange features, they are optional, and are currently not supported. If a remote device initiates a Business Card Pull or a Business Card Exchange with the local OPP service, the request will fail. The service will return an object not found response.
Sending and Receiving over Bluetooth
The user can send and receive files over bluetooth. If a file is received, the user can monitor the progress of the file transfer, and choose to accept or discard the file received. If a business card is received, the user has the option of saving it in his or her addressbook or discarding.
Dependencies
Bluetooth uses uses services provided by Contacts for:
Sending a business card over bluetooth
Adding a received business card to the addressbook.