34
www.lairdtech.com
Laird Technologies
BTM510/511
Bluetooth
®
Multimedia Module
3.1 A2DP Example 1
This section gives an example of an A2DP connection between a Laird Technologies BTM device as
Audio Sink (wireless speaker/ wireless headphones) and a PC with a built in Bluetooth device and
Toshiba Bluetooth Stack 2.1 as Audio Source.
The PC must support A2DP. If it is a different stack the procedure should be similar and follow
the steps of:
1.) Device discovery
2.) Device Selection
3.) Pairing
4.) Connection establishment (e.g., initiated by PC)
If you have a Bluetooth 2.0 or earlier stack on your PC, legacy pairing with PIN will occur. In that
case use AT+BTK=”<PIN>” to enter the PIN on the BTM device.
The BTM5xx device is assumed to be connected to a terminal program e.g. Ezurio Terminal on
a PC. The sequence of AT commands and the instructions for the PC side are listed in Table 3.13.
Figure 3.6 through to Figure 3.11 show appropriate screenshots.
Phase
Dev.
AT Command
Comment
Preparation
BTM5xx
AT&F*
Restore factory default settings
A2DP profile is enabled per default in S102
Audio Sink role is enabled per default in S300
ATS515=$040400
Set A2DP device class
ATS512=4
Make device connectable and discoverable (permanent setting)
AT&W
Store settings
ATZ
Reset
Preparation /
Connection
setup
PC
n/a
1.) Open “Bluetooth Settings” from the taskbar icon - Figure 3.6
2.) Click on “New Connection” - Figure 3.6
3.) Click Next (Discover BT Devices) - Figure 3.7
4.) Select “Laird BTMM…” if not listed: click “Refresh” - Figure 3.8
5.) Click “Yes” on “Allow this Device to connect?” - Figure 3.9
6.) Connection is initiated by PC - Figure 3.10
7.) Open a player (e.g., Windows Media Player) to play some
music
8.) Connect a Headphone/Speaker to the Audio Output of the
BTM device
Troubleshooting:
If nothing can be heard, verify that a Bluetooth Audio Device
has appeared in the Device Manager - Figure 3.1. Also check
that the Bluetooth Audio Device is selected as speaker in your
player application. Sometimes a player needs to be closed and
restarted in order to send its audio output to a new speaker
device (which is the Bluetooth Audio Device here).
Connected
BTM5xx n/a
Music can be heard on the speakers/headphones
Adjust
Volume
AT+GOU
Increment volume (audio output gain) by one
AT+GOD
Decrement volume (audio output gain) by one
Disconnect
AT+APH
Response “NO CARRIER 110D”: disconnection confirmed
Table 3.13: A2DP Example 1 Command Sequence
AT COMMAND SET
REFERENCE