Bluetooth is a wireless communications protocol which allows short range communication of typically 10 to 100 meters, between Bluetooth-equipped devices. 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.
Features
GAP
Qtopia fully supports the Bluetooth Generic Access Profile (GAP) which handles discovery and establishment of connections between Bluetooth devices and defines how secure connections can be established between two devices by a mechanism referred to as 'pairing'. It also defines the basic user-interface paradigm that must be used by all Bluetooth devices.
The 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. It also supports the establishment of trust relationships by pairing remote devices.
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 - to search for a specific service
browsing - to search for any services accessible from the public browse group.
Device Configuration
The following device configuration is available:
switch the Bluetooth adapter on or off for example, the device may need to be turned off to reduce power consumption.
control visibility - visibility is controlled by two variables:
page scan - controls whether remote devices can connect to the local device.
inquiry scan - controls whether remote devices can discover local device. Allowing the user to set the 'discoverable' state by setting the inquiry scan variable. 1 local device name - set to allow the user to identify the device quickly at a later time.
Other attributes can also be viewed by the user, such as the device manufacturer and the Bluetooth protocol version the device supports and the user can scan
for services(profiles) supported by the device.
Bluetooth Sockets API
Qtopia supports RFCOMM, L2CAP and SCO sockets. RFCOMM sockets are STREAM based sockets, similar to TCP sockets. SCO and L2CAP sockets
are SEQPACKET type sockets. In general, they act similarly to TCP sockets, however the SEQPACKET type sockets preserve record boundaries.
Finally, DGRAM type L2CAP sockets are also supported. These sockets are similar to UDP sockets.
Bluetooth service framework
A generic management framework for Bluetooth services allows Bluetooth services to be registered and handled under a common set of practices. For example, a service registered under this framework will automatically be able to be controlled through the BTSettings GUI application. Third-party developers will also be able to make use of this framework to integrate their own Bluetooth services into the system environment.
OPP
Object Push Profile supports both client and server modes for applications that use the object push model of interaction.
The client mode is used to initiate an object push request to a remote device.
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 the addressbook or discarding.
Dial-up Networking (DUN)
Dial-up Networking allows the user to connect to the Internet via third party Bluetooth devices (client profile) and Qtopia devices themselves can provide dial-up connections to third party Bluetooth devices (server profile). Essentially requests from the client are forwarded directly to the hardware modem. Thus no PPP server is running on the server side.
Headset Profile (HSP)
Headset profile is supported using the Headset Bluetooth service and integrated into the Bluetooth service framework. The user is able to control the volume of the speaker and microphone of the Bluetooth headset. The user is also able to connect, disconnect, pair and unpair the Bluetooth headset device. On the desktop, ALSA snd-bt-sco module is required to provide an Audio Device. The snd-bt-sco kernel module depends on ALSA support in the kernel. The btsco module creates a new ALSA sound device, which supports full-duplex audio. The reference implementation will not support seamless transfer of audio between the headset and the device. Thus on the desktop only VOIP application can utilize the Bluetooth Audio device. The Greenphone platform fully supports Bluetooth Audio.
Hands-Free Profile (HFP)
The Hands Free Profile is an expanded set of functionality compared to the headset profile. Qtopia supports the Hands-free profile functionality in the Modem Emulator module. All control mechanisms available for HSP profile are also available for HFP profile.
Dependencies
Bluetooth uses uses services provided by Contacts for:
Sending a business card over Bluetooth
Adding a received business card to the addressbook.