AN992
AN992
PROFILES
iWRAP APPLICATION NOTE
Version 1.13
VERSION HISTORY
Version Comment
Silicon Labs
TABLE OF CONTENTS
1 Introduction 5
1.1 Hands-Free profile 5
1.2 Headset profile 6
2 iWRAP firmware overview 7
2.1 Multi profile operation 8
3 Using HFP with iWRAP 9
3.1 Configuration 9
3.1.1 Hands-Free unit (HF) 9
3.1.2 Hands-Free Audio Gateway (HFP-AG) 10
3.1.3 Security configuration 11
3.1.4 Service discovery 12
3.2 Connection establishment 13
3.2.1 HFP control channel 13
3.2.2 HFP audio channel 15
3.3 Connection termination 18
3.3.1 HFP audio channel 18
3.3.2 HFP control channel 19
3.4 Three way calling (HF only) 20
3.4.1 Enabling three-way calling 20
3.4.2 Using AT+CHLD 20
3.5 General HFP information 22
3.5.1 HFP commands 22
3.5.2 HFP events 24
4 Using HSP with iWRAP 28
4.1 Configuration 28
4.1.1 Headset unit (HS) 28
4.1.2 Headset Audio Gateway (HSP-AG) 29
4.1.3 Security configuration 29
4.2 Connection establishment 31
4.2.1 HSP control channel 31
4.2.2 HSP audio channel 32
4.3 Connection termination 33
4.3.1 HSP audio channel 33
4.3.2 HSP control channel 33
5 Audio configuration 34
5.1 Ringtones 34
Silicon Labs
5.2 Audio notifications 34
5.3 Selection of audio interface 34
5.4 PCM capabilities configuration 34
6 Available AT-commands with Hands-Free Profile 36
6.1 Phonebook specific AT commands 39
7 Apple specific AT commands with Hands-Free profile 41
7.1 HFP Command AT+XAPL 41
7.2 HFP Command AT+IPHONEACCEV 41
8 Power saving 41
9 Echo cancellation and noise reduction 41
10 References 42
Silicon Labs
1 Introduction
This application note discusses Bluetooth Hands-Free Profile (HFP) and Bluetooth Headset Profile (HSP) their
advantages and how these profiles can be utilized. Also practical examples are given how the HFP and HSP
are used with the iWRAP firmware.
Silicon Labs
Page 5 of 43
1.2 Headset profile
The HSP describes how a Bluetooth enabled headset should communicate with a computer or other Bluetooth
enabled device such as a mobile phone.
The typical usage scenario is, of course, using a wireless headset to connect with your mobile phone.
The HSP defines two roles, that of an Headset Audio Gateway (HSP-AG) and a Headset (HS):
• Headset Audio Gateway (HSP-AG) is a device that is the gateway of the audio, both for input and
output, typically a mobile phone or PC.
• Headset (HS) is a device acting as the Audio Gateway’s remote audio input and output mechanism.
Headset control is the entity responsible for Headset unit specific control signalling. Control channel works on
top of RFCOMM connection and the audio channel on top of SCO or eSCO channel.
One should know that HSP offers significantly less control possibilities then HFP. Therefore modern
implementations prefer Hands-Free Profile over the Headset Profile.
Headset profile supports 8kHz, 8-bit audio.
Silicon Labs
Page 6 of 43
2 iWRAP firmware overview
iWRAP6 is an embedded firmware running entirely on the RISC processor of WT11i, WT12, WT32i and WT41
modules. It implements the full Bluetooth protocol stack and many Bluetooth profiles as well. All software
layers, including application software, run on the internal RISC processor in a protected user software
execution environment known as a Virtual Machine (VM).
The host system can interface to iWRAP firmware through one or more physical interfaces, which are also
shown in the figure below. The most common interfacing is done through the UART interface by using the
ASCII commands that iWRAP firmware supports. With these ASCII commands, the host can access Bluetooth
functionality without paying any attention to the complexity, which lies in the Bluetooth protocol stack. GPIO
interface can be used for event monitoring and command execution. PCM, SPDIF, I2S or analog interfaces
are available for audio. The available interfaces depend on the used hardware.
The user can write application code to the host processor to control iWRAP firmware using ASCII commands
or GPIO events. In this way, it is easy to develop Bluetooth enabled applications.
On WT32i, there is an extra DSP processor available for data/audio processing.
iWRAP
iWRAP
RFCOMM
SDP Audio
L2CAP / eL2CAP
Host + application
Hardware
2
PCM / I S / SPDIF Baseband
Analogue Radio
Silicon Labs
Page 7 of 43
In the figure above, a Bluetooth module with iWRAP firmware could be connected to a host system for
example through the UART interface. The options are:
• If the host system has a processor, software can be used to control iWRAP by using ASCII based
commands or GPIO events.
• If there is no need to control iWRAP, or the host system does not need a processor, iWRAP can be
configured to be totally transparent and autonomous, in which case it only accepts connections or
automatically opens them.
• GPIO lines that Bluegiga’s Bluetooth modules offer can also be used together with iWRAP to achieve
additional functionality, such as Carrier Detect or DTR signaling.
• Audio interfaces can be used to transmit audio over a Bluetooth link.
Silicon Labs
Page 8 of 43
3 Using HFP with iWRAP
This chapter instructs the HFP usage and configuration with the iWRAP firmware.
3.1 Configuration
3.1.1 Hands-Free unit (HF)
HF mode is enabled with command “SET PROFILE HFP {service_name}”
service_name This parameter configures an user friendly description of the
service. Neither special characters nor white spaces are allowed.
Service name ON enables the profile with the default name.
The Bluetooth Class-of-Device (CoD) needs to be also configured properly. Some device may not be able to
discover and connect iWRAP unless it’s properly set. For HFP devices the CoD should be set to 200404.
Finally a reset is needed to for the HFP profile to become active.
Below is an example how to enable HFP mode.
Note: Connecting iWRAP configured as Hands-Free unit to BT Hands-Free device is against Bluetooth
specification. Such configuration is forbidden - module's behaviour will be unpredictable in such case.
Silicon Labs
Page 9 of 43
3.1.2 Hands-Free Audio Gateway (HFP-AG)
HFP-AG is enabled with command “SET PROFILE HFP-AG {service_name}”
service_name This parameter configures an user friendly description of the
service. Neither special characters nor white spaces are allowed.
Service name ON enables the profile with the default name.
The Bluetooth Class-of-Device (CoD) needs to be also configured properly. Some device may not be able to
discover and connect iWRAP unless it’s properly set. For HFP devices the CoD should be set to 400204.
Finally a reset is needed to for the HFP-AG profile to become active.
Below is an example how to enable HFP-AG mode.
Silicon Labs
Page 10 of 43
3.1.3 Security configuration
To be able to pair with other Bluetooth enabled devices the Bluetooth security needs to be properly
configured. iWRAP support Secure Simple Pairing (SSP) defined in Bluetooth 2.1 + EDR specification, and
the use of it is mandatory, but PIN code pairing is also supported to enable pairing with legacy devices.
In order to enable SSP and PIN code pairing, the following configuration commands are needed:
“SET BT SSP 3 0” This enables SSP “just works” mode, where no PIN code entry or passkey
verification is needed. To enable the optional man-in-the-middle protection,
please refer to iWRAP user guide.
“SET BT AUTH * <pin>” This command enables PIN code pairing, to support pairing with legacy defines.
<pin> is the desired PIN code, which can be 1-16 alphanumeric characters.
Finally a reset is needed to for the security settings profile to become active.
Below is an example how to enable SSP just works and PIN code pairing in iWRAP.
SET BT SSP 3 0
SET BT AUTH * 0000
RESET
Silicon Labs
Page 11 of 43
3.1.4 Service discovery
Bluetooth technology enables wireless service discovery, so you can find out the capabilities the remote
device supports. Wireless service discovery uses the Bluetooth Service Discovery Profile (SDP).
With iWRAP the service discovery is performed with command: “SDP {bd_addr} {uuid}”.
bd_addr Bluetooth device address of the remote device.
uuid Universally unique identifier. Refers to the Bluetooth profile to be
discovered. For HFP-AG the uuid is 111F and for HF 111E.
Below is an example how to perform a service discovery for HFP-AG device.
Silicon Labs
Page 12 of 43
3.2 Connection establishment
3.2.1 HFP control channel
With Hands-Free Profile, first a control channel needs to be first established. The control channel is used for
AT command signalling between the HF and HFP-AG devices.
The HFP control channel is opened, typical to iWRAP, with a CALL command:
“CALL {bd_addr} 111F HFP” - When opening connection from HF device to HFP-AG device
“CALL {bd_addr} 111E HFP-AG” - When opening connection from HFP-AG device to HF device
bd_addr Bluetooth device address of the remote device.
A typical indications of outgoing call and successful connection are received (CALL and CONNECT). After a
successful connection the HFP-AG device sends various status reports to the HF device. These reports are
output to the user as HFP status messages, which have a general format:
“HPF {link_id} STATUS {status} {value}”
link_id Numeric connection identifier
feature HFP status indicator
status Value of status indictor
Sometimes the HPF-AG devices may send manufacturer proprietary AT commands, which are not recognized
by iWRAP. A different report is then output:
“HPF {link_id} UNKNOWN {string}”
link_id Numeric connection identifier
string String sent by HFP-AG device
Finally when the connection initialization is complete a message is displayed: “HPF {link_id} READY”. AT
commands must not be sent before this event is received.
Silicon Labs
Page 13 of 43
Below is an example how to set up a HFP connection from HFP-AG to HF.
In the example above HFP device reports its volume level to the HFP-AG. The volume level is indicated by
message:
“HPF {link_id} VOLUME {level}”
link_id Numeric connection identifier
level HFP device’s volume level. Range: 0 -15
From iWRAP 6.2 command SET CONTROL HFPINIT was introduced. Using this command initial parameters
for HFP-AG status may be changed. Indicators values set by this command are used during connection setup
and should represent actual state of device.
Silicon Labs
Page 14 of 43
3.2.2 HFP audio channel
Once the HFP control channel has been set up an audio channel can be created. There are several ways how
the audio channel can be established depending on the use case.
ANSWER command can be used to answer the incoming call on the HF device. For keeping SCO connection
we have to use command with additional parameter: ANSWER 1.
Silicon Labs
Page 15 of 43
3.2.2.3 HFP-AG makes an outgoing call
A 3nd typical scenario is that the HFP-AG device makes an outgoing phone call and this is indicated to the HF
device. The examples below show how this is accomplished.
Here’s an example trace from HFP-AG device.
RING
CONNECT 1 SCO (Indicates that SCO connection was established)
HFP-AG 0 RINGING (Indicates that the HF device is ringing)
HFP-AG 0 CONNECT (Indicates that the HF device answered the phone call)
Silicon Labs
Page 16 of 43
3.2.2.6 Forcing SCO connection open
With HFP 1.6 version codec negotiation prevents the possibility of forcing the connection open like it was
possible in the iWRAP4 and HFP 1.5. In HFP
It’s also possible simply to open the SCO connection without any status updates. This can be done with
command:
“SCO OPEN {link_id}”
link_id Numeric connection identifier of the RFCOMM control channel associated to the
current Hands Free Profile connection.
In case both ends support codec negotiation in HFP 1.6 the SCO connection must be opened by the HFP-AG.
In this case if the HFP side issues the SCO OPEN {link_id} command, it will cause a HFP command to be
sent to the HFP-AG. After receiving this command the HFP-AG will open the SCO connection. If this happens
HFP will receive RING event instead of CONNECT event.
Example trace from HFP-AG
SCO OPEN 0
CONNECT 1 SCO
Silicon Labs
Page 17 of 43
3.3 Connection termination
3.3.1 HFP audio channel
The simplest way to terminate the audio (SCO) connection and the phone call is to use “HANGUP” command.
It can be issued on both HF and HFP-AG device to indicate that the call was terminated.
Termination of the call from HF device:
HANGUP
NO CARRIER 1 ERROR 113 HCI_ERROR_OETC_USER (Indication that HFP-AG terminated SCO)
HFP 0 STATUS "call" 0 (Call status change to inactive)
(Despite the “error” string, the above message is not related to an error:
OETC=OtherEquipmentTerminatedConnection)
Termination of the call from HFP-AG device:
HANGUP
HFP-AG 0 NO CARRIER (NO CARRIER indication)
NO CARRIER 1 ERROR 0 (SCO connection termination)
It also possible to forcibly close the SCO connection with the iWRAP’s normal “CLOSE {sco_link_id}”
command.
Closing the SCO connection from HF device (note that HFP-AG keeps the network call active in this case):
CLOSE 1
NO CARRIER 1 ERROR 0
Silicon Labs
Page 18 of 43
3.3.2 HFP control channel
The HFP control channel is simply be closed with iWRAP command “CLOSE {link_id}”
link_id Numeric connection identifier of the HFP associated RFCOMM link
HFP control channel termination.
CLOSE 0
NO CARRIER 0 ERROR 0
Silicon Labs
Page 19 of 43
3.4 Three way calling (HF only)
iWRAP5 and some iWRAP4.1.0 beta builds support three way calling on the HF side. Three way calling
enables the HF user to put calls on hold and join calls into multiparty “conference” calls, if the AG supports
these features. If the AG supports three way calling, only the “hold” state is mandatory to support.
Command Function
AT+CHLD=0 Release all held calls, reject waiting calls with “User busy”
AT+CHLD=2 Put all active calls on hold, accept held or waiting call
AT+CHLD=2x Put all calls on hold, except for the one whose idx is x (“private consultation mode”)
AT+CHLD=3 Add a held call to the current conversation (“multiparty” / “conference” call)
AT+CHLD=4 Connect active and held call, disconnect user from the call (“explicit call transfer”)
Silicon Labs
Page 20 of 43
Example: answer another incoming by putting the current call on hold, then release the 2 nd call and resume
the 1st call.
Silicon Labs
Page 21 of 43
3.5 General HFP information
This chapter contains general information and tips about the iWRAP and HFP profile for the implementers.
{raw AT command} Sends the raw AT command to the headset Any standard AT command can be sent
from iWRAP to the HFP-AG (f.ex. phone)
Silicon Labs
Page 22 of 43
Command Function Explanation
CONNECT Notifies the HF that the aforementioned call call 1 followed by callsetup 0
was accepted by the remote party.
RING [count] Notify HF device for incoming call. Optional callsetup 1, ring is sent [count] times, then
[number] [name] parameter [count] indicates the amount of callsetup 0.
ring indications. Optional parameter
[number] displays the number from where If [number] or [name] is given, AT+CLIP is
the call is coming from. [name] is an sent with the ring.
optional parameter describing the caller
name.
STATUS {indicator} Set indicator status and send it to Hands Related to AT+CIEV and AT+CIND
{status} Free. For example, “status service 0” would
mean indicate no GSM connectivity and
“status service 0” would mean active GSM
connection.
MEMORY {result} Send answer for memory dialing or redial. Answer to DIAL POS and DIAL LAST
Parameter {result} should be ERROR, if events. To preserve backward compatibility,
there is no number stored for the memory after 5 seconds answer OK is sent
location given by the HF. Otherwise automatically. If ERROR have to be sent, it
parameter {result} should be OK to must be done before 5 seconds timeout. If
continue dialing procedure. provided {result} is OK, iWRAP continues
memory dialing or redial procedure.
Silicon Labs
Page 23 of 43
3.5.2 HFP events
HF and HFP-AG output various events to indicate the user of status changes. These events are described in
this chapter.
Event Explanation
Silicon Labs
Page 24 of 43
HFP {link_id} UNKNOWN {string} Unrecognized AT command
link_id
Numeric connection identifier
string
Raw incoming data related to unrecognized command
HFP {link_id} VOLUME {level} Volume level information which should be used to update volume
level. According to Bluetooth documentation after receiving this
event, HFP device should change its volume. It can be done
in iWRAP by calling “VOLUME {level}” command or by host MCU
in another way.
link_id
Numeric connection identifier
level
Volume level information
Silicon Labs
Page 25 of 43
The possible HFP-AG status reports mentioned in the example are described below:
Event Explanation
HFP-AG {link_id} DIAL POS {pos} Dial a number from memory position. Command MEMORY should
be used to answer to this event.
link_id
Numeric connection identifier
pos
Memory position number
HFP-AG {link_id} DIAL LAST Dial to last dialled number. Command MEMORY should be used to
answer to this event.
link_id
Numeric connection identifier
Silicon Labs
Page 26 of 43
HFP-AG {link_id} UNKNOWN {data} Unrecognized AT command
link_id
Numeric connection identifier
Data
Raw input data
• “%s %d CALLING\r\n”
Outgoing call
• “%s %d BUSY\r\n”
Silicon Labs
Page 27 of 43
4 Using HSP with iWRAP
This chapter instructs the Headset profile usage and configuration with the iWRAP firmware.
4.1 Configuration
4.1.1 Headset unit (HS)
HF mode is enabled with command “SET PROFILE HSP ON”
The Bluetooth Class-of-Device (CoD) needs to be also configured properly. Some device may not be able to
discover and connect iWRAP unless it’s properly set. For HSP devices the CoD should be set to 200404.
Finally a reset is needed to for the HSP profile to become active.
Below is an example how to enable HSP mode.
Silicon Labs
Page 28 of 43
4.1.2 Headset Audio Gateway (HSP-AG)
HFP-AG is enabled with command “SET PROFILE HSP-AG ON”.
The Bluetooth Class-of-Device (CoD) needs to be also configured properly. Some device may not be able to
discover and connect iWRAP unless it’s properly set. For HSP devices the CoD should be set to 400204.
Finally a reset is needed to for the HSP-AG profile to become active.
Below is an example how to enable HSP-AG mode.
SET BT SSP 3 0
SET BT AUTH * 0000
RESET
Silicon Labs
Page 29 of 43
Service discovery
Bluetooth technology enables wireless service discovery, so you can find out the capabilities the remote
device supports. Wireless service discovery uses the Bluetooth Service Discovery Profile (SDP).
With iWRAP the service discovery is performed with command: “SDP {bd_addr} {uuid}”.
bd_addr Bluetooth device address of the remote device.
uuid Universally unique identifier. Refers to the Bluetooth profile to be
discovered. For HSP-AG the uuid is 1112 and for HS 1108.
Below is an example how to perform a service discovery for HSP-AG device.
Silicon Labs
Page 30 of 43
4.2 Connection establishment
4.2.1 HSP control channel
With HSP, first a control channel needs to be established. The control channel is used for AT command
signalling between the HF and HFP-AG devices.
The HSP control channel is opened, typical to iWRAP, with a CALL command:
“CALL {bd_addr} 1112 HSP” - When opening connection from HS device to HSP-AG device
“CALL {bd_addr} 1108 HSP-AG” - When opening connection from HSP -AG device to HS device
bd_addr Bluetooth device address of the remote device.
Below is an example how to set up a HSP connection from HS to HSP-AG.
A typical indications of outgoing call and successful connection are received (CALL and CONNECT).
HSP-AG immediately opens SCO connection, which is indicated with “CONNECT {link_id} SCO” event.
Silicon Labs
Page 31 of 43
4.2.2 HSP audio channel
Once the HSP control channel has been set up an audio channel can be created. Headset profile is much
simpler then Hands-Free profile and therefore the connection establishment is also simpler.
There are two commands to manage the audio channel. The headset unit has a command BUTTON, which
open the audio channel and the Headset audio gateway uses command:
SCO OPEN {link_id}
link_id Numeric connection identified
Opening the audio channel from HS device.
BUTTON
RING 1 00:07:80:93:0c:aa SCO
SCO OPEN 0
CONNECT 1 SCO
Silicon Labs
Page 32 of 43
4.3 Connection termination
4.3.1 HSP audio channel
The only way to terminate the audio (SCO) connection is to use command:
CLOSE {link_id}
link_id Numeric connection identifier
CLOSE 1
NO CARRIER 1 ERROR 0
CLOSE 1
NO CARRIER 1 ERROR 0
CLOSE 0
NO CARRIER 0 ERROR 0
Silicon Labs
Page 33 of 43
5 Audio configuration
5.1 Ringtones
In case the HFP-AG (f.ex. a mobile phone) does not support in-band ringtone it’s possible to make iWRAP to
play a ringtone instead. This can be done with command:
“SET CONTROL RINGTONE {ringtone}”
PCM interface features and data format is configured by modifying a PS-key called:
PSKEY_PCM_CONFIG32
I2S interface features and data format is configured by modifying a PS-key called:
PSKEY_DIGITAL_AUDIO_CONFIG
Please refer to iWRAP user guide or the Bluetooth modules data sheet for more information.
Please refer to iWRAP user guide or the Bluetooth modules data sheet for more information.
Note: Keep this setting in the default value, unless you know what you are doing.
Silicon Labs
Page 34 of 43
Silicon Labs
Page 35 of 43
6 Available AT-commands with Hands-Free Profile
The AT commands and indications that are available for the Bluetooth Hands-Free profile are listed below.
ATA
Standard call answer AT command.
ATDdd…dd;
Standard AT command intended for placing a call to a phone number. Only voice calls are covered in this
specification.
ATD>nnn...;
Extension of the standard ATD command, intended for memory dialing. Only voice calls are covered in this
specification.
AT+CCWA
Standard “Call Waiting notification” AT command. Within the AT+CCWA=[<n>[,<mode>[,<class>]]]command,
only enabling/disabling of the Call Waiting notification unsolicited result code +CCWA , using the <n>
parameter, is covered in this specification.
AT+CHLD
Standard call hold and multiparty handling AT command.
AT+CHUP
Standard hang-up AT command. Execution command causes the AG to terminate the currently active call.
This command shall have no impact on the state of any held call.
AT+CIND
Standard indicator update AT command.
+CIND
Standard list of current phone indicators.
AT+CLCC
Standard list current calls command.
+CLCC
Standard list current calls result code
AT+COPS
The AT+COPS=3,0 shall be sent by the HF to the AG prior to sending the AT+COPS? command.
AT+COPS=3,0 sets the format of the network operator string to the long format alphanumeric.
AT+CMEE
Standard AT command used to enable the use of result code.
AT+CLIP
Standard “Calling Line Identification notification” activation AT command. It enables/disables the Calling Line
Identification notification unsolicited result code +CLIP.
+CLIP
Standard “Calling Line Identification notification” unsolicited result code.
AT+CMER
Standard event reporting activation/deactivation AT command.
Silicon Labs
Page 36 of 43
+CIEV
Standard “indicator events reporting” unsolicited result code.
AT+VTS
Standard DTMF generation AT command. Only the AT+VTS=<DTMF> command format is covered in this
specification.
AT+CNUM
AT+CNUM (Retrieve Subscriber Number Information)
+CNUM
Standard Response used for sending the “Subscriber Number Information” from AG to HF.
AT+BIA
Bluetooth Indicators Activation. Command used by HF to activate / deactivate individual indicators.
AT+BINP
Command used for requesting some specific data input from the AG4. On reception of this command the AG
shall perform the proper actions such that the requested information is sent back to the HF using the +BINP
response.
AT+BINP
Command used for requesting some specific data input from the AG4. On reception of this command the AG
shall perform the proper actions such that the requested information is sent back to the HF using the +BINP
response.
AT+BLDN
Bluetooth Last Dialed Number
AT+BVRA
Bluetooth Voice Recognition Activation
+BVRA
Bluetooth Voice Recognition Activation. Unsolicited result code used to notify the HF when the voice
recognition function in the AG is activated/deactivated autonomously from the AG.
AT+BRSF
(Bluetooth Retrieve Supported Features. Notifies the AG of the supported features available in the HF, and
requests information about the supported features in the AG. The supported features shall be represented as
a decimal value.
+BRSF
Bluetooth Retrieve Supported Features).Result code sent by the AG in response to the AT+BRSF command,
used to notify the HF what features are supported in the AG. The supported features shall be represented as
a decimal value.
AT+NREC (Noise Reduction and Echo Canceling)
Command issued to disable any Echo Canceling and Noise Reduction functions embedded in the AG.
Only support for execution command is mandated. Neither the read nor test commands are mandatory.
Silicon Labs
Page 37 of 43
AT+VGM
Gain of Microphone. Command issued by the HF to report its current microphone gain level setting to the AG.
<gain> is a decimal numeric constant, relating to a particular (implementation dependent) volume level
controlled by the HF. This command does not change the microphone gain of the AG; it simply indicates the
current value of the microphone gain in the HF.
AT+VGS (Gain of Speaker)
Command issued by the HF to report its current speaker gain level setting to the AG. <gain> is a decimal
numeric constant, relating to a particular (implementation dependent) volume level controlled by the HF. This
command does not change the speaker gain of the AG; it simply indicates the current value of the speaker
volume in the HF.
+VGM (Gain of Microphone)
Unsolicited result code issued by the AG to set the microphone gain of the HF. <gain> is a decimal numeric
constant, relating to a particular (implementation dependent) volume level controlled by the HF.
+VGS (Gain of Speaker)
Unsolicited result code issued by the AG to set the speaker gain of the HF. <gain> is a decimal numeric
constant, relating to a particular (implementation dependent) volume level controlled by the HF.
Silicon Labs
Page 38 of 43
6.1 Phonebook specific AT commands
AT+CPBS=?
Lists the phonebooks that the phone contains. (Choose phonebook storage)
Returns: +CPBS: ("ME","SM","MT","ON","DC","MC","RC","EN","AD","QD","SD","FD")
AT+CPBR=?
Describes the phonebook selected above. (Simple) This gives the max number of entries the phone can
contain. It also gives the maximum phone number (or email address) length and name length.
NOTE: You can substitute +MPBR for any +CPBR command, but the phone returns a much more specific
(and less intelligible) response containing more fields that may act as internal “programming” flags of some
sort.
Returns: +CPBR: (1-1000),40,24
AT+CPBR=[index]
Returns the specified index.
Returns: +CPBR: 18,"user@domain.net",128,"Contact Name"
AT+MPBF="Name"
Searches the phonebook for the Name or string.
AT+MPBR=?
Similar to above, but a more verbose result is displayed.
Returns: +MPBR: 1-1000,40,24,8,0-1,50,(0,2,4,6,9-30,255),(0),(0-1),(1-30),(255),25,(0-
1,255),264,(0),0,0,0,0,0,0,0
▪ 1-1000 denotes the number of entries that can be stored on the selected (+CPBS) phonebook.
▪ 40 represents the number of characters that the email or phone number can have.
▪ 24 indicates the number of characters the “friendly” name can have.
▪ The 8 refers to the different “types” of phonebook entry (i.e. Mobile, Main, Email, Home, Fax, Work …
etc).
Silicon Labs
Page 39 of 43
▪ The +CPBR command does not list anything after the 24 (as seen above), so there are times when
the +MPBR may be useful.
AT+MPBR=[index]
Returns: +MPBR: 18,"user@domain.net",128,"Contact
Name",6,0,255,0,0,1,255,255,0,"",0,0,"","","","","","","",""
AT+CMGF=1
This tells the phone to display the entries as text rather than binary. +CMFG=0 would display the data in
binary format.
AT+CPMS=?
This displays all of the locations in which the phone can save the SMS messages.
Returns: +CPMS: ("MT","IM","OM","BM","DM"),("OM","DM"),("IM")
AT+CMGL=?
Returns the options on which messages you wish to display.
Returns: +CMGL: ("REC UNREAD", "REC READ", "STO UNSENT", "STO SENT", "ALL")
AT+CMGL="ALL"
Selects and displays all of the SMS messages on the selected source.
AT#PMODE=1
In order to retrieve text messages and other information, Samsung phones must be in this mode.
AT#PSRMR=?
Returns the parameters to obtain text messages (Samsung).
Returns: #PSRMR: (0-349)
Silicon Labs
Page 40 of 43
7 Apple specific AT commands with Hands-Free profile
7.1 HFP Command AT+XAPL
Enables custom AT commands from a headset.
8 Power saving
iWRAP offers two power saving options. Sniff mode, which can be used to save power for active Bluetooth
connections and deep sleep more which puts the internal processor into a reduced duty cycle mode. Please
refer to iWRAP user guide for more information about sniff and deep sleep modes.
One should also know that when Bluetooth connections are in active mode i.e. no power saving in use the
master device uses 3-4 times less power then a slave device. Therefore for battery powered applications it
might be useful to configure the device as a master rather then a slave, eventually considering role switching.
Silicon Labs
Page 41 of 43
10 References
[1] The Bluetooth SIG, Hands-Free Profile overview, URL:
https://www.bluetooth.com/specifications/profiles-overview
[3] Apple Inc., Bluetooth Accessory Design Guidelines for Apple Products, URL:
https://developer.apple.com/hardwaredrivers/BluetoothDesignGuidelines.pdf
Silicon Labs
Page 42 of 43
Simplicity Studio
One-click access to MCU and
wireless tools, documentation,
software, source code libraries &
more. Available for Windows,
Mac and Linux!
Disclaimer
Silicon Labs intends to provide customers with the latest, accurate, and in-depth documentation of all peripherals and modules available for system and software implementers using or
intending to use the Silicon Labs products. Characterization data, available modules and peripherals, memory sizes and memory addresses refer to each specific device, and "Typical"
parameters provided can and do vary in different applications. Application examples described herein are for illustrative purposes only. Silicon Labs reserves the right to make changes
without further notice to the product information, specifications, and descriptions herein, and does not give warranties as to the accuracy or completeness of the included information.
Without prior notification, Silicon Labs may update product firmware during the manufacturing process for security or reliability reasons. Such changes will not alter the specifications or the
performance of the product. Silicon Labs shall have no liability for the consequences of use of the information supplied in this document. This document does not imply or expressly grant
any license to design or fabricate any integrated circuits. The products are not designed or authorized to be used within any FDA Class III devices, applications for which FDA premarket
approval is required or Life Support Systems without the specific written consent of Silicon Labs. A "Life Support System" is any product or system intended to support or sustain life and/or
health, which, if it fails, can be reasonably expected to result in significant personal injury or death. Silicon Labs products are not designed or authorized for military applications. Silicon
Labs products shall under no circumstances be used in weapons of mass destruction including (but not limited to) nuclear, biological or chemical weapons, or missiles capable of delivering
such weapons. Silicon Labs disclaims all express and implied warranties and shall not be responsible or liable for any injuries or damages related to use of a Silicon Labs product in such
unauthorized applications.
Trademark Information
Silicon Laboratories Inc.® , Silicon Laboratories®, Silicon Labs®, SiLabs® and the Silicon Labs logo®, Bluegiga®, Bluegiga Logo®, Clockbuilder®, CMEMS®, DSPLL®, EFM®, EFM32®,
EFR, Ember®, Energy Micro, Energy Micro logo and combinations thereof, "the world’s most energy friendly microcontrollers", Ember®, EZLink®, EZRadio®, EZRadioPRO®, Gecko®,
ISOmodem®, Precision32®, ProSLIC®, Simplicity Studio®, SiPHY®, Telegesis, the Telegesis Logo®, USBXpress® and others are trademarks or registered trademarks of Silicon Labs.
ARM, CORTEX, Cortex-M3 and THUMB are trademarks or registered trademarks of ARM Holdings. Keil is a registered trademark of ARM Limited. All other products or brand names
mentioned herein are trademarks of their respective holders.
http://www.silabs.com