This section provides a description
of how to use the demo application to connect two configured board and communicate
over Bluetooth. Bluetooth HFP is a simple Client-Server connection process with one
side operating in the Audio-Gateway role and the other operating in the Handsfree
role. We will setup one of the boards as a Handsfree server and use an android phone
as Client. Once connected, we can transmit data between the two devices over
Bluetooth
Server setup on the demo application
- Perform the steps mentioned
earlier in Running the Bluetooth Code section to initialize the application.
- Give a name for the MSP430 using
the SetLocalName. In our example we give it a name of hfpserver.
- Open a HFPServer using the
command, OpenHFServer <port number>. Here we use OpenHFServer 1 to open a
port.
Client setup and device discovery
- Open the bluetooth settings menu
on the android phone Settings->Bluetooth . We should get a menu like
this.
- Hit on search for devices. The
phone should begin looking for other bluetooth devices.
- A Tiva HFPDemo Demo should appear
like shown below in the picture. Click on the device to begin pairing.
- After the devices are paired, the
device should show connected on the phone side and on the Tiva.
Figure 5-6 HFP Demo
Connect
HandsFree Options
- To Manage the audio connection to
the headset. We use ManageAudio 0 to release the SCO connection and ManageAudio
1 to Setup the SCO connection.
- To Close the HFserver use the
CloseHFServer command.