handsfree
Overview
This example demonstrates the HFP HF basic functionality, the HFP device support be connected to a HFP AG like a mobile phone or a board running a HFP AG application. And the HF example support accept/reject/End the incoming call from HFP AG.
Prepare the Demo
Open example’s project and build it.
Connect a USB cable between the PC host and the OpenSDA USB port on the target board.
Open a serial terminal on PC for OpenSDA serial device with these settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the example.
Running the demo
USB Host stack successfully initialized Bluetooth initialized BR/EDR set connectable and discoverable done Now Start SDP Service and the Service is now discoverable by remote device
the bellow commands have been supported: “bt”: BT related function USAGE: bt [dial|aincall|eincall] dial dial out call. aincall accept the incoming call. eincall end an incoming call. svr start voice recognition. evr stop voice recognition. clip enable CLIP notification. disclip disable CLIP notification. ccwa enable call waiting notification. disccwa disable call waiting notification. micVolume Update mic Volume. speakerVolume Update Speaker Volume. lastdial call the last dial number. voicetag Get Voice-tag Phone Number (BINP). multipcall multiple call option
“dial” is used to dial out a call with phone number after device is connected, usage : bt dial 114
“aincall” is used to accept the incoming call when a call is coming, usage : bt aincallis
“eincall” is used to reject the incoming call when a call is coming or end an active call bt eincall
“svr” is used to start voice recognition, you can check the voice recognition information in peer device side. HFP voice recognition :1
“evr” is used to stop voice recognition, you can check the voice recognition information in peer device side. HFP voice recognition :0
“clip” is used to enable CLIP notification, you can see the incoming call phone number is showing in screen when enable the feature Incoming Call… Phone call number: 133xxxxxxxx
“disclip” is used to disable CLIP notification, you can’t see the incoming call phone number is showing in screen when enable the feature
“ccwa” is used to enable enable call waiting notification, you can in waiting call phone number is showing in screen when enable the feature and have multiple call
CALL WAITING Received Number : 133xxxxxxxx Please use
to handle multipe call operation bt multipcall 0. Release all Held Calls and set UUDB tone (Reject new incoming waiting call) bt multipcall 1. Release Active Calls and accept held/waiting call bt multipcall 2. Hold Active Call and accept already held/new waiting call bt multipcall 3. Conference all calls bt multipcall 4. Connect other calls and disconnect self from TW “disccwa” is used to disable call waiting notification, you can in waiting call phone number is not showing in screen when enable the feature and have multiple call
“micVolume” is used to set mic volume, the value is from 1 to 15, usage as: bt micVolume 8
“speakerVolume” is used to set speaker volume, the value is from 1 to 15, usage as: bt speakerVolume 8
“lastdial” is used to call the last dial number. bt lastdial
“voicetag” is used to get Voice-tag Phone Number (BINP), need peer side to set Voice-tag Phone Number (BINP) bt lastdial
“multipcall” is used call option, need peer side to set Voice-tag Phone Number (BINP), you can refer to ccwa information to do operation, usage: bt multipcall 1
Note:
There is a short noise can be heard at headset at the begin audio streaming when in running HFP Unit and HFP ring tone
and at the end of each ring tone segment. The codec power on pop noise cannot eliminate.