102
2.5.5 Communication Procedure
The following is the basic procedure for using Bluetooth to carry out communication.
1. Opening the Bluetooth (Initializing)
This function initializes the Bluetooth using either the Bluetooth tool or the Bluetooth Library.
It will turn on the power to the Bluetooth module integrated in the terminal and initialize the
Bluetooth protocol stack.
2. Searching a Bluetooth equipment
Searches a Bluetooth equipment using the Bluetooth tool or the Bluetooth Library. This sends
out an equipment search radio wave and captures information from Bluetooth equipment
operable in the vicinity.
3. Capturing service information
Captures service information using either the Bluetooth tool or the Bluetooth Library. This
captures the current usable service (profile) information of the partner Bluetooth equipment.
4. Security authentication with PassKey exchange
The partner Bluetooth equipment may request a PassKey at a time of capturing service
information and establishing Bluetooth connection. In case the Bluetooth tool is used, the
same PassKey is input for both Bluetooth equipments (the terminal and the partner Bluetooth
equipment) when a dialogue window appears requesting PassKey input. In case the Bluetooth
Library is used, the PassKey must be set in advance by carrying out the relative functions for
setting PassKey.
5. Establishing the connection
Establishes a Bluetooth connection using either the Bluetooth tool or the Bluetooth Library.
After the connection has been established, communication in Bluetooth can be continued
using the selected profile until the connection is terminated.
6. Terminating the connection
Terminates the connection using either the Bluetooth tool or the Bluetooth Library.
7. Closing the Bluetooth
Closes the communication via Bluetooth either by ending use of the Bluetooth tool or by
carrying out relative functions of the Bluetooth Library for closing the communication, and
then turns off the power to the integrated Bluetooth module.
The functions of the Bluetooth relevant to the Communication Procedure are as follows.
BTInitialize
: Initializes Bluetooth protocol stack.
BTDeInitialize
: Closes the resource for Bluetooth protocol stack.
BTGetDeviceInfo
: Retrieves device information about Bluetooth device to be connected.
BTGetServiceInfo
: Retrieves service information for Bluetooth device that communicates.
BTSetPassKey
: Sets up PassKey.
BTConnectSerial
: Establishes connection using Bluetooth virtual serial profile.
BTDisconnectSerial
: Disconnects Bluetooth virtual serial profile.
BTConnectHeadset
: Establishes connection to Bluetooth headset.
BTDisconnectHeadset
: Disconnects from Bluetooth headset.