User's Manual

40
www.lairdtech.com
Laird Technologies
BTM510/511
Bluetooth
®
Multimedia Module
4. Set A2DP Device Class
ATS515=$<device_class
hex
>; AT&W; ATZ
For compliance with the A2DP specication, [2] (and hence for successful interoperability to other
devices) it is required to set up a valid device class code. The default device class code of a BTM device
is 0x001F00 which is invalid for the A2DP prole.
The A2DP specication [2] mandates the following requirements for the device class of an A2DP device:
1. Mandatory to set the ‘Rendering’ bit for the SNK and the ‘Capturing’ bit for the SRC in the Service
Class eld.
2. Recommended to set ‘Audio/Video’ as Major Device class both for the SNK and the SRC.
3. Select the appropriate Minor Device class as dened in the Bluetooth Assigned Numbers [8].
There is a tool available on the internet for creating a particular device class code: refer to [9].
With the assumptions above (Major Device class = Audio/Video), Table 8 in [8] gives the complete list
of codes for the minor device class. If you are not sure about the minor device class, use the row
marked with n/a for the minor device (e.g., 0x040400 for sink or 0x080400 for source).
Table 3.15 gives some examples of device class codes for A2DP devices.
Device Class Code Major Service Major Device Minor Device A2DP Role
0x040400 Rendering Audio/Video n/a Sink
0x040414 Rendering Audio/Video Loudspeaker Sink
0x040418 Rendering Audio/Video Headphones Sink
0x04041C Rendering Audio/Video Portable Audio Sink
0x040420 Rendering Audio/Video Car audio Sink
0x080400 Capturing Audio/Video n/a Source
0x080410 Capturing Audio/Video Microphone Source
0x080428 Capturing Audio/Video HiFi Audio Device Source
Table 3.15: A2DP device class code – examples
The device class is written to the module using ATS515=$<device_class
hex
> where <device_class
hex
>
is the 6 character device class code without leading “0x”. Use subsequent AT&W and ATZ for the new
value to become effective. Please also refer to page 13, number 4.
4.1 Initiate A2DP Connection
AT+APD<bd_addr
hex
>
Initiate A2DP connection to Bluetooth address <bd_addr
hex
>. The remote device must support the
complementary role to the local device. If link keys are missing in one or both devices, pairing
will either occur automatically or pairing is required to be initiated by AT+BTW<bd_addr
hex
>.
This depends on various factors like the combination of local and remote IO capabilities or the
Bluetooth version of the remote device.
Response:
<cr><lf>OK<cr><lf> (immediately)
<cr><lf>PAIR 0 <bd_addr> 00<cr><lf> (rst time only, auto pairing without MITM authent.)
<cr><lf>CONNECT <bd_addr>,110D,><cr><lf>
Or:
<cr><lf>OK<cr><lf> (immediately)
<cr><lf>NO CARRIER 110D<cr><lf> (not successful)
AT COMMAND SET
REFERENCE