Hands-Free Profile (Windows Embedded CE 6.0)
1/6/2010
The Bluetooth Hands-Free Profile (HFP) depends on the on the Generic Access Profile (GAP) and the Serial Port Profile (SPP). HPF defines the requirements for using a mobile device, such as a cellular phone, in conjunction with a hands-free device over a Bluetooth link. The mobile device acts as the audio gateway (AG) for input and output audio and the hands-free device provides the audio input and output mechanism for the AG and controls it through AT commands.
Windows Embedded CE supports HFP by providing the Audio Gateway Service that links Bluetooth devices by using the Winsock interface to the Bluetooth Protocol Stack. This service also interfaces with the TAPI to control a cellular phone.
The hands-free device sends AT commands to the AG, in response to user-initiated events. The following table shows the AT commands supported in Windows Embedded CE.
AT command | Description |
---|---|
AT+BLDN |
Redials the previously dialed number. |
AT+BRSF |
Retrieves the supported features. |
AT+BVRA |
Enables or disables voice recognition in the AG. |
AT+CCWA |
Enables call waiting notification in the AG. |
AT+CHUP |
Rejects an incoming call. |
AT+CIND? |
Reads the current status of the AG indicators. |
AT+CIND=? |
Retrieves the indicator mappings for the AG. |
AT+CLIP |
Enables the call line identification. |
AT+CMER |
Registers or unregisters status updates. |
AT+VGM=<gain> |
Notifies the AG service when the microphone volume on the headset is changed to the specified gain value. |
AT+VGS=<gain> |
Notifies the AG service when the speaker volume on the headset is changed to the specified gain value. |
AT+VTS |
Transmits DTMF codes to the network. |
ATA |
Receives an incoming call. |
ATD>nnn |
Dials a number in memory. |
ATDdd...dd |
Dials a number. |
** The following table shows the supported GSM AT commands.
AT Commands | Description |
---|---|
AT+CPBR |
Read phonebook entries. |
AT+CPBS |
Select phonebook memory storage. |
When the AG receives an AT command, it processes the command and controls the hands-free device by returning an unsolicited result code. The following table shows the result codes supported in Windows Embedded CE.
Result code | Description |
---|---|
+BRSF |
Notifies the supported profile features. |
+BSIR |
Sets the in-band ring tone either on or off. |
+BVRA |
Sends the voice recognition notification to the hands-free device. |
+CIEV |
Reports the indicator status. |
+CLIP |
Sends the call line identification. |
+CCWA |
Notifies that a call is waiting during an ongoing call. |
+VGM=<gain> |
Sets the microphone volume on the hands-free device. |
+VGS=<gain> |
Sets the speaker volume on the hands-free device. |
RING |
Sends a ring to the hands-free device. |
The procedures specified by the HFP define the set of features that the hands-free device supports. The following table shows the HFP features supported by Windows Embedded CE.
Feature | Procedure |
---|---|
Connection management |
The AG service or the hands-free device uses the supported unsolicited results codes and the AT commands, respectively, to set up and release a service-level connection. |
Phone status information |
For generating the registration or the call status, the hands-free device sends the AT+CMER command to the AG. The AG returns the +CIEV result code and indicates the phone status. Based on these values, the hands-free device generates a status code that indicates whether or not the AG is registered, or if the call is active. |
Audio Connection handling |
In response to a user-initiated event, the AG, or the hands-free device, initializes or releases an audio connection. After the connection is initialized or released audio paths are routed to the AG. |
Accept or reject an incoming voice call |
During an incoming call, the AG sends a sequence of RING codes to the hands-free device. The RING alert is sent as long as the call is not received. The hands-free device is responsible for notifying the user about the incoming call. The hands-free device may either receive the call by sending the ATA command or reject the call by sending the AT+CHUP command to the AG.
Note:
If the incoming call is interrupted, the AG notifies the hands-free device by sending the +CIEV result code.
The AG may also receive or reject the call by calling the BthAGNetworkAnswerCall or BthAGNetworkRejectCall function, respectively. |
Terminate a call |
The hands-free device can terminate an ongoing call by sending the AT+CHUP command to the AG. Alternately, the AG can also terminate the call by calling the BthAGNetworkDropCall function. |
Audio Connection transfer during an ongoing call |
The audio connection transfer can be initiated by the user either from the hands-free device or from the AG. In either case, the connection setup procedure is initiated and the ongoing call is transferred from the AG to the hands-free device. |
Place a call with the phone number supplied by the hands-free device |
The hands-free device provides a destination phone number to the AG to place an outgoing call by setting up a service level connection and then sending the ATDdd...dd command. The AG then places the call by using the BthAGNetworkDialNumber function. |
Place a call using memory dialing |
The hands-free device provides the destination phone number to the AG to place an outgoing call. The device sets up a service level connection and then sends the ATD>nnn command to the AG. The AG then places the call by using BthAGNetworkDialNumber. |
Place a call to the last number dialed |
The hands-free device provides a destination phone number to the AG to place an outgoing call by setting up a Service Level Connection and then sending the ATD+BLDN command. The AG then places the call by using BthAGNetworkDialNumber. |
Call waiting notification |
The hands-free device enables the call waiting functionality of the AG by sending the AT+CCWA command. The AG notifies the hands-free device by returning the +CCWA result code. |
Call Line Identification (CLI) |
The hands-free device enables the call line identification functionality of the AG by sending the AT+CLIP command. If the call identity is available, then the AG notifies the hands-free device by returning the +CLIP result code after every call notification through the RING alert. |
Ability to transmit DTMF codes |
The hands-free device sends the AT+VTS command to the AG to transmit a DTMF code. The AG transmits the code by using the BthAGNetworkTransmitDTMF function. |
Remote audio volume control |
To set the volume of the microphone or the speaker on the hands-free device, there must be an active connection between the AG and the device. To change the microphone or speaker volume, the AG service sends the +VGM or +VGS result code, respectively, to the device and specifies the gain as a parameter to the result code. |
Voice recognition activation |
The hands-free device can enable or disable the voice recognition functionality by sending an AT+BVRA command to the AG. The AG enables this functionality and sends the +BVRA result code back to the hands-free device. |
For more information about the procedures related to these features see the Hands-Free Profile Specification at this Official Bluetooth Wireless Info Web site.
See Also
Concepts
Bluetooth Profiles
Audio Gateway Service