Home
BTM510/511 User Manual
Contents
1. S650 0 0 1 0 no mask 1 enable i o pin state Mask S651 GPIO1 Geesen GPIO Configuration Registers S652 GPIO2 g S650 must be set to 0 to enable S653 GPIO3 alternative 0 OxFFFF SE Se GPIO usage onfigures pin state pin direction pin 5654 GPIO4 3nd Ee inversion notification enable function S655 GPIO5 mapping select and function mapping Americas 1 800 492 2320 140 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech conm bluetooth Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module S656 GPIO6 code av_operation_id S657 GPIO7 See Table 2 52 S658 GPIO8 Enable strong bias strong pull up strong pull down mask if GPIO is configured as input 0x0001 GPIO1 0x0002 GPIO2 S669 GPIO1 8 0x0000 0 OxFF 0x0004 GPIO3 0x0008 GPIO4 0x0010 GPIO5 0x0020 GPIO6 0x0040 GPIO7 0x0080 GPIO8 Read Write all GPIOs in one atomic step Write operation only affects GPIOs configured as outputs 0x0001 GPIO1 0x0002 GPIO2 S670 GPIO1 8 0x0000 0 OXFF 0x0004 GPIO3 Ox0008 GPIO4 0x0010 GPIO5 0x0020 GPIO6 0x0040 GPIO7 0x0080 GPIO8 2 8 8 1 GPIO function mapping codes FMC By using function mapping codes GPIOs may trigger certain functions by a push button where normally an AT command would be required Examples include Volume Up Down answer a call HFP reject a call HFP etc Also you may use a GPIO for digital cable replacement Refer to section 2 9 3
2. Send Button AT HSB Sends AT CPKD 200 to the connected pressed HS gateway Disconnect from HS AT HSH ATH1108 For test purposes only because disconnection ATH initiated by HS other than sending Americas 1 800 492 2320 74 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech con bluetooth BTM510 511 User Guide Bluetooth Multimedia Module AT CKPD 200 to gateway is not defined in HSP specification Enable ATH for HS 332 Enable HS disconnection ATH1108 and ATH 0 disabled 1 enable default Should only be enabled for test purposes because disconnection initiated by HS other than sending AT CKPD 200 to gateway is not defined in HSP specification Select SCO audio 315 SCO audio interface select interface BTM5xx 0 internal codec default only 1 12S master 2 12S slave 3 external PCM interface Refer to Routing audio streams over I2S Query HS status ATI63 0 not connected 1 ACL connected 2 Audio connected 2 6 5 2 Audio gateway role AG HSP HSG Audio gateway role for HSP is activated by setting flag 0x08 in S102 plus AT amp W plus atz Figure 2 25 outlines a block diagram of an audio gateway with a BTM5xx in hosted operation mode Local speaker Local microphone BTM5xx HSG or Audio routing control HFG AT command interface V Mobile Termination Network Telephone control
3. Americas 1 800 492 2320 168 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module If the status of the DSR line is to be conveyed to the remote device as a low bandwidth signal then this register MUST be set to 0 otherwise a de assertion of DSR is seen as a request to drop the Bluetooth connection This register affects S Register 536 see details of 536 508 640 11 2550 Page Scan Interval in milliseconds Minimum is 11 25ms so 10 11ms gives 11 25 ms refer to section 3 35 509 160 11 2550 n a Page Scan Window in milliseconds Minimum is 11 25ms so 10 11ms gives 11 25 ms refer to section 3 35 510 640 11 2550 n a Inquiry Scan Interval in milliseconds Minimum is 11 25ms so 10 11ms gives 11 25 ms refer to section 3 35 511 160 11 2550 Inquiry Scan Window in milliseconds Minimum is 11 25ms so 10 11ms gives 11 25ms refer to section 3 35 512 0 7 n a Specify power up state When set to 0 AT BTO is required to open the device for Bluetooth activity When set to 1 it proceeds to a state as if AT BTO was entered When set to 2 it is discoverable only similar to issuing AT BTQ When set to 3 it is connectable but not discoverable e g AT BTG When set to 4 it is connectable and discoverable e g AT BTP When set to 5 it will be like 2 but a
4. Bits 13 23 Major Service Class 11 bit field used as a mask to define service classes refer to Figure 1 and Table 2 in Bluetooth Assigned Numbers 8 Americas 1 800 492 2320 10 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Laird Technologies devices do not map to any predefined Major Service Class or Major Device Class and so the default devclass as shipped is 001F00 which means no Major Service Class and Unclassified Major Device class Profile specifications define certain mandatory flags to be set in the device class code These can usually be found in the section named Link Controller LC Interoperability Requirements in the appropriate profile specification Other examples of device class codes are as follows 0x001F00 Unclassified None Unclassified n a 0x200404 Headset Audio Audio Video Wearable Headset Device 0x200408 Hands free device Audio Audio Video Hands free Device A free tool Class of Device Generator is available online to create a particular device class code see 9 A device class set by AT BTC becomes visible immediately but is lost on the next power cycle Response lt cr lf gt OK lt cr lf gt Or for an invalid lt devclass gt value usually a value which is not 6 hexadecimal characters long Response lt cr If gt ERROR O8 lt cr f gt 2 5 1 5 ATS515 lt devclaSS ex g
5. 4 RER Line Mode Mic Mode Gain 0 7 Microphone Mode input impedance 6kQ Line mode input impedance 6kQ to 30kQ Figure 2 30 BTM51x ADC Analogue Amplifier Block Diagram 2 8 2 Digital Audio Interface Bluecore BCO5 allows audio streams to be routed to a digital audio interface instead of the internal codec These sections describe details of the digital audio interface 2 8 2 1 2 Inter Integrated Circuit Sound I2S is a digital interface to transmit stereo audio data between integrated circuits IC in embedded systems It connects an external audio CODEC or a wave file player recorder to a BTM module As most of audio media is available digitally these days there is no need to convert audio to analogue and then back to digital on the BTM5xx module Americas 1 800 492 2320 125 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Provided a digital medium is played over A2DP with a BTM5xx as A2DP source then a D A and subsequent A D conversion between the digital medium and the module A2DP source would lose signal quality due to non optimal settings of DAC ADC gains and noise picked up in the analogue path These issues can be eliminated by using the digital DS interface rather than the analogue audio input An DS interface consists of at least 3 signals bus clock SCK word select WS left right chann
6. ATSxx lt val_a0 gt lt val_b0 gt lt val_al gt lt val_b1 gt lt val_a2 gt lt val_b2 gt It is also possible to append tuples to an existing dynamic register ATSxxt lt val_a3 gt lt val_b3 gt It is also possible to enter a value in hexadecimal format by prefixing with Americas 1 800 492 2320 115 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module ATSxx reads a dynamic register The response prints one tuple per line tuple values are separated by Tuples themselves array elements are separated by carriage return linefeed lt CRLF gt The response for the above example would look like this ATSxx lt CRLF gt lt val_a0 gt lt val_b0 gt lt CRLF gt lt val_al gt lt val_b1l gt lt CRLF gt lt val_a2 gt lt val_b2 gt lt CRLF gt lt val_a3 gt lt val_b3 gt lt CRLF gt OK lt CRLF gt In contrast to a classic S register a dynamic register can be empty The response for an empty dynamic register is just OK ATSXxX lt CRLF gt OK lt CRLF gt 2 7 3 2 Dynamic register versus classic register The table below compares significant differences between dynamic and classic S registers Table 2 36 Dynamic S Registers vs Classic S Registers Register number range 744 808 0 743 Storage to persistent Automatically whenever written Command AT amp W memory Delete
7. 3 section 4 12 Many of the HFG commands refer to call states These can be queried by AT HFGC A description can be found in HFG audio routing 2 6 6 2 1 Initiate service level connection SLC from AG 1_4 2 AT HFGD lt bd_addr Initiate service level connection from local audio gateway instance to device with lt bd_addr gt The remote device must support the Hands free role HF of the Hands free profile HFP gt hex Response SLC established lt cr If gt CONNECT 123456789012 111E gt lt cr If gt Failed lt cr If gt NO CARRIER lt cr f gt Or lt cr If gt ERROR 59 lt cr If gt Americas 1 800 492 2320 92 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech conm bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Or lt cr If gt ERROR 63 lt cr If gt After an SLC connection is established the module remains in AT command mode S Register 531 is ignored for HFP connections Americas 1 800 492 2320 93 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 6 6 2 2 Initiate audio connection from AG 3_4 11 AT HFGA Initiate audio connection from local audio gateway instance An existing service level connection is required This command is not permitted to be issued in a call setup state incoming dialling alerting ATI66 5 or 6 and returns with ERROR
8. Refer to 331 and UUIDs in CONNECT NO CARRIER messages HFG VGS lt n gt Speaker gain setting message was received from HF VGS lt n gt with n gain 0 15 HFG VGM lt n gt Microphone gain setting message was received from HF VGM lt n gt with n gain 0 15 Americas 1 800 492 2320 102 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module FS8000 NT The internal codec is configured for a sampling frequency of 8000 Hz HFG AU1 Audio connection SCO has been established audio on HFG AUO Audio connection SCO has been released audio off HFG C A call has been established and is ongoing HFG T A call has been terminated HFG R Incoming call was rejected HFG OP Request for network operator string AT COPS received from HF AG is expected to reply with COPS 0 0 lt operator_string gt on SLC Use AT HFGO lt operator_string gt HFG Dnnn Request from HF to place an outgoing call to phone number provided by HF with lt nnn gt number string The AG is expected to confirm the outgoing call with the command AT HFGC1 If the call request is not accepted by the HFG it must send AT HFGC1 first and then AT HFGCH HFG D gt nnn Request from HF to place an outgoing call using memory dialling with lt nnn gt memory locati
9. set of buttons keypad display Figure 2 25 Audio Gateway block diagram Americas 1 800 492 2320 ZS Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Americas 1 800 492 2320 76 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 6 5 2 1 Initiate ACL connection from AG HSP AT HSGD lt bd_addr Initiates an ACL connection from local headset gateway instance to a remote device lt bd_addr gt The remote device must support the headset role HS of the headset profile HSP Response lt cr If gt CONNECT 123456789012 1108 gt lt cr If gt Or lt cr f gt NO CARRIER lt cr f gt Or lt cr If gt ERROR 59 lt cr lf gt Or lt cr If gt ERROR 63 lt cr lf gt After an ACL connection is established the module remains in AT command mode S Register 531 is ignored for HSP connections If S Register 345 1 the audio gateway alerts the headset immediately by sending RING or performing the in band ringing procedure depending on S Register 346 and waits for the response AT CKPD 200 If S Register 345 0 an incoming call must be signalized to the HS manually by issuing AT HSGC This either sends the RING message to the HS or performs the in band ringing procedure and waits for AT CKPD 200
10. 2 9 3 1 Digital Cable Replacement by GPIO FMC In this digital VO cable replacement variant a GPIO x is configured as input with the function mapping code FMC Cable Replacement TX 0x00 and the corresponding GPIO x on the peer device is configured as output with FMC Cable Replacement RX 0x00 An SPP connection is required to transmit status changes of GPIO inputs to the peer device For this purpose 531 must be set to 4 before creating the SPP link and S506 must be 0 The SPP connection cannot be used for serial data and the module remains in local command mode The GPIO index must be within 1 12 There is no confirmation available if a status change was transmitted successfully to the peer Ensure that the devices are not at the end of the maximum distance range The direction of several GPIOs can be mixed but one GPIO is always unidirectional For example GPIO1 direction is input on device A and output on device B Then GPIO2 could be output on device A and input on device B Note that due to inherent latency of Bluetooth transmission expect the change of a state to be delayed This value is typically 100ms and can be much more if the link quality is bad and requires many retries GPIOs mapped to the alternative function modem control cannot be used for this variant of digital I O cable replacement See Digital Cable Replacement by RFC Modem Control Signals 2 9 3 2 Digital Cable Replacement by GPIO AVRCP This di
11. 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 6 3 22 Post processing modes One out of five modes can be selected by UFE or by AT commands As outlined in Table 2 16 only Modes 1 Pass Thru and 2 Full are sensible to A2DP stereo applications highlighted in table 3 16 However modes 3 and 4 can be utilised for custom post processing algorithms Table 2 16 A2DP decoder post processing modes 0 Stand By Not useful for A2DP stereo application 1 PassThru Stereo post processing disabled default mode for SBC AAC decoder 2 Full Stereo post processing enabled such as PEQ parametric equalizer Stereo 3D enhancement Compander etc stereo 3 Mono Mono not useful for A2DP stereo application can be replaced by custom post processing algorithms 4 MonoPas Mono not useful for A2DP stereo application can be sThru replaced by custom post processing algorithms 2 6 3 23 AT ACS Query post processing mode AT APM query current A2DP decoder post processing mode Response 1 pass thru mode no post processing 2 full post processing mode CSR music example Music Manager ERROR 93 A2DP not in streaming state or not in A2DP sink role decoder ERROR 94 command not supported by current decoder plugin 2 6 3 24 AT APMx Set post processing mode AT APMx set current A2DP decoder post processing mode with x 0 5 1
12. outermost state has the lowest priority In our example the innermost state is AudioOn and the outermost state is Scanning This leads to the following priority configuration Table 3 40 States defined for indication 1 low 1 Not disc Not con no parameters for ATI27 0 2 Discoverable only scanning states AT 27 1 4 Connectable only a ATI27 2 8 Discoverable Connectable ATI27 3 2 16 Connected none any profile Status regarded as TRUE whenever any profile is connected 3 high 17 AudioOn none any audio Status regarded as TRUE whenever type direction the audio circuitry is turned on Americas 1 800 492 2320 118 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech conm bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 7 4 3 D Reg 744 745 status to blink pattern mapping Dynamic registers 744 gt LEDO and 745 gt LED1 assign an LED blink pattern to a status ID Tuple lt Statusld gt lt Patternid gt Range 1 17 0 10 Default none For lt Statusld gt see Table 2 38 For lt Patternid gt see Table 2 38 Table 2 38 LED blink pattern IDs LED off LED on Blink fast Blink medium Blink slowly Flash fast Flash medium Flash slowly Pulse fast Pulse medium 1 LD IO ND UM AIWwWINJ O 0 Pulse slowly 2 7 4 4 AT SiLx y Test LED blink pattern AT SILx y t
13. 1 microphone AT commands S Registers and asynchronous messages for CVC support are described in the application note CVC on BTM5xx 13 available from Laird Technologies under NDA Americas 1 800 492 2320 143 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 9 2 SCO eSCO Audio Link BTM modules provide an AT command to establish an SCO eSCO audio connection between a pair of BTM modules or BISM2 This enables the user to create bidirectional audio links independently from a particular Bluetooth profile The only prerequisite is the existence of a Rfcomm link serial port profile SPP between the modules If the SPP link doesn t exist it can be created using AT SPD lt BdAddr gt Refer to section 2 6 2 A SCO eSCO link is intended for bidirectional transmission of speech The sampling rate is fixed to 8 kHz meaning a usable bandwidth of 3 5 kHz For SCO there are 3 packet types defined in the Bluetooth specification 1 HV1 HV2 HV3 Each occupies one slot They differ in the level of bit error checking Laird recommends you enable all three packet types for SCO links This passes the final decision down to the baseband There is no retransmission of erroneous SCO packets For eSCO and basic data rate there are 3 packet types defined in the Bluetooth specification 1 EV3 EV4 EV5 EV3 occupies one slot EV4 and EV
14. 2 FFFFFF not explicitly specified When queried the value is always printed as a hex number The seventh most significant digit can be 0 1 or 2 and specifies the type of device class filter When O it specifies no filtering When 1 it specifies an AND mask and all 24 bits are relevant When 2 it specifies a filter to look for devices with matching major device class which occupies a 5 bit field from bits 8 to 12 inclusive assuming numbering starts at bit 0 All other 19 bits MUST be set to 0 S517 20 2 61 n a Inquiry Length in units of seconds This parameter is referenced by the AT ABT command 518 8 0 255 n a Maximum number of responses from an inquiry request This parameter is reference by the AT ABT command If this number is set too high then AT BTI returns ERROR 27 For a particular firmware revision determine the effective maximum value by trial and error That is set to a high value send AT BTI and if ERROR 27 is returned then retry with a smaller value This effective max value remains unchanged for that particular firmware build 519 500 100 3000 n a When S507 gt 0 and in a connection DSR can move the module from data to command state by de asserting the DSR line for less than the time specified in this register This value is rounded down to the nearest 100 ms S520 9600 1200 n a Change to a standard baud rate The effect is immediate 115200 and in fact the OK is sent at the new baud rate Onl
15. 8kHz sampling rate on internal codec HE AU SCO connection sie ongoing call HF AUO SCO disconnected FS44100 INT 44 1 kHz sampling rate on internal codec APSTR lt resuming A2DP stream initiated remotely In the second scenario where the audio source and the HF gateway are different devices you must take more precautions Neither device knows if the audio resource of the A2DP sink HF unit is in use when one requests an audio link For example if the mobile phone signals an incoming call and requests a SCO link while A2DP is being streamed from another device the mobile phone is unaware of A2DP stream and so cannot request its suspension In this case the audio stream must be suspended manually by a host microcontroller AT APU before accepting the call Once the call finishes the audio stream should be resumed manually by a host microcontroller AT APR S register 355 audio resource override helps to address and automate this scenario It controls whether incoming outgoing requests for A2DP or SCO connections are accepted by requiring that a link of another type be suspended A2DP or closed SCO before accepting initiating the new link See Table 3 1 for details of 355 In an A2DP HFP simultaneous scenario it is likely that the user wants different gain settings for SCO and A2DP links ATI22 for output and ATI23 for input query the last gain settings used for a SCO connection of the internal codec ATI2
16. accept incoming Unit Info Requests and send response automatically default with Company ID as per 303 and unit type 0x09 Panel fixed Enable Subunit Info 306 0 1 Response Target 0 reject incoming Subunit Info Requests 1 accept incoming Subunit Info Requests and send response automatically default with Subunit type 0x09 Panel fixed and MaxSubUnitld 0x00 fixed Configure PASS 310 0 1 THROUGH PT Response Target 1 Enable automatic PT response response type is read from 311 default O Host is required to respond to PT Indication see AT AVR Set automatic PT 311 0 7 response type This value is queried for automatic PT Response see Table 2 24 Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth 66 Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module Target Default value is accepted 1w 9r Note If this value is set to reject 2w 10r then incoming Pass Through commands are not forwarded to the host processor no AVPTI message is sent to the host Respond to AT AVR lt avrc_res lt avrc_response_type gt see Table 2 24 incoming Pass Through command Target ponse_type gt If S 310 1 response from host is not required Suppress AVRCP direction indicator 362 0 1 O AVRCP direction indicator enabled deflt 1 A
17. and S Registers 563 564 specify minimum Mi and maximum Mi respectively Although the specification defines these parameters in terms of timeslots the S register values must be specified in milliseconds and the firmware converts it to timeslots High Power Consumption ange Low Power Consumption Data Exchange lt 4 Data Exch T Slots S561 ms Data Exchange Data Exchange S E pi v DI 8 y T Slots 561 ms y T Slots 562 ms M T Slots 562 ms T Slots S562 ms N Slots 561 ms N Slots 561 ms N Slots 561 ms gt H t M Slots Negotiated H M Slots Negotiated M min S563 ms gt lt M min S563 ms gt M_max S564 ms M_max S564 ms Figure 2 38 Sniff Mode Example 2 9 12 Maximum RF Tx Power Level 541 and 542 control the maximum RF transmit power level for all operation states inquiring connecting in connection 2 9 13 Manufacturing Info String A string with manufacturing information can be retrieved by ATI200 2 9 14 Bluetooth version The Bluetooth version can be queried by ATI18 Americas 1 800 492 2320 155 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 9 15 Legacy Issues BT2 0 There are some special cases if a legacy device BT2 0 or earlier e g BISM2 requests a connection to a
18. has been received from the HFG This message is sent by the HFG on incoming calls together with HF RING The HFG and telephone network must support this feature and the according flag Bit 2 value 4 in the HF supported features S register 581 must be set at boot time n type of number derived from the lt type gt in SLC message not the original value 0 unknown 1 international number 2 national number 3 network specific number 4 dedicated access short code m length of caller number number of characters 1234567 caller number HF CCWA OK HFG has replied with OK to reception of AT CCWA 1 or AT CCWA 0 HF CCWA ERROR HFG has replied with ERROR to reception of AT CCWA lt gt HF CNUM 1234567 ttt s Response to a AT CNUM request received from HFG 1234567 is a phone number in format specified by ttt ttt specifies the format of the phone number provided and can be one of the following values values 128 143 The phone number format bay be a national or international format and may contain prefix and or escape digits No changes on the number presentation are required values 144 159 The phone number format is an international number including country code prefix The plus sign is not included as part of the number and shall be added by the HFG as needed Values 160 175 National number No prefix nor escape digits included s Ind
19. mmand KEE 9 2 5 Module Configuration 10 ENNER erno EE 10 2 5 2 AT Commands for S Register 13 2 5 3 GemetalS EE 15 25 4 AT Commands for JOE eege eseou Eege a aa ai ia 15 2 5 5 AT Commands for Extended Inquiry Response Data 18 Een el ue e EN 2 5 7 AT Commands for Legacy Pairing sessista a a 24 2 5 8 AT Commands managing Trusted Devices cccceceeeeeeeeeeeceeeeeeeeeeeeeeeeeeecneeeeeneeeeenies 25 2 5 9 AT Commands for Serial Stream Oriented profiles Gs 26 2 5 10 AT Commands for a Selected Peer Device cccccecceeceeceeeeeeeeeeeeeceeeeeeeeeeeesnseesteeeenees 30 2 6 Bluetooth rotes cecicicccthcdc is ingpacea aaa aera a ia a ENa 32 2 6 1 Ee E tO EE ER 2 6 2 SPP Serial Port Profile 33 2 6 3 A2DP Advanced Audio Distribution Protilei 37 2 6 4 AVRCP Audio Video Remote Control Profile 56 2 6 5 HSP Headset Proilei kkk n kkk n nenna nannaa EEEE E REEERE REEERE EEEE EEEEE 69 2 6 6 HFP Hands free Profile 78 2 6 7 DUN Dialup Networking Proftlei 102 ES GE en le sisi sede coscanadeiiecesadag irseee N E a S 104 2 7 1 Auto connect records ACR nA EEEE EEEE E EEEE EEEEEEEEEEEEEEE EEEn 104 Americas 1 800 492 2320 3 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 7 2 Auto connect service AC 107 21 3 DYMAMIC ET 109 2 7 4 Status Imdicatton EA EEEESEEEEESEEEEESEEEEEEEEEE NEEESE EEEn EEEn nErenn en 110 2 7 5
20. regardless of the connection s direction incoming outgoing When writing 1 to a profile flag which is already set in S368 the flag is cleared in S368 Check local HCI role for each profile ATI56 Range 0 1FF 2 9 24 Encryption If the remote device is BT2 1 and later all connections except SDP service discovery profile are encrypted Encryption key length is 56 bit If the remote device is BT2 0 or earlier an encryption request is sent to the remote device once the connection is established regardless of the profile which has connected active encryption request by BTM51x If required this request can be disabled by 375 differentiated by connection direction incoming outgoing 2 9 24 1 375 disable active encryption request to BT2 0 devices 375 inhibit active encryption request for remote devices BT2 0 or earlier Bit 0 disable active request of encryption for incoming connections any profile Bit 1 disable active request of encryption for outgoing connections any profile Default value 0 Values can be ORed Americas 1 800 492 2320 160 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 3 3 1 S Registers The following table lists all S Registers APPENDIX Table 3 1 BTM General S Registers SO 0 1 15 SPP Number of RING indication before automatically answering an inc
21. to arrive from the HS If the headset does not respond the host must to terminate the connection by AT HSGH 2 6 5 2 2 Alert HS by sending RING message or in band ringing AT HSGC When in ACL connected state the command AT HSGC alerts the HS either by sending RING if S346 0 or by in band ringing if S346 1 In the latter the AG is assumed to create an in band ringtone which is audible on the HS through the SCO connection The in band ringtone is not created by BTM5xx itself It must be created by the external circuit and must be connected to the BTM5xx analogue audio input In band ringing is indicated by ATI64 returning 6 If ATI64 returns 5 alerts are indicated with the RING message In both cases the response AT CKDP 200 Button pressed is expected from the HS 2 6 5 2 3 Cancel an ongoing alert process AT HSGCH When the HSG is alerting the HS ATI64 5 6 this state can be cancelled by AT HSGCH If in band ringing is active ATI64 6 the audio connection is released 2 6 5 2 4 Release audio from HSG side transfer audio from HS to HSG AT HSGR When in audio connected state the AG can transfer the audio connection from the headset to itself with AT HSGR This releases the audio connection but the ACL connection is retained In ACL connected state the headset HS is able to transfer the audio connection back to the HS by sending AT
22. 0 1 n a Store link key automatically on general bonding incoming GBI 329 0 0 1 n a Enable legacy BISM2 response format 330 1 1 31 n a Configure inquiry response of AT BTI Bitmask 1 show device address 2 show class of device 4 show friendly name 8 show extended inquiry data Values can be ORed 331 2 0 2 n a Direction indication style for CONNECT messages 0 disabled 1 character style append I to incoming and O to outgoing CONNECT message separated by a comma 2 symbol style append lt to incoming and gt to outgoing CONNECT message separated by a comma applies only to role indicating UUID e g HSP HFP and if 329 0 332 1 0 1 HSP Enable HS disconnection ATH1108 and ATH 0 disabled 1 enable default Should only be enabled for test purposes because Americas 1 800 492 2320 165 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module disconnection initiated by HS other than sending AT CKPD 200 to gateway is not defined in HSP specification 333 1 0 1 HFP Enable verbose indicators D display indicator ID only in HFI asynchronous message refer to section 3 16 1 13 1 display indicator string in HFI asynchronous message refer to section 3 16 1 13 334 0 0 1 n a Enable Extended Sdp
23. 1 7 14 2 16 10 17 1 The complete AT script AT amp F Factory default ATS744 1 7 14 2 16 10 17 1 Set LEDO status blink pattern assignment ATZ Reset module note dynamic registers are immediately stored to persistent store AT amp W is not needed Verify that LEDO is flashing slowly AT BTQ AT BTG AT BTP Enter various scanning states LEDO is blinking fast AT BTX Enter not discoverable not connectable LEDO is flashing slowly For testing connected and AudioOn states see section 2 7 4 6 2 7 4 6 Hostless operation Hostless operation means that no external host microcontroller is needed to control the module Any input is realized by push buttons and any output is realized by indicators such as LEDs or GPIO outputs For hostless operation ACS is typically started at boot time The first condition requires the module to be neither discoverable nor connectable at boot time S512 1 This is why in host less operation a GPIO input function mapping code FMC 0x11 turns the module in discoverable connectable mode for a time window specified by 371 This is realized by pressing a button connected to the GPIO input The remote device is expected to initiate the connection or pairing during this time window LED blink patterns can be configured to indicate the connectable discoverable status as described in previous sections 2 7 4 7 Input FMC 0x11 5371 enter discoverable connectable mode wit
24. 1 7Error Reference source not found The last part ADK2 0 indicates that the correct version of UFE Music Manager for these decoders is contained in CSR ADK2 0 Laird may provide this tool under certain conditions BER CTS DSA DCD RI ARTSY DIpkz DREI CAPTURES Echo Clear Data Transfer Test Open COM38 9600 N 8 1 ADKZ ADKZ ADKZ Music Figure 2 17 ATI38 2 6 3 21 Connecting to UFE Create an A2DP connection with BTM5xx as sink to start streaming e g playing music from a phone As soon as APSTR lt appears on the modules UART you may connect to the DSP application loaded UFE queries the SysID and BuildNo of the DSP application over SPI You may only connect if the Sysld is correct OxEO06 After UFE has successfully connected in the upper left corner MusicManager appears followed by Sysld vE006 hexadecimal BuildNo b101 decimal and current sampling frequency Enable monitoring mode by either clicking Menu gt DSP gt Monitor DSP or the glasses button In monitoring mode parameters are polled from the DSP at regular intervals This allows monitoring of MIPS performance of the decoder Decoder MIPS and MIPS of post processing functions Function MIPS In addition you may monitor signal peaks at 4 points Another function allows you to set the current mode Americas 1 800 492 2320 52 Laird Technologies Europe 44 1628 858 940 Asia
25. 12 lists supported A2DP codec types Table 2 11 A2DP Supported Features on BTM5xx 1 Audio Streaming M Yes M Yes M mandatory Americas 1 800 492 2320 39 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Table 2 12 A2DP Supported Codec Types on BTM5xx L SBC M Yes M Yes 2 MPEG 1 2 Audio O No O No 3 MPEG 2 4 AAC O No O No 4 ATRAC family O No O No M mandatory O optional 2 6 3 1 A2DP Example 1 This section gives an example of an A2DP connection between a Laird module 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 must be similar and follow these steps Device discovery Device Selection Pairing Connection establishment e g initiated by PC AUN If you have a Bluetooth 2 0 or earlier stack on your PC legacy pairing with PIN occurs In that case use AT BTK lt PIN gt to enter the PIN on the module This assumes the BTM5xx device is 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 2 13 Figure 2 7 through to Figure 2 12 are screenshots of the process Table 2 13 A2DP Example 1 Command Sequence Preparation AT
26. 63 in that case Response Audio on lt cr lf gt HFG AU1 lt cr If gt 2 6 6 2 3 Release audio connection from AG 3_4 12 AT HFGR Release audio connection only The service level connection is retained This command is not permitted to be issued in a call setup state incoming dialling alerting ATI66 5 or 6 and returns with ERROR 63 in that case Response Audio off lt cr If gt HFG AUO cr H 2 6 6 2 4 Release entire connection from AG DI A2 AT HFGH Release connection from local audio gateway instance An audio connection is released if existing SLC is released anyway This command is not permitted during a call setup state incoming dialling alerting ATI66 5 or 6 and returns with ERROR 63 in that case Response On audio disconnection lt cr If gt HFG AUO lt cr If gt only if audio connected On SLC disconnection lt cr lf gt NO CARRIER 111F lt cr lf gt Refer to UUIDs in CONNECT NO CARRIER messages 2 6 6 2 5 Signal incoming call from AG to HF 4_ 4 13 AT HFGC lt number_string gt lt type gt Signal an incoming call by sending sending RING and CLIP lt number_string gt lt type gt to HF periodically The lt number_string gt field represents the phone number of the ringing party The type field specifies the format of the phone number and can be one of the following values Values 128 143 The phone number format may be a national or international
27. Audio connected 5 Ringing ACL connected 6 In band ringing Audio connected 2 6 6 HFP Hands free Profile The Hands free profile HFP defines how two devices supporting HFP shall interact with each other on a point to point basis The use case for HFP is a hands free unit that is connected wirelessly to an audio gateway The audio gateway is typically a cellular phone The hands free unit acts as audio input and audio output of the cellular phone and allows control of typical telephony functions without access to the phone We recommend the BTM5xx module be controlled by a host processor using AT commands hosted operation mode BTM5xx HFP implementation supports both Hands free role and Audio gateway role An AT command beginning with AT HF indicates affiliation to Hands free role of HFP An AT command beginning with AT HFG indicates affiliation to Audio Gateway role of HFP Version 1 5 of the hands free profile is supported 5 Table 2 29 shows the feature requirements for this profile and the level of support on BTM5xx We recommend you download the profile specification 5 in order to understand the procedures related to each AT command For quick navigation references to 5 are given in this section which follow the syntax lt Feature gt _ lt Section gt With lt Feature gt HFP feature no in Table 2 29 and Table 3 1 of 5 lt Section gt Appropriate Section in 5 Example 3_4 12 feature no
28. CKPD 200 Americas 1 800 492 2320 dt Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 6 5 2 5 2 6 5 2 6 2 6 5 2 7 2 6 5 2 8 2 6 5 2 9 2 6 5 2 10 Initiate audio from HSG side transfer audio from HSG to HS AT HSGA When in ACL connected state the AG can transfer the audio connection from itself to the headset by AT HSGA This establishes an SCO based audio connection Connection release from AG AT HSGH Release existing connection to a HS If the HS is alerted alerting is cancelled If an audio connection exists it is released first ACL is released in either case Response On audio disconnection optional lt cr If gt HSG AUO lt cr lf gt On SLC disconnection lt cr If gt NO CARRIER 1112 lt cr f gt Enable automatic alerting on SLC establishment 345 S Register 345 enables automatic alerting on ACL establishment It contains a bitmask where bit O corresponds to outgoing ACL connections and bit 1 corresponds to incoming ACL connections If automatic alerting is disabled S345 0 it can be initiated manually by AT HSGC Enable in band ringing 346 In band ringing is enabled by S Register 346 value 1 If disabled S346 0 the RING message is send instead to alert the HS Enable automatic SLC release 347 If the HSG is in audio connected state and th
29. CNUM OK If the HFG does not support this feature it should send ERROR indicated as HF CNUM ERROR Refer to Hands free asynchronous messages Response lt cr gt lt lf gt OK lt cr gt lt lf gt immediately BTM accepting command and one of the following lt cr gt lt lf gt HF CNUM lt number gt lt type gt lt service gt refer to Hands free asynchronous messages lt cr gt lt If gt HF CNUM OK lt cr gt lt lf gt or lt cr gt lt If gt HFX lt SLC_message gt lt cr gt lt lf gt original SLC response from HF gateway but response format not compliant to HFP specification lt cr gt lt If gt HF CNUM OK lt cr gt lt lf gt or lt cr gt lt lf gt HF CNUM ERROR lt cr gt lt lf gt feature not supported by HF gateway or Nothing if the HF gateway ignores this query for any reason Americas 1 800 492 2320 85 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 6 6 1 13 Query Operator Selection 2_4 8 AT HFO Query operator selection from HFG AT COPS is sent to the HFG HFG sends the operator selection information indicated on the HF by HF COPS An OK is sent by HFG on termination indicated on HF by the asynchronous message HF COPS OK If the HFG does not support this feature it should send ERROR indicated on HF as HF COPS ERROR Refer to Hands fr
30. Disable NR EC in HFG AT NREC 0 sent on SLC Feature 14_4 24 of HFP1 5 spec This command is only allowed if both HF and HFG have declared NREC support in their HF HFG supported features see S581 HF and 596 HFG Otherwise ERROR 89 is returned AT HFF and AT HFFN allow to query currently supported HFP features Americas 1 800 492 2320 86 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 6 6 1 17 Query supported features locally and remote AT HFF Query local HF and remote HFG supported features SF HFP SLC is required Response lt HF_SF gt lt HFG_SF gt Refer to S581 for a definition of local HF supported features Refer to S596 for a definition remote HFG supported features 2 6 6 1 18 Query NREC flag locally and remote AT HFFN Query NREC noise reduction echo cancellation flag of local HF and remote HFG supported features HFP SLC is required Response lt HF_NREC gt lt HFG_NREC gt The NREC flag is Bit O in the HF supported features S581 and Bit 1 in HFG supported features S596 2 6 6 1 19 Indicators from HFG CIEV 2 HEIN lt indicator_string gt lt val gt S333 1 default HFl lt indicator_id gt lt val gt S333 0 Inform the HF host about a CIEV indicator message received from the connected audio gateway S Register 333 enables verbose mode for HEI indicato
31. For example if DIR 0 and PS 1 the input pin status is pulled up if DIR 0 and PS 0 then the input pin is pulled down There are no resistors switched inside the chipset but strong and weak bias are defined by particular currents on the input pin refer to Table 2 50 BTM51x Bias Currents for GPIO inputs Note that an external real pull up pull down resistor can easily override the internal settings depending on its value To see the effects of internal pull up down clearly remove external resistors e g on a development kit Table 2 50 BTM5 1x Bias Currents for GPIO inputs Strong pull up 100 40 10 UA Strong pull down 10 40 100 UA Weak pull up 5 0 1 0 0 2 UA Weak pull down 0 2 1 0 5 0 UA Some GPIOs can have an alternative function assigned If the alternative function is enabled the appropriate I O Pin is no longer available as GPIO Modem control functions DCD DSR RI DTR are assigned to GPIO pins as outlined in Table 2 51 This assignment is fixed and configuration settings are read only Hence IO pins of modem control lines cannot be configured as other GPIOs Wi Fi coexistence functions are not used Table 2 51 recommends which pins should be reserved when Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth 137 Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module planning a new product with Wi Fi coexistence support Wi Fi coexistence
32. Info request to a connected AVRCP target Response lt cr lf gt OK lt cr lf gt immediately And lt cr If gt AVSR lt n gt lt page gt lt pagedata gt lt cr lf gt after command completion dec hex lt n gt status O success 1 fail 4 timeout lt page gt requested page 0 31 lt pagedata enz 1 word of requested page If lt n gt is greater than zero unsuccessful outcome lt page gt and lt pagedata gt is not sent Examples for unsuccessful response are lt cr f gt AVSR 1 lt cr lf gt or lt cr f gt AVSR 4 lt cr lf gt hex incomplete because only the first word of the requested page is being displayed in the AVSR asynchronous message Americas 1 800 492 2320 63 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 6 4 3 3 2 6 4 4 Send remote control command AT AVC lt operation_id gt lt button_state gt Send a remote control command to a connected AVRCP target Internally a PASS THROUGH command is created and sent to the PANEL subunit of the AVRCP target lt operation_id gt is the value for the remote control command Values are specified in Table 2 20 hex lt button_state gt represents Button pushed 0 or Button released 1 If lt button_state gt is not specified two PASS THROUGH commands each with button_state 0 and butto
33. Multimedia Module Tape recorder player 0x04 Tuner 0x05 CA 0x06 Camera 0x07 Reserved 0x08 Panel 0x09 Bulletin board Ox0A Camera storage Ox0B Vendor unique Ox1C Reserved for all 0x1D Extended 0x1E Unit Ox1F Table 2 23 AVRC Respons Types Not implemented 8 0 Accepted 9 1 Rejected 10 2 Note Incoming pass through commands A VPTI are not displayed to the host if this is the value of S311 In transition 11 3 Stable 12 4 Changed 13 5 Interim 15 6 Bad profile 16 7 Table 2 24 AVRCP Unsolicited Messages CONNECT 123456789012 110E gt Outgoing AVRCP connection established 123456789012 bd_addr of peer device 110E UUID indicating AVRCP CONNECT 123456789012 110E lt Incoming AVRCP connection established 123456789012 bd_addr of peer device 110E UUID indicating AVRCP NO CARRIER 110E AVRCP connection rejected or closed NO CARRIER All Connections closed Americas 1 800 492 2320 69 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech conm bluetooth BTM510 511 User Guide Bluetooth Multimedia Module AVUR 0 lt unit_id gt lt unit_type gt lt company_id gt Successful response to AT AVU UNIT INFO Request indicates completion of command lt unit_id gt Unit ID lt unit_type gt see Table 2 22 lt company_id gt IEEE Company ID AVUR lt n gt n gt 0 Unsuccessful respo
34. RF Unconnected are invalid and are ignored Navigation between these states is done by issuing AT commands described in detail in subsequent sections 2 2 Glossary of Terms A2DP Advanced Audio Distribution Profile unidirectional stereo audio ACL Asynchronous Connection Oriented Link ACR Auto Connect Record ACS Auto Connect Service ADC Analogue to Digital Converter AGHFP Audio Gateway Hands Free Profile AT Command prefix Attention AVRCP Audio Video Remote Control Profile BISM Bluetooth Intelligent Serial Module CoD Class Of Device also referred to as device class Codec Device capable of encoding decoding an analogue digital signal DAC Digital to Analogue Converter DREG Dynamic Register DSP Digital Signal Processor DUN Dialup Network Profile EIR Extended Inquiry Response eSCO Enhanced Synchronous Connection Oriented Link bidirectional mono audio for speech transmission FTP File Transfer Profile Americas 1 800 492 2320 H Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module GOEP Generic Object Access Exchange Profile GPIO General Purpose Input Output HCI Host Controller Interface HF Hands free Role of Hands free Profile Hands free Unit HFG Audio Gateway Role
35. Signal outgoing call status to HF update call AT HFGC1 lt number_strin g gt i lt type gt Outgoing call is being initiated by AG as result of a HF request Use this AT Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth 104 Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module record command to confirm HFG Dnnn or 1 HFG D gt mmm or 2 HFG L 2 OK is sent to the HF A call record in state dialling is created lt number_string gt and lt type gt are optional and is be stored in the call record if given lt type gt must be in range 128 175 Refer to section 0 AT HFGC2 Outgoing call Remote party has been reached and is being alerted may not be used if the telephone network does not provide this information Call record state is changed to alerting AT HFGC3 Outgoing call Remote party has answered the call state of call record is changed to active AT HFGC4 lt number_strin g gt lt type gt dec Outgoing call use if a call is initiated on the HFG and was not requested by HF OK is not sent to the HF A call record in state dialling is created lt number_string gt and lt type gt are optional and is be stored in the call record if given lt type gt must be in range 128 175 Refer to section 0 Signal termination of a AT HFGCH
36. Table 2 54 and Table 2 55 both list available function mapping codes Examples for input FMCs inversion enabled to work on BTM511 DVK V04 Volume down multiple after short press GPIO6 notification enabled ATS656 073C Volume up multiple after short press GPIO7 notification disabled ATS657 0834 Headset button HS must be enabled GPIO5 notification enabled ATS655 0B3C Examples for output FMCs Americas 1 800 492 2320 141 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Audio GPIO7 notification enabled e g control of external audio amplifier ATS657 053A Connected GPIO7 notification disabled ATS657 0632 Subsequent AT amp W and ATZ is required before new settings work as expected 2 8 8 2 GPIO AVRCP operation ID Another GPIO option particularly for AVRCP is the assignment of AVRCP operation IDs e g play stop pause etc to GPIOs This allows a module in AVRCP controller role to send a pass through command triggered by a push button instead of an AT command and respectively an AVRCP target can signalize incoming pass through commands on GPIO outputs If AVRCP functionality is not required in the application it can alternatively serve as a digital IO cable replacement As an advantage it does not need an SPP link and does not require a confirmation on the UART about the success or fail
37. UUIDs in CONNECT NO CARRIER messages NO CARRIER 111E Service level connection to local HF instance has been released See UUIDs in CONNECT NO CARRIER messages as well 2 6 6 1 23 Hands free summary Table 2 31 Hands free role HFP Summary of S Registers and AT Commands Enable HFP HF role 102 0x10 HF role of HFP bitmask needs subsequent AT amp W and ATZ to activate Initiate SLC from HF AT HFD lt bd_addfhex gt Responses successful CONNECT 123456789012 111F gt failed NO CARRIER profile disabled ERROR 59 incorrect state ERROR 63 Initiate audio connection AT HFA Responses from HF HE AU Release audio only from AT HFR Responses HF Transfer Audio to HF AUO AG Initiate call with number AT HFC nnn nnn number string provided by HF Initiate call with number provided by memory of AG AT HFCM mmm mmm memory location in AG of number requested to dial Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth 90 Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module Initiate call to last dialled AT HFCL Response number HFI callsetup 2 confirmation call setup is in progress OR HFG ERROR last dialed number not available in AG Query supported AT HFF Returns supported fea
38. Use AT BTX to make the device not discoverable Response lt cr f gt OK lt cr lf gt 2 5 1 13 AT BTG Make Device Connectable Make the device connectable but not discoverable and wait for a connection from any device The setting remains valid until next reset or power cycle unless not changed by any other AT command subsequently For permanent discoverable connectable settings refer to S Register 512 Response lt cr lf gt OK lt cr lf gt 2 5 1 14 AT B1V lt bd_addr gt lt uuid gt SDP Query for Service This command interrogates the SDP database of the peer device lt bd_addr gt for the service lt uuid gt It results in an ACL connection and then an SDP transaction If the lt uuid gt service is present then it returns Response lt cr lf gt 0 lt cr f gt OK lt cr H If the lt uuid gt service is not present then it returns Response lt cr f gt 1 lt cr f gt OK lt cr lf gt If the device lt bd_addr gt cannot be reached or is in non connectable mode then it returns Americas 1 800 492 2320 12 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Response lt cr lf gt 2 lt cr f gt OK lt cr lf gt If the SDP database is corrupt or invalid then it returns Response lt cr lf gt 3 lt cr f gt OK lt cr lf gt If the device is not in idle mode then it returns Response lt cr lf gt 4 lt cr
39. When initiating an A2DP link successfully the streaming state is normally entered immediately to transmit audio But there are scenarios where the A2DP link should be retained but streaming should be suspended because the audio resources are temporarily needed for other purposes e g an incoming call over HFP A number of asynchronous messages indicate any change of the A2DP streaming state APSTR APSUS Refer to A2DP Asynchronous messages Query the status of an A2DP connection with ATI61 Refer to Table 3 2 2 6 3 19 Simultaneous A2DP and HFP One scenario of particular interest is a headset scenario with A2DP sink enabled for receiving stereo audio and HF unit enabled for receiving making calls The A2DP source and the HFP gateway can be combined in one device e g a mobile phone but they could also be different devices e g an MP3 player as A2DP source and a mobile phone as HFP gateway For the first case we assume that a mobile phone will suspend the A2DP stream before enabling the SCO connection for speech Once the call is finished the mobile phone is expected to initiate resumption of A2DP streaming The only user action required is to answer the call at the BTM5xx module by AT HFCA or an appropriate GPIO button assigned to HF green button Asynchronous messages related to suspend resume actions are listed below HF messages are not shown here APSUS lt A2DP stream suspended initiated remotely FS8000 INT
40. a call by sending CIEV 2 0 call 0 indicator to HF If an incoming or waiting call is ongoing this command rejects it If a dialing or alerting call is ongoing this would interrupt or cancel the ongoing call setup procedure for any reason including rejection of an outgoing call by the remote party According to the call status of the terminated or rejected call HFG T or HFG R is sent to the host AT HFGCHL Terminate all calls of status held Terminate call signall by sending CIEV 4 0 callheld 0 indicator to HF The appropriate call record is deleted 2 6 6 2 9 Sending AG indicators to HF CIEV 2 AT HFGl lt indicator_id Send an AG indicator to HF in the form CIEV lt indicator_id gt lt value gt gt lt value gt dec Americas 1 800 492 2320 96 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Table 2 32 lists possible indicators and their value range If there is no SLC existing and indicator Service is set AT HFGI1 n the value is stored in volatile memory to be presented during a future SLC initialization procedure For all other indicators this command is valid only if a SLC exists AT HFGI should only be used with indicator IDs 1 service 5 network signal strength 6 roam and 7 battery charge level For call management purposes use the appro
41. available The first assumes that the DTR from the host is connected to the DSR line of the module and 507 1 The second assumes that this connection is absent and S507 1 or 2 In the first method deasserting the DTR line from the host aborts the autoconnect cycle No OK is sent in response The host must send a character regularly e g one per second until the module echoes all buffered characters to the host provided echo is enabled signifying it is in command mode The second method is to reset the device and ensure that the text string AT BT amp BISM amp lt cr gt is sent where lt cr gt is the carriage return character There is special code which waits for this command and then terminates the autoconnect cycle This function then sends an OK response Response lt cr lf gt OK lt cr lf gt 2 5 10 8 A7 B7R Delete Outgoing Peer Address This command deletes the peer address previously stored using AT BTR lt bd_addr gt Response lt cr lf gt OK lt cr lf gt 2 5 10 9 A7 B7R Read Outgoing Peer Address This command displays the peer address stored in non volatile memory for placing the device in pure cable replacement mode Response lt cr lf gt 12346789012 lt cr lf gt OK lt cr lf gt If the location is empty the response is as follows Response lt cr lf gt O00000000000 lt cr lf gt OK lt cr f gt 2 6 Bluetooth Profiles This section covers S Registers and AT Commands related to supported Blue
42. be ORed A profile can be enabled only if it is supported by the BTM variant Issue AT amp W and ATZ in order to make the new setting effective 0x001 is Serial Port Profile SPP 0x002 is Headset HS 0x004 is Dialup networking profile Dial Terminal DUN 0x008 is Audio Gateway Headset HSG 0x010 is Handsfree HF 0x020 is OBEX FTP 0x040 is Audio Gateway Handsfree HFG 0x080 is A2DP 0x100 is AVRCP Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth 161 Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module S103 1 1 4 n a Boot Mode on cold boot Boot modes are required to configure some low level device settings which cannot be configured by S registers and AT commands Currently there are predefined settings defining the PCM data format to be used with certain codec ICs applies mainly to BC04 1 normal 2 4 for future customisation of the module 300 1 0 2 A2DP Set A2DP role 0 feature not set 1 A2DP Sink default 2 A2DP Source Needs subsequent AT amp W and ATZ to become effective 301 1 0 2 AVRCP Set AVRCP role 0 disabled 1 Control CT default 2 Target TG Needs subsequent AT amp W and ATZ to become effective 302 0 0 4 AVRCP Set AVRCP category 0 Feature disabled default 1 Player Recorder 2 Monitor Amplifier 3 Tuner 4 Menu Needs subsequent AT amp W and AT
43. by AT commands Whereas classic S Registers allow storage of only one value per register BTM51x dynamic registers are organized as a dynamic array meaning that multiple values can be stored In addition array elements are not just single values but tuples of values instead Dynamic registers can be regarded as a two dimensional array with fixed inner length tuple and a variable outer length This structure is visualised by Figure 2 27 fixed tuple length defined per register CO 0 SE ite DO a EE S TIE Figure 2 27 Structure of a dynamic register These registers exist due to automation requirements for host less operation It is increasingly necessary to assign conditional actions to events triggered by a status a profile etc The first dynamic registers implemented are S744 and S745 which assign LED blink patterns to module states The tuple length is defined per register and can vary from one register to another The meaning of the particular tuple values and their range is described in the register documentation 2 7 3 1 Write and Read Syntax For writing values to dynamic registers the existing command ATSxx lt val gt is used with the following extension Separator for tuple values Separator for array elements In order to write three tuples 0 1 2 to dynamic register xx whereby register xx has a defined tuple length of two values the following command would be utilised
44. call or a call setup procedure to HF Also used to inform HF about remote rejection of outgoing call Release all held calls AT HFGCHL Release was initiated either locally or remotely Query list of current calls AT HFGC of HFG Returns the list of current calls Enable disable verbose 354 0 1 mode for call record presentation Value 0 non verbose mode for AT HFGC default 1 verbose mode for AT HFGC Americas 1 800 492 2320 105 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module Send AG indicator status to HF CIEV AT HFGl lt indicator_id value gt gt lt dec For lt indicator_id gt and lt value gt see Table 2 32 Command is recommended only with indicator IDs 1 service 5 signal 6 roam and 7 battery charge level For all other indicators 2 call 3 call setup 4 call held Laird recommends you use the appropriate call managing AT commands These commands send the indicators automatically Send network operator string to HF AT HFGO lt operator_string n gt Command used to respond to HFG OP Send error to HF AT HFGE Sends ERROR to HF Needed on HFG D gt mmm if memory location is invalid or on HFG L if last dialled number not available Send extended error result code to HF AT HFGE lt cme_code gt d
45. connected Connected BTM5 AT AVC44 Send Play Figure 2 22 Figure 2 23 send remote xXx Response control OK command accepted commands AVPTC 0 44 0 confirmation received from PC AVPTC 0 44 1 confirmation received from PC Reception of command should be displayed in top right corner of PC screen Figure 2 23 Player should start playing Americas 1 800 492 2320 59 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech conm bluetooth BTM510 511 User Guide Bluetooth Multimedia Module AT AVC46 Send Pause Figure 2 22 Figure 2 23 Response OK command accepted AVPTC 0 46 0 confirmation received from PC AVPTC 0 46 1 confirmation received from PC Reception of command should be displayed in top right corner of PC screen Figure Player should pause AT AVC45 Send Stop Figure 2 23 Response OK command accepted AVPTC 0 45 0 confirmation received from PC AVPTC 0 45 1 confirmation received from PC Reception of command should be displayed in top right corner of PC screen Figure 2 23 Player should stop Refer to Table 2 21 for more operations Disconnect BTM5 AT AVH Response Figure 2 22 XX NO CARRIER 110E disconnection confirmed Other Diagnostics IT Admin General Security Bluetooth Information Exchanger m Device Information Device Name PC1 00 1E 37 FA 23 46 De
46. connection to device with Bluetooth address lt bd_addr gt and SPP profile The timeout is specified by S register 505 For backward compatibility the following command fulfils the same purpose ATD lt bd_adar gt Response lt cr If gt CONNECT 123456789012 1101 gt lt cr f gt Or lt cr If gt NO CARRIER lt cr f gt Due to a known issue in the Bluetooth RFCOMM stack it is not possible to make more than 65525 outgoing connections in a single power up session Therefore if that number is exceeded then the connection attempt fails with the following response Response lt cr lf gt CALL LIMIT Or lt cr If gt NO CARRIER lt cr f gt In that case issuing ATZ to reset the device resets the count to 0 More connections are made available 2 6 2 4 AT SPDL Remake Connection Make a SPP connection with the same device as that specified in the most recent AT SPD command An error is returned if the L modifier AND a Bluetooth address are specified For backward compatibility the following command fulfils the same purpose ATDL Response lt cr If gt CONNECT 123456789012 gt lt cr f gt Or lt cr If gt NO CARRIER lt cr f gt Americas 1 800 492 2320 37 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 6 2 5 AT SPDR Make SPP Connection to peer specified in AT BTR Make a SPP connection with the device address specified in
47. digital stereo input of an A2DP source Americas 1 800 492 2320 126 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Stereo analogue PCM_IN Audio Out audio BTM5xx I2S slave I2S master device A2DP source A2DP sink PCM_SYNC PCM_OUT Figure 2 31 BTM5 1x DS example block diagram Connect an 12S slave source as outlined in the block diagram Table 2 29 The SD_OUT connection is not needed for this example The pin mapping is listed in Table 2 42 A third BTM5xx device configured in DS cross loopback mode AT BTL4 may be the DS slave device It then acts as analogue to I2S converter Table 2 43 shows the required AT command sequence Table 2 43 BTM5 1x I2S example AT command sequence AT amp F AT amp F AT amp F Restore factory default settings AT BTL4 Configure DS slave source 1 ATS314 1 Select I2S master interface at A2DP source ATS300 2 Enable Source role ATS512 4 Make connectable and discoverable AT amp W AT amp W Store S Register configuration ATZ ATZ Reset AT APD lt Bluetooth Initiate connection Get Bluetooth Address Source gt address of other end by ATI4 on other end or by inquiry AT BTI 1 For demonstration purposes or if no other DS source is available a 3 BTM5xx can be used as analogue to I2S converter in I2S cross loopback mode Americas 1 800 492 2320 127 Lair
48. edited in RAM volatile memory in the so called scratch record This section describes appropriate AT commands AT AC Query auto connect scratch record See ATI72 for syntax definition AT ACC Clear auto connect scratch record Set all fields to zero AT ACA lt BdAddr gt set BdAddr lt BdAddr gt remote device Bluetooth address 12 hex characters AT ACP lt profile_mask gt set profile mask lt profile_mask gt as defined by S102 see section 14 3 AT ACl lt interval gt Set reconnect attempt interval in seconds lt interval gt decimal number 0 127 AT ACO lt option gt Set option flags lt option gt bitmask see ATI72 lt flags gt for definition Note When using AT ACW to write the scratch record to persistent ACR table it is inserted at the top and obtain highest priority in the ACS processing order Refer to section 2 7 2 5 for more details 2 7 1 3 AT AC ACR table in persistent store non volatile memory This section describes AT commands for passing the ACR scratch record to persistent memory and vice versa as well as how to delete ACR table entries AT ACW write scratch record to persistent store insert at top prepend highest priority AT ACRn replace record in persistent store by scratch record n index of record to be replaced in ACR table select from ATI72 response AT ACLn load copy record from persistent store to scratch record n index of record to be lo
49. effective 2 6 3 14 A2DP Audio Stream Routing 314 By default A2DP audio is routed to the internal codec of the BTM5xx module i e its onboard analogue audio inputs or outputs S314 permits you to use a digital audio bus such as DS for A2DP audio as follows 314 O internal default 1 I2S master 2 2S slave Refer to Table 2 17 and Digital Audio Interface including important information regarding sampling rate capabilities of devices connected to the I2S bus Americas 1 800 492 2320 49 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 6 3 15 A2DP Codecs SBC vs APTx AAC The standard codec for A2DP is the Sub Band Codec SBC Here codec refers to DSP algorithms which encode an audio stream for transmission over a limited bandwidth link and which decode the compressed data on the receiver side 1 One advantage of SBC is wide support by all A2DP devices because SBC is a mandatory feature of the A2DP specification One disadvantage is the significant latency around 1s needed to encode transmit and decode an audio stream Due to this SBC is not ideal for applications that require synchronised audio e g wireless headphones for TV However there are optional codecs to overcome this limitation of SBC such as APTx APTx claims low latency and much better audio transparency than SBC This may of course be ev
50. for connectable discoverable if entered by FMC 0x11 Granularity 4 if value is lt 60 round up 60 if value is gt 60 round down See section 2 7 4 7 for details 372 0 0 1 Misc Control of automatic re pairing if link key missing on remote device but local link key is available 0 automatic re pairing occurs on connection attempt 1 automatic re pairing is inhibited connection attempt fails 373 0 0 7 ACR Default ACR option flags for automatic host less mode bitmask BitO always reconnect 0x01 Bit1 always send AVRCP play 0x02 Bit2 never send AVRCP play 0x04 Americas 1 800 492 2320 167 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module See section 2 7 1 6 for more detail 374 0 0 3 NVM Management of non volatile memory in host less operation bitmask BitO automatic reset on disconnect if no more profile connected and if NVQ lt 300 Bit1 immediate reset on ERROR 102 See section 2 9 22 for more detail 375 0 0 3 Misc Inhibit active encryption request for remote devices BT2 0 or earlier bitmask BitO disable encryption request for incoming connections any profile Bit1 disable encryption request for outgoing connections any profile S411 400 1600 GPIO Short press duration in ms 200 ms granularity S412 2500 4000 GPIO Component of medium press duration in ms 500ms granulari
51. format and may contain prefix and or escape digits No changes on the number presentation are required Values 144 159 The phone number format is an international number including the country code prefix If the plus sign is not included as part of the number and shall be added by the AG as needed s Values 160 175 National number No prefix nor escape digits included Refer to the Hands free Profile Specification 5 Americas 1 800 492 2320 94 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech conm bluetooth Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module The HF is now expected to answer or to reject the call Optionally an incoming call can be answered or rejected at the HFG side AT HFGCA AT HFGCH 2 6 6 2 6 Signal call answered at AG to HF 4_4 13 3 AT HFGCA If no call is active check with AT HFGC refer to HFG audio routing Signal from HFG to HF that an incoming call has been answered at the HFG On the SLC the indicators ClIEV 2 1 call 1 and CIEV 3 0 callsetup 0 are sent to the HF subsequently The status of the incoming call is changed to active If one or more calls are active check with AT HFGC refer to HFG audio routing Signal from HFG to HF that all active calls are put on hold and the waiting call has been answered at the HFG On the SLC the indicators CIEV 3 0 callsetup 0 and CIEV 4 1 callheld 1 are sent to th
52. has been delivered to the UART first and then signals the disconnection on UART NO CARRIER and on DCD line This is an experimental feature which may have side effects in certain situations It was ported from BTM41x as the result of fixing bug Ref 3 21 285 320 2 1 3 SSP Security Level see 1 vol3 Generic Access Profile Table 5 7Z Needs subsequent AT amp W and power cycle to take effect value 3 overwrites 322 Americas 1 800 492 2320 164 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 321 1 0 4 SSP Set IO capability 0 display only 1 display yes no 2 keyboard only 3 no input no output 4 reject O cap requests 322 0 0 1 SSP Force man in the middle protection MITM 0 disabled 1 enabled referenced only if security level S320 lt 3 323 0 0 1 SSP Disable legacy pre BT2 1 Pairing 0 legacy pairing enabled 1 legacy pairing disabled 324 90 1 255 SSP Secure Simple Pairing timeout in s This value must be at least 60 in order to meet the recommendation of BT2 1 specification 325 1 0 1 n a Store link key automatically on dedicated bonding outgoing DBO S326 1 0 1 n a Store link key automatically on general bonding outgoing GBO S327 1 0 1 n a Store link key automatically on dedicated bonding incoming DBI S328 1
53. is configured appropriately as input see GPIO General Purpose Input Output with a valid av_operation_id assigned see Table 2 20 AVRCP S Registers and AT Commands and if the module is configured as AVRCP Control S 301 a rising edge causes the appropriate command request to be sent to the connected AVRCP target This is as if AT AVC is issued with lt state gt 0 Button pushed A trailing edge on this GPIO causes the same command to be sent but with lt state gt 1 Button released The logical level of a GPIO can be inverted by setting the appropriate flag INV in the appropriate GPIO configuration register If configured as AVRCP Target the direction flag DIR in the GPIO Configuration Register must be set to 1 output in order to indicate received commands at a digital output A write operation to a GPIO has no effect if that GPIO is mapped to AVRCP The inversion Flag INV of the GPIO configuration register also applies to AVRCP targets GPIOs which are mapped to an alternative function e g modem control line cannot be used for this purpose Refer to Table 2 53 and section GPIO AVRCP operation ID 2 6 5 HSP Headset Profile The Headset Profile provides full duplex audio capability combined with minimal device control commands Audio bandwidth is limited and deemed to be sufficient for voice links Table 2 25 lists the feature requirements of the HSP specification 4 and the level of support by
54. lt button_state gt 0 is Button pushed 1 is Button released PASS THROUGH Response AT AVR lt avrc_response_type gt If S register 310 0 a Pass Through PT response is required from the host The response is sent using the command AT AVR lt avrc_response_type gt Parameter lt avrc_response_type gt Table 2 24 write value If S register 310 1 a Pass Through response is sent automatically with an lt avrc_response_type gt defined by S register 311 In this case the host is not required to respond Table 2 20 AVRCP S Registers and AT Commands Enable AVRCP S102 256 AVRCP Error 47 if AVRCP role has not been set profile see S301 Error 48 if S301 2 and Category has not been set see S302 Needs subsequent AT amp W and ATZ to become effective Set AVRCP role S301 0 2 0 disabled 1 Control CT default 2 Target TG Needs subsequent AT amp W and ATZ to become effective Set AVRCP 302 0 4 O Feature disabled default category 1 Player Recorder 2 Monitor Amplifier 3 Tuner Americas 1 800 492 2320 65 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech conm bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 4 Menu Needs subsequent AT amp W and ATZ to become effective Initiate outgoing AT AVD lt bd_addr AVRCP control gt connection Response if accepted CONNECT 0123456789012 110E
55. lt lf gt ERROR 66 lt cr gt lt lf gt Record with requested index lt n gt not available Or lt cr gt lt If gt ERROR 05 lt cr gt lt lf gt Syntax error 2 6 6 2 14 HFG Call Waiting Notification CCWA 11_4 21 12_4 22 1 Call waiting notification is a mandatory feature for the HFG and is therefore supported on the BTM510 511 If call waiting notification was enabled by the HF 4 21 when a call is waiting the call waiting notification CCWA and the appropriate call setup indicator CIEV callsetup 1 are sent automatically as specified in section 4 22 1 of the HFP specification 5 2 6 6 2 15 HFG audio routing Audio in the Hands free profile is always referred to as a SCO connection used for bidirectional transmission of speech On a BTM5xx SCO audio is routed to the internal codec by default 315 can select the 12S interface in master or slave mode for SCO connections Refer to Americas 1 800 492 2320 100 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Routing audio streams over DS 2 6 6 2 16 HFG status ATI66 Returns the status of the HFG instance 0 not connected 1 SLC connected 2 Audio connected 3 In call SLC connected 4 In call audio connected 5 In call setup incoming dialling alerting SLC connected 6 In call setup incoming dialling alerting aud
56. non volatile memory by AT amp W Response lt cr lf gt OK lt cr lf gt Americas 1 800 492 2320 11 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 5 1 9 AT BTN Read Friendly Name from Non volatile Memory Read the default friendly name from non volatile memory Response lt cr lf gt My Friendly Name lt cr f gt lt cr f gt OK lt cr lf gt 2 5 1 10 A7 B7TF lt bd_addr gt Get Remote Friendly Name This command gets the remote friendly name of the peer specified Response lt cr lf gt lt bd_addr gt Friendly Name lt cr f gt OK lt cr lf gt 2 5 1 11 AT BTP Make Device Discoverable and Connectable Make the device discoverable and connectable and wait for a connection from any device The setting remains valid until next reset or power cycle unless not changed by any other AT command subsequently For permanent discoverable connectable settings refer to S Register 512 Response lt cr lf gt OK lt cr lf gt 2 5 1 12 AT BTQ Make Device Discoverable Make the device discoverable but not connectable Being discoverable implies that this device responds to inquiries from other devices inquiry scans enabled The setting remains valid until next reset or power cycle unless not changed by any other AT command subsequently For permanent discoverable connectable settings refer to S Register 512
57. of Hands free Profile Hands free Gateway HFP Hands Free Profile HID Human Interface Device Profile HS Headset Role of Headset Profile Headset HSG Audio Gateway Role of Headset Profile Headset Gateway HSP Headset Profile ER Inter IC integrated circuit Sound VO IO Input Output Mic Microphone MITM Man In The Middle OPP Object Push Profile PBAP Phone Book Access Profile PT PASSS THROUGH Command PWM Pulse Width Modulation SBC Sub Band Codec SCO Synchronous Connection Oriented Link for bidirectional mono audio for transmission of speech SLC Service Level Connection SPP Serial Port Profile SSO Serial Stream Oriented SSP Secure Simple Pairing SUI SUBUNIT INFO Command SXXX S Register No xxx TDL Trusted Device List UART Universal Asynchronous Receiver Transmitter UI UNIT INFO Command 2 3 Overview of the BTM product family Chipset CSR BC4 Ext Bluetooth version 2 1 Features SSP EIR SCO 1 eSCO 1 4 GPIOs Profiles SPP 1 external codec required Chipset CSR BCSMM Ext Bluetooth version 2 1 Features SSP EIR SCO eSCO 4 GPIOs APTx AAC sink CVC Profiles SPP A2DP AVRCP HSP HFP DUN DT Americas 1 800 492 2320 8 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech con bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 4 BTM AT Command Set This section describes the AT Command Set for a BTM modul
58. of the RAM buffer The maximum number of characters for lt data gt is 25 due to the limited AT command input buffer See AT BTE lt data gt Accumulate data in RAM buffer for more information Response lt cr f gt OK lt cr f gt Or lt cr f gt ERROR 05 lt cr f gt 2 5 5 3 AT BTE lt EIR data gt Write EIR data to baseband and RAM buffer This command writes EIR extended inquiry response data to the baseband and to the RAM buffer The maximum number of characters for lt EIR data gt is 25 due to the limited AT command input buffer See AT BTE lt data gt Accumulate data in RAM buffer for more information Response lt cr f gt OK lt cr lf gt Or lt cr f gt ERROR 05 lt cr If gt 2 5 5 4 AT BTE Copy RAM buffer to baseband This command copies all data from the RAM buffer to the baseband The data passed to the baseband must match the EIR data format as specified in the BT2 1 specification page 1305 in the pdf file See AT BTE lt data gt Accumulate data in RAM buffer for more information Response lt cr f gt OK lt cr lf gt Americas 1 800 492 2320 19 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 5 5 5 AT BTEW Copy RAM buffer to EIR persistent store This command copies all data from the RAM buffer to the non volatile persistent store If the EIR persistent store contains any d
59. scan state 0 not discoverable and not discoverable not scanning 1 discoverable inquiry scanning 2 connectable page scanning 3 discoverable and connectable inquiry and page scanning ATI28 Current audio sampling rate for input and output in Hz ATI29 Maximum EIR data size in bytes ATI30 RAM buffer length in bytes ATI31 Length of EIR baseband buffer ATI32 Query CVC license key ATI35 Query list of available CVC images Returns SYSID security status technical name and SDK ATI36 Status of boot time CVC license check applies if S318 gt 0 ATI37 Query SCO link type O unknown no SCO link 1 SCO 2 eSCO ATI38 Display Type SysID BuildNo FriendlyName and CSR SDK of all available A2DP decoders capable of post processing Americas 1 800 492 2320 179 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module ATI42 State information The response values are as follows 13 NotOpen 14 Openldle 15 Ringing 16 OnlineCommand 172 to 177 indicate waiting for connectable and or discoverable where the third digit equates to the value stored in S Register 512 or 555 ATI54 Query remote Bluetooth device addresses of all connected profiles Response per profile line lt profile_mask gt lt BdAddr gt _ 102_hex ATI55 Query RSSI value for all connected profiles Response pe
60. stream seems to be consumed by inquiry scanning discoverable and page scanning connectable processes Therefore the number of slots available for the A2DP link is too low and the audio stream is interrupted One workaround is to make the module neither discoverable nor connectable when in an A2DP connection using AT BTX It has been observed that sometimes only disabling either connectable or discoverable creates an interrupt free audio stream AT commands to achieve this are AT BTQ discoverable only and AT BTG connectable only 1 A different definition of the term Codec is an integrated circuit IC composed of ADC and or DAC combined with a sampling rate clock and anti aliasing filters This definition is referred to when talking about external audio codec or internal codec in terms of analogue to digital conversion or digital to analogue conversion of an audio stream Americas 1 800 492 2320 50 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module S308 provides an automatic workaround solution whenever entering an A2DP connection it disables connectable and discoverable mode like AT BTX Whenever exiting an A2DP connection connectable and discoverable states are restored according to the value of 512 Each action can be enabled disabled in 308 refer Table 3 1 2 6 3 18 A2DP streaming state
61. supported features S register 581 Subsequent AT amp W and ATZ is required to take effect If this bit is set at boot time the following actions are carried out automatically 1 The appropriate flag is set in the HF service record 2 The appropriate flag is set in the BRSF message on Service Level Connection establishment 3 The SLC message AT CLIP 1 is sent automatically once the SLC is established Response to action no 3 is indicated by either HF CLIP OK or HF CLIP ERROR after the CONNECT message Enable Call Waiting Notification CCWA 11_4 21 The CCWA feature is enabled by setting Bit 1 value 2 in S581 HF supported features Subsequent AT amp W and ATZ is required to take effect If this bit is set at boot time the following actions are carried out automatically 1 The appropriate flag is set in the HF service record 2 The appropriate flag is set in the BRSF message on Service Level Connection establishment 3 The SLC message AT CCWA 1 is sent automatically once the SLC is established Response to action no 3 is indicated by either HF CCWA OK or HF CCWA ERROR after the CONNECT message 2 6 6 1 12 Query subscriber number from HFG 20_4 30 AT HFS Query subscriber numbers from HFG AT CNUM is sent to the HFG HFG sends the subscriber number information indicated on the HF by HF CNUM On termination OK is sent by HFG which is indicated by HF
62. the most recent AT BTR command An error is returned if the RI modifier AND a Bluetooth address are specified For backward compatibility the following command fulfils the same purpose ATDR Response lt cr If gt CONNECT 123456789012 gt lt cr f gt Or lt cr If gt NO CARRIER lt cr f gt 2 6 2 6 AT SPH Drop SPP Connection Drop an existing SPP connection or reject an incoming connection indicated by unsolicited RING messages For backward compatibility the command ATH fulfils the same purpose Response lt cr lf gt NO CARRIER lt cr f gt 2 6 2 7 SPP Incoming Connections The module can be configured using AT BTP or AT BTG to scan for incoming connections from other Bluetooth devices It can also be configured via S512 to enter this mode by default on power up When the lower layers detect an SPP connection request a RING 123456789012 string is sent to the host every second The command ATA accepts the connection and ATH rejects the request On connection if the SO Register is gt 0 then confirmation to the host is in the form CONNECT 123456789012 1101 lt When S0 is 1 neither RING nor CONNECT is sent to the host and the connection is silently accepted If the S 100 register is non zero after ring indications are sent to the host and the host fails to accept or reject the connection an automatic hangup is executed 2 6 2 8 SPP Asynchronous Messages RING This string is sent to the host when a remote devic
63. www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module number_string calling or called line identification presentation string refer to HFG audio routing number_type number type for CLIP refer to HFG audio routing Response at the end of list lt cr lf gt OK lt cr lf gt 354 Enable disable verbose presentation of call records S register 354 controls verbose presentation of call records AT HFGC Value 0 non verbose mode default Value 1 verbose mode Verbose mode gives better understanding of call states and call records in a human readable style whereas non verbose mode is the preferred mode for a host microcontroller 2 6 6 2 18 Call status vs HFG status Table 2 33 maps the call states to HFG states For more information about HFG status refer to section HFG audio routing Table 2 33 Mapping of call status and HFG status incoming ringing 5 6 8 dialling 5 6 8 alerting 5 6 8 active waiting 5 6 8 alerting 3 4 8 held 3 8 2 6 6 2 19 Audio Gateway HFP Asynchronous Messages CONNECT lt bd_addr gt lt uuid gt lt dir gt A Service level connection to headset is established and initialized lt bd_addr lt uuid gt 111F if it is an incoming connection 111E if it is an outgoing connection gt Bluetooth address of headset device hex lt dir gt lt gt O optionally indicates the direction incoming outgoing
64. 078 Request rejected due to priority settings S355 079 Writing to modem control line is not permitted by GPIO S register 080 Attempting to write the pin state of a GPIO that is configured as input 081 Maximum size of EIR data exceeded ATI29 082 No CVC license key stored or more than 5 words invalid length ATI32 083 CVC security failed on loading CVC image for a SCO connection 084 087 firmware internal CVC error codes should not occur with released firmware 088 CVC SYSID request timeout Can occur on ATI35 if UART baud rate is too low 089 HF request to disable NREC in HFG failed because NREC feature is not supported by both ends Support for both ends can be checked with AT HFF NREC mask for HF 1 NREC mask for HFG 2 of AT HFN 090 CVC boot time check failed occurs if S318 gt 0 at boot time and selected CVC image does not have a valid license key 091 HF ERROR was received from the HFG on a DTMF request AT HFMi on UART AT VTS i on SLC 092 AT BTAx is not permitted in current state Occurs if one of HF HFG HS HSG and SPP is connected to one peer device A SCO audio link of HFP HSP has priority over SPP SCO so the BTM51x doesn t accept this command in this scenario 093 A2DP not in streaming state or not in A2DP sink role decoder The preconditions for AT APMx are to be in A2DP sink role S300 1 and in a streaming state 094 Command not supported by current A2DP decoder variant 095 DS
65. 1 2250 S register 511 defines the inquiry scan window in ms range is 11 2250 Page Scan Inquiry Scan Le Window 1 Window S509 i 8511 Page Scan Interval Inquiry Scan Interval Page Scan S S508 KN S510 Figure 2 37 Page and Inquiry Scan Intervals and Windows 2 9 11 Sniff mode Bluetooth connections are master slave in nature A master sends packets and a slave has to acknowledge that packet in the next timeslot Timeslots in Bluetooth are 625 microseconds wide This implies that a master always knows when packets are to be sent and received which further means it is able to optimise power usage by switching on power hungry circuitry only when needed A slave does not have prior knowledge of when a packet is to be received and assumes a packet is scheduled to arrive for each receive slot This means that it must sustain its receiving circuitry for most of the receive slot duration The result is high power consumption for the slave In general a slave draws about 5 times the current of a master This problem was identified very early in the evolution of Bluetooth especially since headsets are always slaves in a Bluetooth connection and it is solved with Sniff mode with appropriate lower layer negotiating protocol Americas 1 800 492 2320 154 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Sniff mode dur
66. 1 mode 340 0 3 default 0 1 LED_ON 2 LED_PWM 3 LED_PULSE Set LED 0 Duty Cycle 336 0 4095 default 2048 referenced if LED mode LED_PWM or Set LED 1 Duty Cycle 341 0 4095 default LED PULSE 2048 Set LED O PWM Period 337 0 15 default 0 referenced if LED mode LED_PWM Set LED 1 PWM Period 342 0 15 default O Set LED O Pulse Rate 338 0 15 default O referenced if LED mode LED_PULSE Set LED 1 Pulse Rate 343 0 15 default O 2 8 7 Hardware Units S Registers Table 3 43 provides an overview on S Registers for hardware units except GPIO For GPIO Registers refer to Table 3 47 Table 2 49 BTM5 1x S Registers for Hardware Units Enable asynchronous FS message presenting sampling frequency and audio interface aa l SS 0 Disable 1 Enable default A2DP audio interface select 5314 0 0 2 0 internal codec default 1 12S master 2 12S slave SCO audio interface select 0 internal codec default 315 0 0 3 1 12S master 2 12S slave 3 external PCM interface Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth 135 Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module 316 63 1 63 I2S sampling rate capability for A2DP values can be added for all sampling frequencies supported Register is referenced if S314 gt 0 at boot time requir
67. 2 2923 0610 www lairdtech conm bluetooth 44 Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module critical setting because the optimal setting cannot be verified by the module objectively Disconnect A B AT APH Response NO CARRIER 110D disconnection confirmed IOE CTS DSA DCD AI RTS DIR DREI CAPTURE Echo Clear Data Transfer Test Open com4 9600 N 8 1 CTS DSR DCD AI ATS DIpk DREI CAPTURE Echo Clear Data Transfer Test Open COM15 9600 N 8 1 ial es i Figure 2 14 A2DP Example 2 Preparation of Device B Source Americas 1 800 492 2320 45 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech conm bluetooth Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module mixi CTS DSR DCD RI RTS DTR BRK CAPTURE Echo Clear Data Transfer Test Open COM15 9600 N 8 1 AT APDOQ1EA4000004 PAIR Q016A4000004 20 CONNECT 001644000004 110D gt FS4410 INT APH NO CARRIER 110D Figure 2 15 A2DP Example 2 Initiate and Release Connection from Device B Source 51x CTS DSR DCD RI RTS DTRV DREI CAPTURES TC Echo Clear Data Transfer Test Open COM4 9600 N 8 1 PAIR 001644000003 00 CONNECT 001644000003 110D lt FS44100 INT NO CARRIER 110D Figure 2 16 A2DP Example 2 Accepting Connection and Volume Adjustment Device A Sink 2 6 3 3 Enable A2DP The advanced audio distrib
68. 2 6 6 1 2 Initiate audio connection from HF 3_ 4 11 AT HFA Initiates audio connection from local Hands free instance An existing service level connection is required Response Audio on lt cr f gt HF AU1 lt cr If gt 2 6 6 1 3 Release audio connection from HF 3_ 4 12 AT HFR Releases audio connection only The service level connection is retained Response Audio on lt cr f gt HF AUO lt cr If gt Americas 1 800 492 2320 83 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech con bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 6 6 1 4 Release entire connection from HF 1_4 3 AT HFH Releases connection from local Hands free instance Audio connection is released if existing SLC is released anyway Response On audio disconnection lt cr If gt HF AUO lt cr lf gt only if audio connection exists On SLC disconnection lt cr lf gt NO CARRIER 111E lt cr f gt 2 6 6 1 5 Answer incoming call from HF 4_4 13 AT HFCA Answers an incoming call ATA is sent to the AG In return the audio gateway updates its ClEV indicators call 1 and callsetup 0 and sends appropriate messages to the HF Upon receipt of a CIEV message HF notifies its host by a HFl lt indicator gt lt value gt message Refer to DTMF tone request 17_4 27 2 6 6 1 6 Reject incoming call from HF Terminate call from HF 5_4 14 6_4 15 AT HFCH Rejects incoming
69. 3 section 4 12 Table 2 29 Hands free Profile supported features on BTM5xx Americas 1 800 492 2320 81 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 1 Connection management M Yes M Yes 2 Phone status information M Yes M Yes ER Audio Connection handling M Yes M Yes 4 Accept an incoming voice call M Yes M Yes 5 Reject an incoming voice call M Yes O Yes 6 Terminate a call M Yes M Yes 7 Audio Connection transfer M Yes M Yes during an ongoing call 8 Place a call with a phone O Yes M Yes number supplied by the HF 9 Place a call using memory O Yes M Yes dialing 10 Place a call to the last number O Yes M Yes dialed 11 Call waiting notification O Yes M Yes 12 Three way calling O 2 O 2 13 Calling Line Identification CLI O Yes M Yes 14 Echo cancellation EC and noise O 5 O 5 reduction NR 15 Voice recognition activation O 5 O 5 16 Attach a Phone number to a O 5 O 5 voice tag 17 Ability to transmit DTMF codes O 5 M 4 18 Remote audio volume control O 1 O 1 19 Respond and Hold O 2 O 2 20 Subscriber Number Information O Yes M Yes 21a Enhanced Call Status O 2 M Yes 21b Enhanced Call Controls O 2 O 2 M mandatory O optional 1 support planned for future AT firmware release 2 support planned fo
70. 4 for output and ATI25 for input query the last gain settings used for an A2DP connection S register 356 restores of last SCO gain settings when entering a SCO connection S register 357 restores the last A2DP gain settings when entering an A2DP connection Refer to Table 3 1 for details Americas 1 800 492 2320 51 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 6 3 19 1 Issue workaround with Apple devices When initiating A2DP from BTM51x with AAC enabled to an iPhone we have observed regular short drops that can be resolved by changing the HCI role so that the iPhone becomes master of the link The setting to request slave role for BTM51x on each A2DP and AVRCP connection is ATS368 0180 AT amp W ATZ See AT SR lt role gt lt pm gt Setting HCI role master slave for more details on HCI roles 2 6 3 20 A2DP decoder post processing MusicManager As of firmware v18 1 4 0 all A2DP decoders SBC AAC APTX support DSP post processing to set up parametric equalizers 3D stereo enhancement compander BassBoost etc CSR s tool UniversalFrontEnd UFE Music Manager GUI allows to set parameters and hearing changes immediately It requires an SPI connection to BTM51x via CSR s USB SPI interface or LPT port interface as well as the correct version of UFE Music Manager Check ATI38 to find the correct version Figure 2
71. 40 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module For automatic mode or host less mode a new ACR is added as soon as a connection with a new device is established If the device is already known in the ACR table the appropriate ACR is updated if required e g profile flags On norma disconnect not link loss the ACR is deleted from the table to prevent automatic reconnection Only on link loss does the record remain in the table causing a reconnection when returning back into range Automatic host less mode is enabled by setting Bit2 of 370 No matter which option is selected for population the ACR table can be queried by ATI72 2 7 1 1 Auto connect record fields An auto connect record is composed of the following fields BdAddr Bluetooth device address of the remote device s ProfileMask Flags for all profiles to connect by this ACR multiple profiles allowed Interval Interval after which an attempt cycle is started if not all profiles are connected yet Status ACR status see ATI72 for definition s ProfileWMaskConnected Mask where only actually connected profiles are indicated OptionFlags Optional flags see ATI72 for definition Refer to the following sections for AT commands to modify the field values 2 7 1 2 AT AC Editing ACR scratch record manual mode Before an ACR is added to the ACR table non volatile memory it can be
72. 45 Command or operation not allowed 046 No A2DP role has been set see S register 300 047 No AVRCP role has been set see S register 301 048 No AVRCP category has been set see S register 302 049 No AVRCP control connection 050 No A2DP or AVRCP connection currently incoming 051 Invalid operation ID AVRCP 052 Wrong AVRCP role 053 Command disabled by S Register 310 054 No manufacturing information available 055 Audio resource error 056 Invalid UUID 057 Maximum gain level reached 058 Minimum gain level reached 059 Profile or role not enabled 060 Profile under construction 061 Unknown Headset command 062 Unknown Hands free command 063 Incorrect state Americas 1 800 492 2320 183 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech conm bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 064 Unknown DUN command 065 UART resource error 066 Index of subscriber number record too large 067 Maximum number of subscriber number records reached 068 No SLC exists for AT HFGBO 1 069 In band ringing was not enabled in HFG supported features S596 0x08 at boot time 070 Invalid number type must be in range 128 lt number type lt 175 071 Maximum number of calls reached 071 Call state issue 073 A second waiting call is not is not allowed 074 No call held 075 Invalid index lt idx gt 076 Memory allocation attempt was not successful 077 Incorrect A2DP state see ATI61
73. 5 can occupy up to three slots each They differ in the level of bit error checking It is recommended to enable all three packet types for eSCO links This passes the final decision down to the baseband eSCO packets involve a CRC code and retransmission of erroneous eSCO packets Packet types and link types SCO or eSCO are negotiated on link setup A BTM can accept either incoming SCO or eSCO links S register 584 but not both SCO and eSCO at one time If the initiating side requests an unsupported link type the audio link fails The initiating BTM module is supposed to request the remaining link type in that case Table 2 56 All AT commands and S Registers for SCO eSCO links Check link type of current SCO ATI37 0 unknown no SCO link connection SCO eSCO 1 SCO 2 eSCO Table 2 57 SCO eSCO AT commands and S Registers Initiate SCO link AT BTAx x packet type bitmask recommended 7 1 HV1 2 HV2 4 HV3 Initiate eSCO link AT BTA100x x packet type bitmask recommended 7 1 EV3 2 EV4 4 EV5 Release SCO eSCO link AT BTAO AT BTA Initiate SCO eSCO link AT BTA8 amp Link type SCO eSCO and packet types defined by S584 Americas 1 800 492 2320 144 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Enable either SCO or eSCO 584 0 1 0 SCO HV1 HV2 HV3 enabled for incoming requests and 1 e
74. 63 1 Audio link is to be initiated by AG Referred to as Audio Connection Transfer from AG to HS in HSPv1 2 Audio connected Audio link and ACL should be released by the AG actual ATI63 2 outcome depends on AG 2 6 5 1 3 Release connection from headset AT HSH Release connection from local Headset instance Audio connection is released if existing ACL is released regardless A connection release initiated by the Headset is not defined in the Headset Profile specification 4 A profile compliant disconnection is initiated from Headset by sending AT CKPD 200 use AT HSB to the audio gateway This command exists for the sake of completeness and is for testing purposes only Response On audio disconnection optional lt cr If gt HS AUO lt cr lf gt On ACL disconnection lt cr If gt NO CARRIER 1108 lt cr f gt 2 6 5 1 4 Headset status ATI63 Returns the status of the Headset HSP instance 0 not connected 1 ACL connected 2 Audio connected 2 6 5 1 5 Headset audio routing Audio in the headset profile is always referred to as a SCO connection for bidirectional speech transmission On a BTM5xx SCO audio is routed by default to the internal codec 315 selects the 12S interface in master or slave mode for SCO connections Refer to Americas 1 800 492 2320 ia Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetoot
75. 789012 110E gt lt cr If gt Or lt cr f gt NO CARRIER 110E lt cr lf gt Or lt cr If gt ERROR 47 lt cr lf gt Or lt cr If gt ERROR 48 lt cr lf gt After an AVRCP connection has been established the module remains in AT command mode S Register 531 is ignored for AVRCP connections Americas 1 800 492 2320 62 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 6 4 2 2 Release AVRCP control connection AT AVH Release AVRCP control connection Response lt cr lf gt NO CARRIER 110E lt cr f gt 2 6 4 3 AVRCP Control CT This section describes AT Commands and S registers relevant to the BTM5xx as an AVRCP Controller S301 1 2 6 4 3 1 Send UNIT INFO Request AT AVU Send a Unit Info request to a connected AVRCP target Response immediately lt cr lf gt OK lt cr If gt On command completion lt cr lf gt AVUR lt n gt lt unit_id gt lt unit_type gt lt company_id gt lt cr lf gt lt n gt status O success 1 fail 4 timeout For unit_type see Table 2 22 If lt n gt is greater than zero unsuccessful outcome lt unit_type sent Examples of unsuccessful responses are lt cr If gt AVUR 1 lt cr lf gt or lt cr If gt AVUR 4 lt cr lf gt gt and lt company_id gt is not hex hex 2 6 4 3 2 Send SUBUNIT INFO Request incomplete AT AVS lt page gt Send a Subunit
76. 8 S670 007B 0 ff GPIO Read Write all GPIOs in one atomic step Write operation only affects GPIOs configured as outputs 0x0001 GPIO1 0x0002 GPIO2 0x0004 GPIO3 0x0008 GPIO4 0x0010 GPIO5 0x0020 GPIO6 0x0040 GPIO7 0x0080 GPIO8 S689 0 450 Audio Set output overall gain dBr See Gain Table value must be 215 entered and is returned multiplied by 10 589 is also affected S690 0 450 Audio Set input overall gain dBr See Gain Table value must be 215 entered and is returned multiplied by 10 S590 is also affected 1001 to 0 0 2432 ma Ten General Purpose 32 bit Registers for use by host These 1010 are stored in non volatile memory 3 2 ATI Commands The following table lists all ATIn parameters supported by the modules ATI commands provide general information about the modules and status information Table 3 2 BTM ATI Commands ATIO The product name variant ATI The CSR firmware build number ATl2 The AT firmware build number For internal use only ATI3 The AT firmware revision ATl4 A 12 digit hexadecimal number corresponding to the Bluetooth address of the module ATI5 The manufacturer of this device Americas 1 800 492 2320 177 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech conm bluetooth BTM510 511 User Guide Bluetooth Multimedia Module ATI6 The maximum size of trusted device database All7 The manufacturer of the Bluetooth chipset ATI8 The
77. 8 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 7 4 2 Status priority The need for simplification also requires definition of a priority scheme The following illustrates the states we want to indicate over time for a typical use case status AudioOn Connected Scanning time other profiles scan status may connect may change or disconnect at any time at any time Figure 2 28 Connection States At first the module is scanning meaning it is discoverable and or connectable A fast blinking LED is often used to indicate this status Then a connection is established for example an A2DP link initiated from a smartphone This status is often indicated by a pulsing LED or flashing at long intervals Later on the user starts audio streaming by playing music from the smartphone This could be indicated by an LED which is permanently on Now while streaming audio AudioOn state another profile could connect or disconnect or the scanning status could change While audio is still on we don t want to indicate the new Connected blink pattern neither a new scanning state blink pattern Instead it is preferred to stick to indication of the AudioOn state as long as this state is true From this reasoning we derive the priority rule in the timeline of a usage scenario the innermost state has the highest priority the
78. 9 and 590 S690 are not affected by increment decrement commands Instead the current gain level is cached and can be retrieved by AT G I O There are two further commands to restore the cached gain level from 589 S590 They are AT G I O R and AT G I O S The latter saves the currently cached gain level to 589 S590 Output Amplifier O Digital Circuitry Output Amplifier d Figure 2 29 BTM51x Stereo Audio Codec Block Diagram Table 2 40 BTM51x Gain Table 22 21 5 7 7 21 18 0 6 7 20 15 5 5 7 19 12 0 4 7 18 9 5 3 7 Americas 1 800 492 2320 123 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech conm bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 17 6 0 2 7 16 3 5 1 7 15 0 0 7 14 3 0 0 6 13 6 0 0 5 12 9 0 0 4 11 12 0 0 3 10 15 0 0 2 9 18 0 0 1 8 21 0 0 0 7 23 5 15 0 6 27 0 14 0 5 29 5 13 0 4 33 0 12 0 3 35 5 11 0 2 39 0 10 0 1 41 5 9 0 0 45 0 8 0 Table 2 41 BTM5 1x Gain Settings AT commands and S Registers Set output gain level 589 0 22 See Gain Table S689 is also affected default 15 Set output overall gain dBr S689 450 215 See GainTable value must be entered default 0 and is returned multiplied by 10 S589 is also affected Set input gain level 590 0 22 See Gain Table S690 is also affected default 15 Set input overall gain dBr S690 450 215 See GainTable value must be entered d
79. A iojxi CTS DSA DCD RI RTS DTRV DREI CAPTURE Echo Clear Data Transfer Test Open COM30 9600 N 8 1 2 A e OOFrOrorore AOA AKAAKA ve j Kal 14 1644000002 Figure 2 4 SPP example Preparation of Device B ioii CTS DSR DCO RI RTSY DTR DREI CAPTURE Echo Clear Data Transfer Test Open COM24 9600 N 8 1 AT SPDO016A4000002 PAIR 001644000002 20 CONNECT 001644000002 1101 gt 67690 AT SPH NO CARRIER 1101 Figure 2 5 SPP example Device A initiate connection receiving data command mode disconnect Americas 1 800 492 2320 36 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech conm bluetooth BTM510 511 User Guide Bluetooth Multimedia Module iojxi CTS DSR DCD AI RTSY DTRV DREI CAPTURE Echo Clear Data Transfer Test Open COM30 9600 N 8 1 PAIR 001644000001 20 RING 016A4000001 1101 CONNECT 001644000001 1101 lt 1234544 Te CARRIER 1101 Figure 2 6 SPP example Device B incoming connection receiving data disconnection 2 6 2 2 ATA Accept incoming SPP connection request Accept an incoming connection which is indicated by the unsolicited string lt cr lf gt RING 123456789012 lt cr If gt every second 123456789012 is the Bluetooth address of the connecting device Response lt cr If gt CONNECT 123456789012 1101 lt lt cr f gt 2 6 2 3 AT SPD lt bd_addr gt Make Outgoing SPP Connection Initiate a SPP
80. AT DUD lt BdAddr gt Americas 1 800 492 2320 147 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 9 4 3 Automatic storage of link keys Four S Registers define the automatic storage of link keys in the trusted device list depending on incoming outgoing and general dedicated bonding See Table 2 58 Automatic storage of link keys Table 2 58 Automatic storage of link keys Automatic link key storage on 325 0 1 0 do not store cache only dedicated bonding outgoing DBO 1 store automatically default identical with 538 Automatic link key storage on 326 0 1 0 do not store cache only general bonding outgoing GBO 1 store automatically default Automatic link key storage on 327 0 1 0 do not store cache only dedicated bonding incoming DBI 1 store automatically default Automatic link key storage on 328 0 1 0 do not store cache only general bonding incoming GBI 1 store automatically default 2 9 5 Profile Connection Status The connection status of a profile can be queried by an ATI Command This might be helpful in order to decide whether to disconnect all connected profiles via ATH or a specific one For details see Table 3 52 Table 2 59 Profile connection status Get connection status ATI60 0 not connected of SPP 1 connected local command mode 2 connected remo
81. BTM5xx Version 1 2 of the Headset Profile specification is supported In most cases it is preferable to use the more advanced Hands Free Profile HFP HSP defines the role of the headset HS and the role of the audio gateway AG which are both supported on BTM5xx They are enabled by setting the appropriate flag in S Register 102 plus subsequent AT amp W and atz An HSP connection has two states ACL connected or audio connected The ACL is initiated by either HS or AG The audio connection a SCO link is always initiated and released by the AG A host processor is required using AT commands to control the BTM5xx module hosted operation mode An AT command beginning with AT HS indicates affiliation to the Headset role of HSP An AT command beginning with AT HSG indicates affiliation to the Audio Gateway role of HSP Table 2 25 Headset Profile supported features on BTM5xx 1 Incoming audio connection M Yes M Yes 2 Outgoing audio connection M Yes O Yes 3 Audio connection transfer M Yes M Yes Americas 1 800 492 2320 DW Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech con bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 4 Remote audio volume control O 1 O 1 M mandatory O optional 1 Supported planned for future firmware release 2 6 5 1 Headset role HS Headset role is activated by setting flag 0x02 in S102 plus AT amp W foll
82. CD 8 11 specifies the source for RI Each nibble can take the following value 0 Do NOT touch the I O configure DCD or RI as input at boot time 1 Always deassert 2 Always assert 3 If RTC bit in CONTROL_IND is 1 then assert otherwise deassert 4 If RTR bit in CONTROL_IND is 1 then assert otherwise deassert Americas 1 800 492 2320 173 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech conm bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 5 If DV bit in CONTROL_IND is 1 then assert otherwise deassert 6 If IC bit in CONTROL_IND is 1 then assert otherwise deassert If this register is changed while in command and connected mode then on going back online using the ATO command the modem output lines are refreshed 553 0201 A0 Amt n a This register specifies in each 4 bit nibble how the DTR DCD and RI output pins are controlled when NOT in a Bluetooth connection Nibble 0 3 specifies the source for DTR 4 7 specifies the source for DCD 8 11 specifies the source for RI In addition it also refers to S Register 552 to see if the relevant pin is an input or not to be touched If the nibble in 552 is 0 then the relevant pin is an input Each nibble can take the following value 0 Always deassert 1 Always assert 2 Assert if RING is being sent to the host S554 0 0 900 n a Post Reset Window If S Register 512 gt 2 and lt 7 then this regis
83. CD RI RTSY DTRM DREI CAPIUREIT Echo Clear Data Transfer Test Open DEER i com4 9600 N 8 1 J E E FE La OK AT AVDQQ1E37FA2346 PAIR Q 1E37FA2346 00 E ANECT Q 01E37FA2346 110E Figure 2 21 AVRCP Example 1 BTM5xx Preparation and Connection Setup Americas 1 800 492 2320 61 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech con bluetooth Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module F Ezurio Terminal ver 6 7 2 i D ES CTS DSR DCD RI RTS DTR BRK CAPTURES Echo Clear Data Transfer Test Open com4 9600 N 8 1 AT AVC44 OK AVPTC 44 AVPTC 44 1 AT AVC46 OK AVPTC 46 AVPTC 46 1 AT NO CARRIER 11 E Figure 2 22 AVRCP Example 1 BTM5xx Sending Commands and Connection Release Bluetooth 4 Manager Bluetooth 4 Manager Bluetooth 4 Manager i Play i pause D Stop Figure 2 23 AVRCP Example 1 Incoming AVRCP commands top right corner of screen 2 6 4 2 AVRCP Control CT and Target TG This section describes AT Commands and S registers which are common to the BTM5xx AVRCP Controller and AVRCP Target roles 2 6 4 2 1 Initiate AVRCP connection AT AVD lt bd_addr Initiate AVRCP control connection to Bluetooth address lt bd_addr gt The module must be configured as AVRCP Control by S register 301 1 Furthermore a category must be selected in S register 302 Response lt cr If gt CONNECT 123456
84. ER messages The logically correct UUID for the HS role would be 0x1131 When using the AT BTIV lt BdAddr gt UUID to query UUIDs of a remote device in order to determine supported profile and roles the user must be aware of the circumstances described here E g do not assume the remote device supports the headset role if UUID 0x1108 is found in the service records Check for UUID 0x1112 2 9 10 Page Scan Inquiry Scan Interval and Window Page scanning means the module is connectable Inquiry scanning means the module is discoverable With the following S registers the power consumption of the BTM can be influenced at the cost of longer connection establishment time and longer time until a BTM is discovered The page scan window defines the time for the module to look out for incoming connection requests paging The inquiry scan window defines the time for the module to look out for incoming inquiry requests device discovery If the module is both connectable and discoverable 512 4 or AT BTP issued it mutually performs page scanning and inquiry scanning as shown in Figure 2 37 If connectable only the module performs page scanning only repeatedly and if discoverable only then the module performs page scanning only S register 508 defines the page scan interval in ms range is 11 2250 S register 509 defines the page scan window in ms range is 11 2250 S register 510 defines the inquiry scan interval in ms range is 1
85. ERROR is sent to HF 2 6 6 2 12 Change In band ring tone setting when SLC exists 4_4 13 4 AT HFGBO AT HFGB1 As a prerequisite for this command the in band ring flag 0x08 must have been set in S596 HFG supported features at boot time and a service level connection to the HF shall be established Use AT HFGBO to indicate to the HF that the HFG will not provide in band ring tones subsequently BSIR 0 is sent over the SLC Use AT HFGB1 to indicate to the HF that the HFG will provide in band ring tones subsequently BSIR 1 is sent over the SLC The BTM module does not create ring tones The actual ringtone signal must be provided by an external circuit and injected to the analogue audio input port of the BTM module Response lt cr lf gt OK lt cr lf gt Or lt cr If gt ERROR 68 lt cr f gt If no SLC present Or lt cr If gt ERROR 69 lt cr f gt If in band ring flag was not set in the HFG supported features S596 at boot time Americas 1 800 492 2320 98 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 6 6 2 13 Subscriber number records CNUM 20_4 30 AT HFGS lt number_string gt lt type gt lt service gt This command adds a subscriber number record to the HFG The subscriber number is the telephone number of the HFG It may have more than one subscriber numbers All subscriber num
86. Error Codes 0 disable 1 enable 335 0 0 3 LED LED O mode O LED_OFF 1 LED_ON 2 LED_PWM 3 LED_PULSE S336 2048 0 4095 LED LED O Duty Cycle referenced in LED mode LED_PWM or LED_PULSE 337 0 0 15 LED LED O PWM Period referenced in LED mode LED_PWM 338 5 0 15 LED LED O Pulse Rate referenced in LED mode LED_PULSE 340 0 0 3 LED LED 1 mode see 335 341 2048 0 4095 LED LED 1 Duty Cycle see 336 342 0 0 15 LED LED 1 PWM Period see 337 343 5 0 15 LED LED 1 Pulse Rate see 338 S345 1 0 3 HSG Enable automatic alerting on ACL establishment 0 disable auto alerting 1 auto alerting on outgoing ACL established 2 auto alerting on incoming ACL established 3 auto alerting on outgoing and incoming ACL established S346 0 0 1 HSG Enable in band ringing 0 disable 1 enable S347 0 0 1 HSG Enable automatic ACL release 0 disable 1 ACL is released automatically when audio is released by the HS 354 0 0 1 HFG Enable disable verbose mode for call record presentation D non verbose mode for AT HFGC default 1 verbose mode for AT HFGC S355 1 0 3 A2DP HF Configure audio resource override P HSP 0 no override allowed 1 incoming outgoing SCO request is accepted while A2DP is streaming The module initiates A2DP suspend automatically default 2 incoming outgoing A2DP start resume request is accepted while SCO is active The module releases the SCO link automatically 3 both 1 and 2 enabled Refe
87. Even For the Go blue Activator variant of the module this register is read only See S Register 526 for further information 525 0 0 1 n a Apply multiplier of 8 to baud rate internally This is set to 0 disabled by default If S Register 521 gt 115200 then this register cannot be set to 1 See S Register 526 for further information S526 3 1 3 n a This register specifies a 2 bit mask used to qualify how S Registers 520 to 525 are actioned If bit O is 1 the new communication parameters affect the UART immediately If bit 1 is 1 the new communication parameters are stored in non volatile memory So for example to change communication parameters but have them come into effect only after subsequent power cycles then this register should be set to 2 and likewise to affect immediately and yet not have it persist over a power cycle the value should be set to 1 Must be set before the baud rate change 530 1000 100 n a Reconnect delay when configured as master in 15000 pure cable replacement mode This value is rounded down to the nearest 100ms See S Register 505 also 531 0 0 4 n a On SPP connect mode specifies the mode on SPP connection establishment 0 Normal that data is exchanged between UART and RF 1 LOCAL_COMMAND UART input is parsed by the AT interpreter and RF data is discarded 2 REMOTE_COMMAND RF input is parsed by the AT interpreter and UART data is discarded If S Register 536 is not 1
88. Example for host less operation cccccccceeeecceeeeeeeeeeeeeeeceeeeceeeeeeeeeseeeeseeeeeeesieeeneeens 115 2 8 Hardware Units BTM510 ZEIT 115 2 8 1 Analogue Audio Interface essiri aeia haet Ea ai eaa 115 2 8 2 Digital Audio Interface cccceecccccececeeceeeeeeeeeeeeeeeeeeeeeceeecuseeeeeeeeteeeteeeneeetieeesieeees 118 2 8 3 Audio Ro ting options f r SCO EE 124 2 8 4 SCO input output Channel irainetan aeai innne ENEE ed 125 2 8 5 Audio Meet ele STEE 126 29 60 TED E ie e 126 2 8 7 Hardware Units S Register 127 2 8 8 GPIO General Purpose Input Output 0 eee eee eeeeeeeeeeeteeeeeeeeeteeeeteeeteeeteeeneeens 129 229 IMISCCIAMCOUS aiina deeg eenegen 135 2 9 1 Noise Reduction and Echo Cancellation CH 135 Ke EE Elle D BI 136 2 9 3 Cable replacements secsi aaa E a oesiadebe EES 137 2 9 4 Link Key Management 139 2 9 5 Profile Connection Status ieiunia ia hi east etcetera 140 2 9 6 Disconnecting Profiles 141 2 9 7 Legacy Response Format DISM2 142 2 9 8 UUIDs in CONNECT NO CARRIER messages 143 2 9 9 UUIDS in Service records Of HSP arriscaria e iiia 144 2 9 10 Page Scan Inquiry Scan Interval and WINdoOW 0 cccccseeeeeeeeeceeeeeeeeteeteteeeentteeenes 145 291I SITE MOG EE 145 2 9 12 Maximum RF Tx Power Level 146 2 91 1 3 ManutactUring INTO SMIN EE 146 2 9 14 Bluetooth version 146 Eeer Ee eet 147 2 9 16 Factory Default UART Baud Rate cccccccceccceceeeececeeeeeeteeeeeeeeteeeen
89. GS This command returns a list of currently available subscriber number records which are sent to the HF unit via AT CNUM issued by HF on the SLC Response For each subscriber number record if at least one is available lt cr gt lt lf gt lt index gt lt number_string gt lt type gt lt service gt And finally lt cr gt lt lf gt OK lt cr gt lt lf gt command finished With lt index gt current index of the record required as parameter n for AT HFGSD lt n gt lt number_string gt subscriber number string lt type gt specifies the format of lt number_string gt Refer to AT HFGS above Americas 1 800 492 2320 99 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module lt service gt service of this subscriber number 4 voice 5 fax AT HFGSD Delete all subscriber number records in the HFG Response lt cr gt lt lf gt 0K lt cr gt lt lf gt AT HFGSD lt n gt Delete subscriber number record with index lt n gt in the HFG lt n gt refers to the index that is displayed on HFGS The value of lt n gt is assumed to be one digit The index is not fixed to a record If there are higher numbered indexes than the one deleted the remaining records get a new index assigned dynamically on HFGS Response f lt cr gt lt lf gt 0K lt cr gt lt lf gt Or lt cr gt
90. IR data AT BTEW e Save S Registers AT amp W 2 9 22 4 Strategy to prevent persistent store write errors If an application makes extensive use of persistent store PS operations then the PS consumption of the application should be considered and evaluated AT NVQ helps to analyse the consumption of each relevant operation by querying the free space before and after It also helps monitor the free space over a longer application period by polling the NVQ value regularly This should give an idea on the persistent store consumption of an application Persistent memory is automatically defragmented on a reset if the NVQ value is less than 300 Although this seems to work well an additional AT NVF is always recommended before a reset for the purpose of defragmentation as a precaution To prevent write operation errors e g ERROR 011 or ERROR 102 Laird recommends you first analyse the persistent store consumption of the application If in the course of the application it is likely that no reset will occur over long time and that the NVQ value will decrement down to a critical level then the host controller should foresee flooding AT NVF and reset ATZ in situations where it doesn t interfere e g no connection and when the NVQ value is getting too low 2 9 22 5 374 Host less operation In a hostless operation scenario no host controller is available which can monitor the NVQ value and reset the module if needed In addition with au
91. If no profile connected response is 0 zero ATI56 print local HCI role for connected profiles Response one line for per profile lt profile_Mask 4 pex gigis gt M if master lt profile_mMask 4 pex aigis gt S if slave Example 0001 M master in the link with device of SPP device B 0080 S slave in the link with device of A2DP device C 0100 S slave in the link with device of AVRCP device C If no profile connected response is O zero 2 9 22 Management of persistent store Extensive use of the persistent store non volatile memory can lead some AT commands or functions to unsuccessfully finish and causing an error message This section explains the background of persistent store and suggests strategies to avoid these scenarios 2 9 22 1 Persistent store characteristic The persistent store of BTM51x is made of flash memory which has the typical characteristic that a single bit can be written only once For deletion of data a larger area a so called segment must be deleted in common This means that all data of the segment would be lost So in order to delete a small amount of data but retaining all other data of the segment the data to be deleted is not actually deleted but is invalidated by internal flash memory pointers Similarly overwriting does not actually delete old data but stores the new data in the remaining space of the segment and declares the old location invalid by pointing to the new
92. Laird gt BTM510 511 MULTIMEDIA MODULE User Manual Version 6 3 global local Americas 1 800 492 2320 Europe 44 1628 858 940 Hong Kong 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module REVISION HISTORY 1 0 3 01 2012 Initial Release 2 0 3 30 2012 Updates and correct to firmware 3 0 4 13 2012 v18 1 3 0 General reformatting edits 4 0 10 16 2012 Fixed Search bug Fixed general formatting and hyperlink issues 5 0 1 10 2013 Update FCC and IC statements Updated mechanical drawings 6 0 3 22 2013 Updated document for new firmware v18 1 4 0 BTM51x 08 6 1 13 Jan 2014 Separated document into two documents Hardware Integration Guide and User Guide 6 2 25 Feb 2014 Removed references to BTM52x 6 3 09 Dec 2014 PSKEY_PCM_CONFIG32 updated to PSKEY_DIGITAL_AUDIO_CONFIG Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth 2 Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module CONTENTS REVISION Histon AEE A 2 COMMONS is eege i EERSTEN NEO 3 d EIERE Ee 6 OAL ES veg sant tans ceuhitantaptevbeisbadatdapie Me hbedestecpe ehag dil aaitasteaslsaash Guastonamendut ited tne eehd dna a EA 6 Applcation Aregs e eeree 6 2 AT Command EE 7 ZA y SEO CUCU OM sc cece ee 7 22 Glossary OF Le EE 7 2 3 Overview of the BTM product Tam 8 ZA BUM ERAN Command EE 9 ZA ASSUMPTIONS i ee EE ere 9 242 C
93. M510 511 User Guide Bluetooth Multimedia Module 558 0 0 1 n a When 1 RING NO CARRIER and CONNECT responses are replaced by BTIN BTDOWN and BTUP respectively This eliminates ambiguity when the module is connected to an AT modem which also gives these responses S559 4 0 7 n a This specifies a mask When Bit 0 is 1 the response word ERROR is replaced by BTERR and OK is replaced by ok When Bit 1 is 1 error responses do not include the error number and instead the error number can be retrieved using ATI12 As of firmware v18 1 4 0 when Bit 2 0x04 is set three digit error code presentation is enabled which is the new default setting S560 15 15 120 n a Disconnect timeout in seconds This timer specifies how long to wait for confirmation from the peer device and or the underlying stack that the connection has been successfully torn down In the event that a confirmation never arrives this timer closes off the procedure and puts the machine back into a proper mode for new operations Time is specified with 15 seconds intervals 561 0 0 1000 n a Sniff Attempt Time in units of milliseconds O means disable See Sniff mode and Figure 2 38 S562 0 0 1000 n a Sniff Timeout Time in units of milliseconds 0 means disable See Sniff mode and Figure 2 38 S563 0 0 1000 n a Sniff Minimum Interval in units of milliseconds 0 means disable
94. M510 511 User Guide Bluetooth Multimedia Module 1 Display yes no The device can display or communicate a 6 digit decimal number and has a mechanism whereby the user can indicate either yes or no e g pressing a single Yes button before a timer expires or two buttons for Yes and No 2 Keyboard only The device has a numeric keyboard that can input numbers 0 through 9 and a confirmation The device has at least two buttons that can be easily mapped to yes and no or a mechanism whereby the user can indicate either yes or no e g pressing a button within a certain time limit 3 No input no The device does not have the ability to indicate yes or no and the device output cannot display or communicate a 6 digit decimal number 4 Reject O Cap O capability requests prior to SSP are rejected requests 2 5 6 3 Force Man in the middle protection MITM 322 322 can enable protection against MITM attacks This S Register only applies if the security level S320 is less than 3 For security level S320 3 MITM protection is always enabled and this S 322 is ignored A new value written to 322 applies immediately No power cycle is required A link key created with MITM protection is named authenticated link key A link key created without MITM protection is named unauthenticated link key 2 5 6 4 Disable Legacy Pairing 323 If the remote device is a leg
95. Manager File Action View Help e m Erea Gas wa 4 DYD CD ROM drives ba Human Interface Devices IDE ATA ATAPI controllers Sa IEEE 1394 Bus host controllers gt Keyboards Wei Mice and other pointing devices i Modems Monitors S Network adapters PCMCIA adapters 7 Ports COM amp LPT g Processors Ze Smart card readers fT BA CECR EE EC CCRN e Audio Device gt D Legacy Audio Drivers Legacy Video Capture Devices b Media Control Devices b SigmaTel High Definition Audio CODEC EI Video Codecs System devices Universal Serial Bus controllers Figure 2 12 A2DP example 1 New Bluetooth Audio Device in the Device Manager Americas 1 800 492 2320 43 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module 2 6 3 2 A2DP Example 2 This section gives an example of an A2DP connection between a Laird BTM5xx device A as Audio Sink wireless speaker wireless headphones and another Laird BTM5xx device B as Audio source Both BTM5xx devices are assumed to be connected via UART to a terminal program e g Ezurio Terminal on a PC The required instructions along with the sequence of AT commands are listed in Table 2 14 Figure 2 13 through Figure 2 16 show appropriate screenshots Table 2 14 A2DP Example 2 Command Sequence and Instructions Pre
96. N negative confirmation or cancellation of pairing request 0x10 Cancel inquiry Allows immediate cancellation of a running inquiry by GPIO button 0x11 Enter discoverable connectable state A time window can be set by 371 in seconds Refer to section 2 7 4 7 1 currently v18 1 4 0 not available reserved for future Table 2 55 BTM51x GPIO Function Mapping Codes Output 0x00 Cable Replacement RX Cable replacement via SPP data 0x01 RFC_RTC_RX Cable replacement via RFC control signals 0x02 RFC_RTR_RX Cable replacement via RFC control signals 0x03 RFC_IC_RX Cable replacement via RFC control signals 0x04 RFC_DV_RX Cable replacement via RFC control signals 0x05 Audio On Active whenever the audio circuit is enabled 0x06 Connected Active whenever at least one profile is connected 1 currently v18 1 4 0 not available reserved for future 2 9 Miscellaneous 2 9 1 Noise Reduction and Echo Cancellation CVC Clear Voice Capture CVC is a technology provided by Cambridge Silicon Radio CSR which utilises the BCO5 internal DSP in order to improve the audio quality of SCO links speech This includes noise reduction and echo cancellation CVC is supported by BTM5xx from firmware version 18 1 2 3 onwards CSR provide different CVC images for different usage scenarios which are incorporated in the firmware Headset 1 microphone Headset 2 microphones Hands free
97. NT The internal codec is configured with a sampling frequency of 44100 Hz FS44100 I2S_M The 2S bus is configured as 12S master with a sampling frequency of 44100 Hz FS44100 I2S_S The 12S bus is configured as 12S slave with a sampling frequency of 44100 Hz APSUS lt Transition to A2DP suspended state initiated by remote device incoming APSUS gt Transition to A2DP suspended state initiated by local device outgoing APSTR lt Transition to A2DP streaming state initiated by remote device incoming APSTR gt Transition to A2DP streaming state initiated by local device outgoing NO CARRIER 110D An existing A2DP connection has been terminated or an A2DP connection attempt has failed Table 2 17 A2DP S Registers and AT Commands Enable A2DP profile S102 128 A2DP Error 46 if A2DP role has not been set see S300 Needs subsequent AT amp W and ATZ to become effective Set A2DP role 300 0 2 O feature not set 1 A2DP Sink default 2 A2DP Source Needs subsequent AT amp W and ATZ to become effective Americas 1 800 492 2320 54 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Initiate outgoing A2DP connection AT APD lt bd_addr gt Response if accepted CONNECT 0123456789012 110D gt Response if rejected NO CARRIER 110D close only A2DP AT APH or Response
98. O CARRIER messages as well 2 6 6 2 20 AG HFP summary HFG Table 2 34 AG HFP HFG Summary of S Registers and AT Commands Enable HFP AG role 102 0x40 AG role of HFP bitmask needs subsequent AT amp W and ATZ to activate Initiate SLC from HFG AT HFGD lt bd_addr _ gt hex Responses Successful CONNECT 123456789012 111F gt failed NO CARRIER profile disabled ERROR 59 incorrect state ERROR 63 Initiate audio connection AT HFGA Response from AG Transfer HFG AU Audio from AG to HF ERROR 63 is returned if this command is used during call setup incoming dialling alerting Release audio only from AT HFGR Response AG Transfer Audio HFG AUO from HF to AG ERROR 63 is returned if this command is used during call setup incoming dialling alerting Disconnect SLC from HFG and audio if exists AT HFGH ATH111F ATH See sections 2 9 6 and 2 9 8 ERROR 63 is returned if this command is used during call setup incoming dialling alerting Signal incoming call to HF AT HFGC lt number_string gt lt type gt Sends RING and CLIP lt number_string gt lt type gt to HF lt type gt must be in range 128 175 Refer to 2 6 6 2 5 Signal incoming call answered at HFG to HF AT HFGCA Sends ClEV 2 1 call 1 and CIEV 3 0 callsetup 0 over SLC Refer to section 0
99. P are asynchronous profiles A2DP and AVRCP are treated as synchronous profiles because only one profile instance with one role selected can be initialised currently Therefore a common UUID is used indicating the profile only but not the role In a message CONNECT lt bd_addr gt lt UUID gt UUID is the profile role the connection is made to Hence for an outgoing connection UUID indicates the remote device s profile role If it is an incoming connection UUID indicates the local device s profile role UUID Hence role indicating UUIDs presented in a CONNECT message are equal on both ends of a connected pair In a message NO CARRIER lt UUID gt UUID represents the local profile role UUID Hence for an asynchronous profile role indicating UUIDs differ on both ends of a previously connected pair Table 3 56 provides an overview of currently used UUIDs on BTM devices Table 2 63 UUIDs used in BTM5xx CONNECT NO CARRIER messages 1101 SPP No Synchronous profile 1108 1 HSP HS Yes Headset role Headset profile 110D A2DP No Common UUID for source and sink role 110E AVRCP No Common UUID for controller and target role 1112 HSP AG Yes Audio gateway role Headset profile 111E HFP HF Yes Hands free role Hands free profile 111F HFP AG Yes Audio gateway role Hands free profile There is an option to append a direction indicator to a connect message This enables the host to distingui
100. P plugin doesn t support query mode 096 DSP busy 097 Profile is busy with a current request 099 Real error code is greater than 99 query ATI12 to obtain the detailed error code Americas 1 800 492 2320 184 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech conm bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 100 ACR table not available in RAM 101 ACR a record for the same BdAdadr already exists in persistent store and at least one flag of that record s profile mask overlaps with the profile mask of the scratch record 102 ACR write to persistent store was not successful 103 ACR the history index passed doesn t exist 104 ACR is invalid e g BdAddr 000000000000 or profile mask 0 105 AC service stopped by safety timeout in status attempt 106 ACR table empty AC service not started 107 AC service must be stopped for modification of ACR table 108 Missing profile mask in 102 at least one profile flag contained in the ACR table is not set in 102 109 Command not allowed when AC service is running Stop service to enable full parser 110 ACS precondition failed module is discoverable and or connectable 111 ACS precondition failed inquiry in progress 112 ACS precondition failed pairing in progress 113 ACS precondition failed legacy SPP auto connect AT BTR is enabled 114 ACR option flags wrong 115 Tuple length doesn t ma
101. R RTC DV IC This register specifies in each 4 bit nibble how the outgoing modem status bits to the remote peer gets its value Nibble 0 3 specifies the source for RTC i e DSR DTR 4 7 specifies the source for RTR i e RTS CTS 8 11 specifies the source for DV i e DCD 12 15 specifies the source for IC i e RI Each nibble can take the following value 0 Always set to 0 1 Always set to 1 2 If DCD is output then always 1 If DCD is input S552 then follow DCD 1 if DCD is asserted otherwise O 3 If RI is output then always O If RI is input S552 then follow RI 1 if RI is asserted otherwise 0 4 If DSR is asserted then 1 otherwise O In the event that a nibble specifies DSR as the source of its state be aware that if S Register 507 is anything other than O a de assertion of DSR causes the Bluetooth connection to be dropped If bits 0 3 and 4 7 are set to 0 then some Bluetooth devices may use that as a signal to stop sending any data For example Nokia 6310 stops responding If this register is changed while in command and connected mode then on going back online using the ATO command a fresh signal is sent to the peer to update the bits 552 0122 0 fff n a This register specifies in each 4 bit nibble how the DTR DCD and RI output pins are controlled by RFCOMM control bits RTC RTR DV IC when in a Bluetooth connection Nibble 0 3 specifies the source for DTR 4 7 specifies the source for D
102. R 65 lt cr If gt After a DUN connection is established the module changes its mode to the mode defined by S Register 531 The recommended value is the default 531 0 for a DUN connection Before initiating a DUN connection S507 must be set to 2 ats507 2 This causes the module to escape connected mode into command mode by toggling DSR line only An escape sequence of 444 is not compliant with the DUN specification S507 2 also configures the module for high data throughput Once the Bluetooth connection is established all data arriving at the UART is transferred to the gateway hence any AT commands are transferred directly to the gateway Now the host can for example dial in to the internet provider by ATD123456 as if directly connected to a serial modem 2 6 7 2 1 Release DUN connection AT DUH The module must be in command mode so that AT commands may be parsed If the module is in data mode 531 0 S507 2 toggle DSR line to change into command mode lt cr gt lt lf gt OK lt cr gt lt lf gt is sent to the host to confirm that that module is in command mode Toggling DSR means to de assert deactivate and assert activate the DSR line within a time specified by 519 which is 500 ms per default Hence DSR must be asserted at the time of AT DUD lt BdAdds gt if data mode with 531 0 and 507 2 or S507 1 is configured Americas 1 800 492 2320 108 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www l
103. S Register Value This returns the current value of register n For recognised values of n Response lt cr f gt As Appropriate lt cr f gt OK lt cr f gt For unrecognised values of n Response lt cr lf gt ERROR nn lt cr lf gt 2 5 2 3 ATSn Read S Register Valid Range This returns the valid range of values for register n For recognised values of n Americas 1 800 492 2320 13 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech con bluetooth Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module Response lt cr lf gt Sn nnnn mmmm lt cr f gt OK lt cr f gt For unrecognised values of n Response lt cr If gt ERROR nn lt cr f gt 2 5 2 4 AT amp Fn Set S Register Defaults This command only works when the device is in local command and unconnected mode The value of n configures S Register values appropriate for various power modes ranging from minimum power consumption to maximum Legal values of n are as per the following table All other values of n generate a syntax error response If n is not specified a default value of O is assumed and the baud rate is not changed amp FO Default Medium power consumption UART baud rate unchanged amp F1 Minimum power consumption UART baud rate set to 9600 amp F2 Minimum power consumption UART baud rate set to 38400 amp F3 Minimum power consumption UART baud rate set to 115200 amp F4 Medi
104. SCO EV3 EV4 EV5 enabled for AT BTA8 Only one link type can be enabled at one time Initiate SCO eSCO link 532 0 7 The recommended value to enable this feature automatically on each SPP is 7 Value bitmask for packet type The link link type SCO eSCO is defined by 584 O feature disabled 1 HV1 S584 0 or EV3 S584 1 2 HV2 S584 0 or EMA S584 1 4 HV3 S584 0 or EV5 S584 1 Check link type of current ATI37 0 unknown no SCO link SCO connection 1 SCO SCO eSCO 2 eSCO 2 9 2 1 SCO eSCO Asynchronous Messages The following asynchronous messages apply to SCO eSCO connections FS8000 NT The internal codec is configured for a sampling frequency of 8000 Hz SPP AU1 This response is sent to the host when a SCO eSCO channel has been established To check the actual type use ATI37 O unknown 1 SCO 2 eSCO SPP AUO This response is sent to the host when an existing SCO eSCO channel has been closed SPP AU2 This response is sent to the host when a SCO channel setup fails This might be caused by the fact that the peer only accepts eSCO connections but a SCO connection was requested or vice versa Try to initiate the SCO connection with the remaining link type 2 9 2 2 SCO eSCO more information More information on SCO can be found in the following sections of this document BTM51x 2 8 2 1 9 2 8 4 2 9 3 Cable replacement There are different types and terms for cable replacement scena
105. SGCH HSG must be in alerting state ATI64 5 or 6 answered by HS HSG stops sending RING message or release audio in band ringing Initiate audio AT HSGA An existing SLC is required Transfer audio from AG to HS Release audio AT HSGR Response connection Transfer successful OK and HSG AUO audio from HS to AG wrong state ERROR 63 profile role disabled ERROR 59 Release audio and SLC AT HSGH or Response from AG ATH1112 or successful NO CARRIER 1112 ATH AG HSP was connected previously wrong state ERROR 63 profile role disabled ERROR 59 Enable automatic 345 0 disable auto alerting alerting on ACL 1 auto alerting on outgoing ACL established establishment 2 auto alerting on incoming ACL established 3 auto alerting on outgoing and incoming ACL established Enable in band ringing S346 0 disable in band ringing 1 enable in band ringing Enable automatic ACL 347 0 disable release 1 ACL is released automatically when audio is released by the HS 80 Laird Technologies Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Select SCO audio 315 SCO audio interface select interface BTM5xx only 0 internal codec default 1 12S master 2 12S slave 3 external PCM interface Refer to Routing audio streams over DS Query AG status ATI64 0 not connected 1 ACL connected 2
106. SIG In the service record for HSP 1 2 Headset role Al page 21 the following values are assigned Table 2 66 Selected items of HSP headset role service record ServiceClassO Headset 0x1131 Profiled Headset Profile 0x1108 In the service record for HSP 1 2 Audio gateway role 4 page 22 the following values are assigned Table 2 67 Selected items of HSP audio gateway role service record ServiceClassO Headset Audio Gateway 0x1112 ProfileO Headset Profile 0x1108 The tables above show that UUID 0x1108 identifies the Headset profile whereas the role is explicitly identified by the ServiceClassO UUID 0x1131 HS 0x1112 HSG Although UUID 0x1108 appears in the service records of both Headset unit AND Audio Gateway 0x1108 is still used as identifier for the Headset role in CONNECT and NO CARRIER messages In HSP1 0 headset role 0x1108 was assigned to both ServiceClassO and ProfileO i e it appeared twice in the service record of a HS unit and once in the service record of the audio gateway Americas 1 800 492 2320 153 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Predecessors of the BTM510 511 e g BISM2 have used 0x1108 as identifier for the Headset role This is inherited on BTM510 511 and is the reason why 0x1 108 is still used in BTM510 511 CONNECT and NO CARRI
107. SP connection has existed response NO CARRIER Disconnect HFG ATH111F or If AG HFP connection released response NO AT HFGH CARRIER 111F If no HSP connection has existed response NO CARRIER Disconnect HF ATH111E or If HF HFP connection released response NO AT HFH CARRIER 111E If no HSP connection has existed response NO CARRIER Disconnect all ATH Response profiles listed in table this NO CARRIER lt ProfileUUID gt for each previously connected profile or NO CARRIER if no existing connection found or HS connected but 332 0 2 9 7 Legacy Response Format BISM2 Some BISM2 responses have been slightly changed on BTM modules to provide enhanced functionality If required a BISM2 compatible response format can be enabled by S Register 329 Table 2 61 and Table 2 62 shows the implications of enabled disabled legacy response format Table 2 61 Enabling Disabling legacy response format Enable legacy response format BISM2 compati ble 329 0 1 0 disabled default 1 enabled Table 2 62 Implications of S329 AT SPH Response NO If SPP was connected response NO CARRIER 1101 ATH1101 CARRIER If SPP was not connected response NO CARRIER AT APH Response NO If A2DP was connected response NO CARRIER 110D ATH110D CARRIER If A2DP was not connected response NO CARRIER AT AVH Re
108. See Sniff mode and Figure 2 38 S564 0 0 1000 n a Sniff Maximum Interval in units of milliseconds 0 means disable See Sniff mode and Figure 2 38 S565 0 0 1 n a If set to 1 RI Ring Indicate line is configured as an input and forces the start up mode SReg512 and post timeout on Start up mode SReg555 to be dependent on the state of RI The RI conditional modes are defined by S Registers 566 to 569 inclusive S566 1 1 7 n a If S565 1 and RI is asserted then the device boots into this mode S567 1 1 7 n a If S565 1 and RI is de asserted then the device boots into this mode S568 1 1 7 n a If S565 1 and RI is asserted then the device assume this mode after the post start up timeout SReg 554 instead of mode defined in SReg555 S569 1 1 7 n a If S565 1 and RI is de asserted the device boots into this mode after the post start up timeout SReg 554 instead of the mode defined in SReg555 S581 4 0 63 HFP Set HF supported features Bitmask Americas 1 800 492 2320 L Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Bit 0 echo cancellation and or noise reduction Bit 1 call waiting notification capability and 3 way calling Bit 2 CLIP presentation capability Bit 3 voice recognition activation Bit 4 Remote volume control Bit 5 Enhanced call status Bit 6 Enhanced cal
109. VRCP direction indicator suppressed Table 2 21 AVRCP Operation IDs for Remote Control Commands Select 0x00 Up 0x01 Down 0x02 Left 0x03 Right 0x04 Right up 0x05 Right down 0x06 Left up 0x07 Left down 0x08 Root menu 0x09 Setup menu Ox0A Contents menu OxOB Favourite menu Ox0C Exit Ox0D 0 0x20 1 0x21 2 0x22 3 0x23 4 0x24 5 0x25 6 0x26 7 0x27 8 0x28 9 0x29 Dot 0x2A Enter 0x2B Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth 67 Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module Clear Ox2C Channel up 0x30 Channel down 0x31 Previous channel 0x32 Sound select 0x33 Input select 0x34 Display information 0x35 Help 0x36 Page up 0x37 Page down 0x38 Power 0x40 Volume up 0x41 Volume down 0x42 Mute 0x43 Play 0x44 Stop 0x45 Pause 0x46 Record 0x47 Rewind 0x48 Fast forward 0x49 Eject 0x4A Forward 0x4B Backward 0x4C Angle 0x50 Sub picture 0x51 F1 0x71 F2 0x72 F3 0x73 F4 0x74 F5 0x75 Vendor unique 0x7e Table 2 22 AV C Unit Subunit Types Monitor 0x00 Audio 0x01 Printer 0x02 Disc 0x03 Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth 68 Laird Technologies BTM510 511 User Guide Bluetooth
110. Z to become effective 303 FFFFFF 000000 AVRCP Set Company Id FFFFFF TG IEEE Company ID 24bit hexadecimal required for UNIT INFO Response in AVRCP target mode default value is OxFFFFFF 305 1 0 1 AVRCP Enable Unit Info Response TG 0 reject incoming Unit Info Requests 1 accept incoming Unit Info Requests and send response automatically default with Company ID as per 303 and unit type 0x09 Panel fixed S306 1 0 1 AVRCP Enable Subunit Info Response TG 0 reject incoming Subunit Info Requests 1 accept incoming Subunit Info Requests and send response automatically default with Subunit type 0x09 Panel fixed and MaxSubUnitld 0x00 fixed S307 0 0 3 A2DP Enable optional A2DP codec 0 no optional codec default 1 APTx Bit 0 2 AAC Bit 1 sink only 3 both APTx and AAC enabled Americas 1 800 492 2320 162 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Subsequent AT amp W plus ATZ required for a new value to become effective 308 3 01 3 A2DP Automatic control of discoverable connectable mode when entering and exiting A2DP connection Auto BTX 0 do not change discoverable and connectable mode when entering or exiting an A2DP connection 1 When entering an A2DP connection make module not discoverable and not connectable equivalent
111. a value which is the number of erroneous bits out of 1 million Hence a value of 0 is best and larger values are worse A value near 1000 BER 0 1 indicates bad link quality with a high number of lost Bluetooth packets Americas 1 800 492 2320 181 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module ATI200 Manufacturing data e g module serial number manufacturing date ATI333 Full AT firmware version number ATl411 Short press duration in ms S411 ATI412 Medium press duration in ms S411 412 ATI413 Long press duration in ms S411 S412 S413 3 3 Error Responses As of firmware v18 1 4 0 three digit error codes are enabled by default Refer to section 2 9 20 Table 3 3 BTM Error Responses 001 Register not recognised 002 Value for register is out of range 003 Incoming call NOT pending 004 No call to connect to This error code has meaning for ATO only 005 Syntax Error 006 Empty String 007 Device Class could not be stored 008 Invalid Device Class Code 009 Invalid Bluetooth Address 010 Could not set Service or Friendly name 011 PS Store Write 012 PS Store Read 013 Not Idle 014 Incorrect Mode 015 Already Scanning 016 Pairing is already in progress 017 Not USED 018 Not USED 019 Not USED 020 Not safe to write to Non volatile Sto
112. aces are digital external audio interfaces 2 8 4 SCO input output channel If SCO which is mono is routed over an audio interface which normally supports stereo the left channel is selected for the input signal Internal Codec A left A and B left and right I2S Left Left and Right Note On previous versions of the BTM51x mini dev kit the stereo input connector left and right channels are swapped tip right ring left sleeve ground The correct assignment for the jack is tip left ring right sleeve ground This issue is resolved as of the BTM511 DVK V04 Americas 1 800 492 2320 133 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech conm bluetooth Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module 2 8 5 Audio Loopback Mode For testing purposes an audio loopback mode is available Audio loopback mode is controlled by the AT command AT BTLm with m mode 0 4 In mode 1 audio input ADC and audio output DAC are connected directly In mode 2 the stereo audio input signal is fed through the Kalimba DSP with SBC codec running encoder decoder and is directed back to the audio stereo output Table 2 47 BTM51x Audio Loopback AT commands and S Registers Set audio loopback mode AT BTL lt Mode gt Mode 0 off 1 on ADC gt DAC 2 on ADC gt DSP gt DAC 3 on DS cross loopback master 4 on 12S cross loopback slave Set sampling
113. acy device BT2 0 or earlier legacy pairing with usage of PIN codes is used Legacy Pairing can be disabled by S Register 323 1 but then pairing with legacy devices always fails 2 5 6 5 SSP Timeout 5324 The SSP timeout s is defined by S Register 324 The timeout must be at least 60 s to meet the BT specification requirements 1 This time must be long enough for the user to compare or read and input a 6 digit number A time of 90 seconds is recommended which is the default value 2 5 6 6 SSP Input commands Table 2 5 lists all AT commands related to SSP input operations Table 2 5 SSP Input commands AT BTBY Accept pairing request Representing yes input AT BTBN Reject pairing request Representing no input AT BTBO12345 Enter 6 digit passkey displayed by remote device Representing keyboard input 2 5 6 7 AT BTW lt bd_addr gt Initiate SSP This command initiates secure simple pairing dedicated bonding with a device whose Bluetooth address is lt bd_addr gt The Bluetooth 2 1 EDR specification s term for this is Dedicated Bonding Dedicated bonding means the exchange of link keys pairing without creating a connection to a particular profile or service immediately Americas 1 800 492 2320 22 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module The remote device must have Bluetooth 2 1 or later
114. aded from ACR table select from ATI72 response AT ACDn delete one record from persistent store n index of record to be deleted in ACR table select from ATI72 response AT ACD delete all records from persistent store Americas 1 800 492 2320 111 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module To modify an existing ACR table entry with index n copy it to the scratch record first using AT ACLn In the scratch record the index will be set to zero Modify it then copy it back to persistent store Use AT ACRn to replace the existing record with index n Use AT ACW to insert the scratch record at top of the ACR table The new index is 1 and all subsequent ACR table entries indices are incremented by one Up to five ACRs can be stored in the table One record can contain multiple profiles When adding a new record to the top of the table index 1 the index of all other existing records are increased This can be interpreted like the index representing the age or history of a record The oldest record index 5 is deleted when adding a new record to the complete list 2 7 1 4 ATI72 Query ACR table persistent store ATI72 allows to query the current ACR table from persistent store non volatile memory Each line presents one entry If the ACR table contains zero items response is 0 more precisely lt cr lf g
115. age APSUS gt confirms that streaming is suspended and that it was initiated locally gt Refer to A2DP streaming state Response lt cr gt lt lf gt 0K lt cr gt lt lf gt command accepted lt cr gt lt lf gt APSUS gt lt cr gt lt lf gt A2DP stream suspended locally initiated or lt cr gt lt lf gt ERROR 77 lt cr gt lt lf gt wrong A2DP state 2 6 3 11 Resume A2DP Stream AT APR A suspended A2DP stream can be resumed manually by AT APR The asynchronous message APSTR gt confirms that streaming is resumed and that it was initiated locally gt Refer to A2DP streaming state Response lt cr gt lt lf gt OK lt cr gt lt lf gt command accepted lt cr gt lt If gt APSTR gt lt cr gt lt lf gt resuming A2DP stream locally initiated or lt cr gt lt If gt ERROR 77 lt cr gt lt lf gt wrong A2DP state 2 6 3 12 Supported Features A2DP Sink 312 Use S Register 312 to set supported features in the A2DP sink that are advertised in the A2DP service record Refer to Table 2 17 The S register needs to be saved AT amp W and the module needs to be power cycled ATZ for a new value to become effective 2 6 3 13 Supported Features A2DP Source 313 Use S Register 313 to set the A2DP source supported features that are to be advertised in the A2DP service record Refer to Table 2 17 The S register must be saved AT amp W and the module must be power cycled ATZ for a new value to become
116. airdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module DSR asserted means a voltage level of logic O 0 0 V at the module pin because the UART level shifter inverts the signal Accordingly DSR de asserted means a voltage level of logic 1 3 3 V at the module pin Response On Bluetooth disconnection lt cr If gt NO CARRIER 1103 lt cr f gt Americas 1 800 492 2320 109 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech conm bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Table 2 35 DUN Summary of S Registers and AT Commands Enable DUN profile S102 0x04 DUN bitmask needs subsequent AT amp W and ATZ to activate Set up escape mode via ATS507 2 Needs subsequent AT amp W to DSR high throughput make permanent Initiate DUN connection AT DUD lt bd_addr gt Responses successful CONNECT 123456789012 1103 gt failed NO CARRIER profile disabled ERROR 59 incorrect state ERROR 63 Release DUN connection AT DUH Responses successful NO CARRIER 1103 profile disabled ERROR 59 incorrect state ERROR 63 hex 2 7 Automation As of v18 1 4 0 the BTM51x modules provide features that allow more automated or even hostless operation of the Bluetooth device across a number of profiles New features such as auto connect records auto connect service status indication and dynami
117. aluated by measurements but the judgment is ultimately subjective and up to the listener Another optional codec is AAC AAC is implemented for an A2DP sink only decoder It has the preferred codec for the iPhone An optional codec must be supported by both ends of an A2DP link At the beginning of each A2DP link a negotiation takes place In the result of this negotiation both devices agree on the codec and the sampling rate to be used for the time of the connection If no optional codec matches on both ends SBC is used Multiple optional codecs can be enabled 2 6 3 16 Enabling optional codecs APTX AAC 307 S307 enables optional codecs Bit O val 1 enables APTX source or sink and bit 1 val 2 enables AAC sink only If AAC is enabled but the module is configured for A2DP source the AAC bit is ignored Multiple optional codecs can be enabled e g S307 3 enables AAC and APTX S register 307 is queried by firmware at boot time For a new setting to become effective you must send AT amp W save SRegs and ATZ reset to the module APTx or AAC must be enabled on both ends of the A2DP link or it falls back to SBC After connection the current codec may be verified by ATI26 2 6 3 17 Discoverable Connectable while A2DP streaming In a scenario where both devices of an A2DP link are discoverable and connectable while streaming audio interrupts in the audio stream are likely to occur Bandwidth which would be required for the A2DP
118. amp F Restore factory default settings A2DP profile is enabled per default in S102 Audio Sink role is enabled per default in S300 ATS515 04040 Set A2DP device class BTM5xx 0 ATS512 4 Make device connectable and discoverable permanent setting AT amp W Store settings ATZ Reset Preparation PC n a 1 Open Bluetooth Settings from the taskbar icon Americas 1 800 492 2320 40 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech conm bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Connection Figure 2 7 A2DP example 1 PC Bluetooth setup settings 2 Click on New Connection Figure 2 7 A2DP example 1 PC Bluetooth settings 3 Click Next Discover BT Devices Figure 2 8 Select Laird BTMM if not listed click Refresh Figure 2 9 5 Click Yes on Allow this Device to connect Figure 2 10 Connection is initiated by PC Figure 2 11 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 there is no audio ensure that a Bluetooth Audio Device has appeared in the Device Manager Figure 2 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 whi
119. are audible as noise 2 8 2 1 9 PCM Pulse code modulation interface Audio data of a SCO link can be routed to from the PCM interface The PCM is intended to carry bidirectional voice data at typically 8 kHz sampling frequency but not stereo audio The PCM interface is composed of 4 signals as outlined in Table 3 36 PCM_IN PCM_OUT PCM_SYNC PCM_CLK These signals are shared with the 12S bus so either I2S or PCM can be used but not both simultaneously The PCM interface offers a wide range of configuration options described in the BCO5 EXT data sheet 10 chapter 10 page 50 Unfortunately this configuration cannot be accomplished by AT commands Instead use PSKEYs Laird Technologies provides the utility PsUpdate bat which allows certain PSKEYs to be downloaded to a BTM51x module over the UART The PSKEYS that apply for SCO configuration are PSKEY_DIGITAL_AUDIO_CONFIG amp 01D9 PSKEY_PCM_FORMAT amp 01B6 For more on downloading PSKEYs over UART see CVC on BTM5xx provided by Laird Technologies under NDA 2 8 2 1 10 S PDIF Sony Philips Digital Interconnect Format not supported S PDIF is another digital audio interface for high quality stereo audio It is not supported by the current firmware version 18 1 3 0 2 8 3 Audio Routing options for SCO Table 3 40 provides an overview of combinations between profiles and audio interfaces that are supported SCO audio refers to bidirectional mono audio for tran
120. as 1 800 492 2320 130 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Similarly in the wave file recorder scenario an incoming audio bit stream is recorded to memory and the timing is controlled only by SCK and WS In this use case the SCK and WS signal are fully sufficient to synchronize between the two devices 2 8 2 1 8 12S Use case External Audio CODEC A second use case for 12S is the external audio codec scenario This may be needed for higher subjective sound quality granted by dedicated audio codecs with advanced DAC s ADCs and advanced audio filters A system with external audio codec typically requires a high frequency master clock signal in addition to the I2S synchronisation lines SCK and WS This clock drives the external CODEC s filter circuits and subsequent internal circuits with precise synchronisation to the master clock This high frequency master clock is typically in a range of 24 MHz or 12 MHz Because the BTM5xx cannot synchronise to an external clock as a slave for this purpose it would have to provide this master clock signal BTM51x cannot provide this high frequency master clock signal due to a hardware limitation When operating an external CODEC without synchronisation artefacts are audible in periodic intervals It has been observed that these artefacts appear at around 15 kHz in the audio spectrum and
121. ass gt A 6 character Bluetooth device class made of ASCII characters 0 to 9 A to F and a to f n A positive integer value m An integer value which could be positive or negative which is a decimal value or in hexadecimal if preceded by the character E g the value 1234 can also be entered as 4D2 lt string gt A string delimited by double quotes E g Hello World The character must be supplied as delimiters lt uuid gt A 4 character UUID number consisting of ASCII characters 0 to 9 A to and a to f Americas 1 800 492 2320 9 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech con bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 5 Module Configuration 2 5 1 General AT Commands 2 5 1 1 AT Used to check if the module is available Response lt cr lf gt OK lt cr If gt 2 5 1 2 ATEn Enable Disable Echo This command enables or disables the echo of characters to the screen A valid parameter value is written to S Register 506 EO Disable echo E1 Enable echo All other values of n generate an error Response lt cr lf gt OK lt cr If gt Or Response lt cr lf gt ERROR nn lt cr lf gt 2 5 1 3 ATZ lt n gt Hardware Reset and emerge into boot mode oi Forces the device through a hardware reset so that it eventually comes alive in local command and unconnected mode This allows changes to the non v
122. aster 2 12S slave 3 external PCM interface Refer to section 2 8 2 1 Inquire HFG status ATI66 0 not connected 1 SLC connected 2 Audio connected 3 in call SLC 4 in call audio 5 call setup ringing incoming call dialling or alerting outgoing call SLC 6 call setup ringing incoming call dialling or alerting outgoing call audio 8 in call but no SLC 1 AT HFGC1 is the only possible response to HFG Dnnn To reject this call attempt from the HF the HFG must issue AT HFGC1 first and subsequently AT HFGCH 2 HFGE instead may respond to HFG D gt mmm and HFG L to confirm that the requested operation was not successful i e memory location invalid or last dialled number not available 2 6 7 DUN Dialup Networking Profile The dialup networking profile DUN 6 defines protocols and procedures for the dialup networking use case Scenarios include a wireless modem or a cellular phone used for dialup internet connections or a wireless modem or cellular phone used to receive data calls by a PC There are two roles defined Gateway GW This device provides access to the public network e g cellular phone or modem this role is not supported on BTM e Data Terminal DT This device uses the dialup services of the Gateway e g PC This role is supported on BTM To map these roles to the conventional modem structure the Gateway is referred to as Data Circuit Endpoi
123. ata at boot time this data is copied to the baseband at boot time automatically Therefore copying data to the EIR persistent store makes it visible to inquiring devices from next power cycle onwards Data passed to the baseband must match the EIR data format as specified in the BT2 1 specification page 1305 in the pdf file See AT BTE lt data gt Accumulate data in RAM buffer for more information Response lt cr f gt OK lt cr lf gt 2 5 5 6 AT BTE Query data from RAM buffer This command prints the data that is currently stored in the RAM buffer Response lt cr f gt lt data gt lt cr lf gt OK lt cr lf gt 2 5 5 7 AT BTE Query outgoing EIR data from baseband This command prints the outgoing EIR data that is currently set up in the local baseband Some interpretation on the EIR data format is done here If the leading byte of a data block contains information of the wrong length then some unexpected output may appear e g 00 is appended Response lt cr f gt lt EIR data gt lt cr f gt OK lt cr lf gt 2 5 5 8 AT BTEW Query data from RAM buffer This command prints the data that is currently stored in the EIR persistent store Response lt cr f gt lt data gt lt cr f gt OK lt cr lf gt 2 5 5 9 AT BTE Delete EIR data from baseband This command deletes the EIR data in the baseband Response lt cr f gt OK lt cr f gt 2 5 5 10 AT BTE Delete EIR data from baseband and RAM buffer This command deletes
124. ata mode This command assumes that the module is in data mode after OK is received It responds with an error if there is no Bluetooth SSO connection Response lt cr lf gt CONNECT 123456789012 lt lt cr If gt incoming connection lt cr lf gt CONNECT 123456789012 gt lt cr f gt outgoing connection Or Response lt cr lf gt ERROR nn lt cr f gt 2 5 9 6 Dropping SSO Connections In a conventional telephony modem a call is normally terminated by first sending a character sequence It is enveloped by an escape sequence guard time between 100 to 1000 milliseconds This places the receiving device into local command and connected mode whereupon the sender issues the ATH command The Laird modules provide multiple ways to drop a connection One method is similar to the above but instead a character sequence is used This is to eliminate ambiguity when a data call via a mobile phone is in progress when the call is established using the phone s Bluetooth AT modem The second method involves the host dropping the DTR DSR from the module s viewpoint modem control line Dropping a connection using the escape sequence severely impacts throughput reducing the data rate from about 300 kbps to around 85 kbps To cater for this performance hit the device s connection drop capability is configurable to be in one of two modes The first mode allows a connection to be dropped using either method This is the default The secon
125. bers available should be stored in the HFG immediately after power up of the system When an SLC to a HF device is established the HF can query the HFG s subscriber numbers at any time by sending AT CNUM to the HFG on the SLC The available subscriber number records then transfer to the HF automatically Subscriber number records are stored in volatile memory and are lost on reset or power cycle At maximum 4 subscriber number records are allowed lt number_string gt subscriber number string characters allowed 0123456789 ABDCTP W lt type gt specifies the format of lt number_string gt provided can be one of the following values 128 143 The phone number format may be a national or international format and may contain prefix and or escape digits No changes on the number presentation are required 144 159 The phone number format is an international number including the country code prefix If the plus sign is not included it shall be added by the AG as needed 160 175 National number No prefix nor escape digits included lt service gt service of this subscriber number permitted values 4 voice 5 fax Response f lt cr gt lt lf gt OK lt cr gt lt lf gt command valid record added OR lt cr gt lt If gt ERROR 05 lt cr gt lt lf gt syntax or value range error OR lt cr gt lt If gt ERROR 67 lt cr gt lt lf gt maximum number of subscriber number records reached AT HF
126. ble gt AVRCP adopted version 1 0 Headset Profile Revision V12r00 18 12 2008 https Avww bluetooth org Technical Specifications adopted htm scroll down to section Traditional Profiles Qualifiable gt HSP adopted version 1 2 Hands free Profile 1 5 Revision V10r00 25 11 2005 https Awww bluetooth org Technical Specifications adopted htm scroll down to section Traditional Profiles Qualifiable gt HFP adopted version 1 5 Dialup Networking Profile Version 1 https Awww bluetooth org Technical Specifications adopted htm scroll down to section Traditional Profiles Qualifiable gt DUN adopted version 1 1 Serial Port Profile Specification https Awww bluetooth org Technical Specifications adopted htm scroll down to section Traditional Profiles Qualifiable gt SPP adopted version 1 1 Bluetooth Assigned Numbers https Awww bluetooth org Technical AssignedNumbers home htm Most interesting are the links Baseband and Service Discovery Protocol Class of Device Generator this link might be helpful for creating a particular CoD http bluetooth pentest narod ru software bluetooth_class_of_device service_generator html Americas 1 800 492 2320 187 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Caution this tool allows selectio
127. ble restoring of last gain used for SCO 356 0 3 0 disable gain restoring for SCO 1 enable output gain restoring for SCO 2 enable input gain restoring for SCO 3 enable input and output gain restoring for SCO default Enable restoring of last gain used for A2DP 357 0 3 0 disable gain restoring for A2DP 1 enable output gain restoring for A2DP 2 enable input gain restoring for A2DP 3 enable input and output gain restoring for A2DP default Check codec in use ATI26 Response if 333 1 NONE SBC APTX Response if 333 0 0 None 1 SBC 2 APTX Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth 56 Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module Ebenen ATI27 0 not discoverable not connectable not scanning discoverable 1 discoverable inquiry scanning connectable status 2 connectable page scanning scan state 3 discoverable and connectable inquiry and page scanning Query A2DP status ATI61 0 A2DP not connected 1 A2DP connected and streaming 2 A2DP connected but streaming suspended Query SCO token ATI21 Index of the profile instance owning an active SCO connection 0 none 1 HS 2 HSG 3 HF 4 HFG 5 SPP_BTA Query last SCO ATI22 For values 0 22 refer to Table 2 40 output gain Query last SCO inp
128. c registers are described in this section As automation features are likely to make extensive usage of non volatile memory procedures described in section 2 9 22 should be taken into account For a quick start section 2 7 4 6 provides an example for hostless operation demonstrating automation features on a BTM511 DVK V04 BTM51x audio development kit 2 7 1 Auto connect records ACR The auto connect feature of BTM51x addresses two use cases Automatic connection to known devices and profiles at boot time Automatic re connection following link loss when returning back into range Given that BTM51x supports multiple profiles and allows simultaneous connections to different devices with different profiles a database is required which defines values such as the Bluetooth device address profiles and the order of the automatic re connection attempts This database is composed of a list of up to five auto connect records ACR stored in persistent store and referred to as ACR table There are two options to populate or modify the ACR table which do not exclude each other Manual mode full control on each AC record by AT commands Automatic host less mode population of ACR table automatically based on established connections To cater for manual mode a new command family AT AC was created Description of these commands can be found below Americas 1 800 492 2320 110 Laird Technologies Europe 44 1628 858 9
129. call SLC 6 call setup ringing incoming call dialling or alerting outgoing call audio 8 in call but no SLC Americas 1 800 492 2320 180 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module ATI67 DUN connection status O not connected 1 connected in local command mode 2 connected in remote command mode ATI72 Table of Auto Connect Records persistent store Syntax is as follows lt index gt lt BdAddr gt lt pm gt lt interval gt lt state gt lt pm_cnct gt lt flags gt with lt index gt index of the entry starting with 1 lt BdAddr gt Bluetooth device address of remote device lt pm gt profile mask as per S102 four hexadecimal characters with leading lt interval gt interval of reconnection attempts in seconds lt state gt status of the ACR 1 attempting connection at every interval seconds 2 partly connected at least one profile of pm connected at least one profile of pm not connected attempting to connect the remaining profiles 3 fully connected all profiles of the ACR connected lt pm_cnct gt profile mask of actually connected profiles As with S102 this value is four hexadecimal characters with leading lt flags gt option flags two hexadecimal characters with leading 37 bitmask BitO Always reconnect If this bit is set a normal
130. call terminate ongoing call AT CHUP is sent to the AG In return the audio gateway updates its indicator call 0 and sends the appropriate CIEV message to the HF HF notifies its host by a HFl lt indicator gt lt value gt message Refer to DTMF tone request 17_4 27 2 6 6 1 7 Place call with number provided by HF 8_4 18 AT HFC nnn Initiates a new call from HF to the number specified by the number string nnn This command sends ATDnnn to the audio gateway 2 6 6 1 8 Memory dialling from the HF 9_ 4 19 AT HFCM mmm Initiates a new call from HF to the number stored in memory location mmm of the AG This command sends ATD gt mmm to the audio gateway 2 6 6 1 9 Re Dial last number from HF 10_4 20 AT HFCL Initiates a new call from HF to the number last dialled by AG AT BLDN is sent to the AG In return the audio gateway updates its indicator callsetup 2 and sends the appropriate CIEV message to the HF HF notifies its host by a HFl lt indicator gt lt value gt message Refer to DTMF tone request 17_4 27 Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth 84 Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module 2 6 6 1 10 Enable Caller Line Identification Presentation CLIP 13_4 23 2 6 6 1 11 The CLIP feature is enabled by setting Bit 2 value 4 in the HF
131. cement used in this document refers to automatic creation of an SPP link to a pre defined peer device whenever the local module is powered up Refer to the AT BTR command 2 9 4 Link Key Management On a BTM device link keys are managed by the AT firmware Appropriate AT commands are described in section 3 8 There is a range of S Registers defining the behaviour of automatic link key storage on incoming outgoing and dedicated general bonding 2 9 4 1 Dedicated Bonding In BT2 1 specification dedicated bonding is defined as the exchange of link keys between two devices without the intention of establishing a connection immediately Dedicated bonding is initiated by AT BTW lt BdAddr gt initiation of pairing 2 9 4 2 General Bonding In BT2 1 specification general bonding is defined as the exchange of link keys between two devices with the intention of establishing a connection immediately This is the case if a device tries to connect to another device without existing link key Hence pairing authentication and exchange of link keys is initiated automatically prior to the connection General bonding is initiated by a connection requesting AT command if there is no link key for the peer device existing Such AT commands are AT SPD lt BdAddr gt AT APD lt BdAddr gt AT AVD lt BdAddr gt AT HSD lt BdAddr gt AT HSGD lt BdAddr gt AT HFD lt BdAddr gt AT HFGD lt BdAddr gt
132. ch is the Bluetooth Audio Device here Connected n a Audio can be heard on the speakers headphones Adjust AT GOU Increment volume audio output gain by one Volume BIMS5xx AT GOD Decrement volume audio output gain by one Disconnect AT APH Response NO CARRIER 110D disconnection confirmed EXEC 9 Bluetooth View Help Z Bluetooth ES f SEN New petal Delete Connection Figure 2 7 A2DP example 1 PC Bluetooth settings Americas 1 800 492 2320 41 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Add New Connection Wizard This wizard will create the settings for Bluetooth device connection Add New Connection Wizard Select a device i EA Cara et Me oooo04 Figure 2 9 A2DP example 1 Select Bluetooth device Click Refresh if Laird BTMM is not listed Bluetooth Manager Bluetooth Security Figure 2 10 A2DP example 1 Confirm pairing here Secure Simple Pairing no PIN required Americas 1 800 492 2320 42 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Bluetooth Settings 0 x Bluetooth View Help Bluetooth Laird BTMM 000004 a eso ren Figure 2 11 A2DP example 1 Connection established a Device
133. chipset format ATI9 SPP connection status O not connected 1 connected in local command mode 2 connected in remote command mode ATI11 The reason why a NO CARRIER resulted in the most recent attempt at making an outgoing connection The response values are as follows 0 No prior connection 1 Connection timeout 2 Connection attempt cancelled 3 Normal disconnection 4 Peer device has refused connection 5 Service profile lt uuid gt requested not available on remote device 6 Connection has failed 32 ATH was entered 33 Incoming connection aborted because too many rings 34 Unexpected incoming connection 35 Invalid address 36 DSR is not asserted 37 Call limit of 65531 connections has been reached 38 Pairing in progress 39 No link key 40 Invalid link key 41 link loss not working as expected for SPP 42 no service level connection SLC 43 invalid parameters A2DP 44 remote link key missing not working as expected for SPP 255 Unknown Reason ATI12 The last ERROR response number ATI13 The Sniff status is returned as follows Response lt cr lf gt a b c d e lt cr lf gt OK lt cr lf gt a 0 when not online and 1 when online and Sniff has been enabled b is the Sniff Attempt parameter c is the Sniff timeout parameter d is the minimum sniff interval e is the maximum sniff interval All parameters b c d and e are given as Blue
134. coming connections in non volatile memory Only the device with Bluetooth address lt bd_addr gt may connect to the module Other devices are rejected The new setting applies immediately and remains over a power cycle because it is copied from non volatile memory to the incoming peer address variable at boot time Any subsequent AT BTP G overwrites or clears the incoming peer address When S 512 3 4 6 or 7 then the module waits for an incoming connection from the peer address specified If lt bd_addr gt is 000000000000 then incoming connections from any devices are permitted Note AT BTM lt BdAddr gt only makes sense if also ATS512 3 4 6 or 7 plus AT amp W and ATZ is set If the BTM51x is not discoverable and not connectable at boot time ATS512 1 then AT BTP or AT BTG would clear the current incoming peer address Response lt cr lf gt OK lt cr lf gt 2 5 10 4 A7 B7M Delete Incoming Peer Address non vol mem This command deletes the peer address previously stored using AT BTM lt bd_adar gt If the module is connectable for the selected device before this command it is connectable for any device afterward Response lt cr lf gt OK lt cr lf gt 2 5 10 5 A7 B7M Read Incoming Peer Address non vol mem This command displays the peer address stored in non volatile memory placing the module in pure cable replacement mode Response lt cr lf gt 123456789012 lt cr lf gt OK lt cr lf gt If the location i
135. command set defined by the 1394 Trade Association device model and control message format In this device model a remote control target consists of one or more subunits At least the subunit PANEL must exist Remote control commands are passed to a subunit with the PASS THROUGH command A BTM device configured as target supports one PANEL subunit Table 2 18 provides an overview on supported AVRCP features on a module Table 2 18 AVRCP Supported Features on BTM5xx 1 Connection establishment for control M Yes O Yes 2 Release connection for control M Yes M Yes 3 Sending UNIT INFO command O Yes X No 4 Receiving UNIT INFO command X No M Yes 5 Sending SUBUNIT INFO command O 1 X No 6 Receiving SUBUNIT INFO command X No M Yes 7 Sending VENDOR DEPENDENT command O No X No 8 Receiving VENDOR DEPENDENT command X No O No 9 Sending PASS THROUGH command M Yes X No 10 Receiving PASS THROUGH command X No M Yes M mandatory O optional X excluded 1 incomplete Americas 1 800 492 2320 58 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 6 4 1 AVRCP Example 1 This section illustrates an AVRCP connection between a Laird BTM5xx device as AVRCP Controller and a PC with a built in Bluetooth device and Toshiba Bluetooth Stack 2 1 as AVRCP Target For any other Bluetooth Stack with AVRCP targe
136. connection ATH110D NO CARRIER 110D if connection has existed and 329 0 NO CARRIER if connection has not existed and 329 0 close all connections ATH Response NO CARRIER lt profileUUID gt for each profile that was previously connected see Disconnecting Profiles Set gain level 589 0 22 default 15 Set codec output gain level applies to sink 590 0 22 default 15 Set codec input gain level applies to source Set overall gain dBr 10 S689 450 215 Set codec output gain in dBr 10 applies to sink default 0 690 450 215 Set codec input gain in dBr 10 applies to source default 0 Increment Gain AT GOU Increment codec output gain by 1 step in gain table refer to A2DP Example 1 AT GIU Increment codec input gain by 1 step in gain table refer to A2DP Example 1 Decrement Gain AT GOD Decrement codec output gain by 1 step in gain table refer to A2DP Example 1 AT GID Decrement codec input gain by 1 step in gain table refer to A2DP Example 1 Automatic control of S308 0 3 0 do not change discoverable and connectable discoverable connect able mode when entering and exiting A2DP connection Auto BTX mode when entering or exiting an A2DP connection 1 When entering an A2DP connection make module not discoverable and not connectable equivalent to AT BTX 2 When exiting an A2DP connection restore discove
137. cr lf gt 2 5 7 2 AT BTK s lt string gt Set Passkey This command provides a PIN passkey The PIN is stored in non volatile memory for future use If this command is used as response to a PIN 12345678 asynchronous message the PIN provided by this command is not stored in non volatile memory Specifying an empty string deletes the PIN from the non volatile memory The string length must be in the range 0 to 8 or an error is returned Response lt cr lf gt OK lt cr If gt 2 5 7 3 Legacy Pairing Asynchronous Messages PIN This response is sent to the host during a pairing negotiation The fully qualified string is PIN 012345678901 where 012345678901 is the Bluetooth address of the peer device In response the host must supply a pin code which is entered using the AT BTK command If the peer does not supply the address in the message exchange then the address is specified as 000000000000 and the paring proceeds as normal PAIR n lt bd_addr gt This response is sent to the host on termination of a pairing process If pairing is successful then ni 0 If a timeout occurs then n 1 For all other unsuccessful outcomes n 2 The parameter lt bd_addr gt is the address of the peer device if available PAIR O lt bd_addr gt MM This response is sent to the host on termination of a successful pairing process The optional MM is sent only if the according S Register 325 328 is set to 1 automatically saving
138. d allows only the DTR drop mode Enable this mode using the S507 register Appendix Table 3 1 The escape sequence is as follows lt Guard time gt lt Esc Chr gt lt Guard time gt lt Esc Chr gt lt Guard time gt lt Esc Chr gt lt Guard time gt When a file transfer is occurring which contains multiple lt Esc Chr gt characters the module does not drop into command mode Thi is because file transfer occurs quickly and the gap between characters gap is much shorter than the lt Guard time gt The lt Esc Chr gt character can be changed via the S2 register and the lt Guard time gt interval can be specified via the S12 register Appendix Table 3 1 Americas 1 800 492 2320 30 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 5 9 7 50 Asynchronous Messages RX lt string gt This response is sent to the host when the unit is in online command mode S Register 531 is set to 3 and data arrives from a peer If the data from the string contains non visual characters for example ASCII 0 to 31 and ASCII 128 to 255 those characters are translated into a 3 character escape sequence starting with For example the embedded lt cr gt lt lf gt sequence would be sent as the 6 character string OD OA If the data contains the character then it is sent as 22 If the data contains the character then it is sen
139. d Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 8 2 1 3 Routing audio streams over 12S 314 selects the audio interface to use when entering an A2DP connection 315 selects the audio interface for entering an SCO connection Available options for both 314 and 315 are 0 internal codec 1 I2S master and 2 12S slave Table 2 44 BTM51x S Registers Audio Routing Register Default Range Description 314 0 0 2 A2DP audio interface select 0 internal codec default 1 12S master 2 12S slave 315 0 0 3 SCO audio interface select 0 internal codec default 1 12S master 2 12S slave 3 external PCM interface An asynchronous message indicating the current sampling rate and the audio interface is sent to the UART whenever entering a SCO or A2DP connection The format of this message is FSddddd lt interface gt ddddd sampling frequency in Hz 4 or 5 digits lt interface gt INT internal codec I2S_M 12S master 12S_S 12S slave 309 or S504 may disable this FS message 2 8 2 1 4 A2DP sampling rate capability When entering an A2DP connection a negotiation phase finds the best sampling frequency that matches both ends Therefore each A2DP end must expose its supported sampling frequencies When using the BTM5xx internal codec the supported sampling frequencies are known so the use
140. d as separator 4 EIRD Extended inquiry response data 1 display EIRD on inquiry result 0 do not display EIRD on inquiry result 2 5 4 2 Inquiry Response format The format of an inquiry result is lt cr lf gt lt bd_addr gt lt dev_class gt lt friendly_name gt lt rssi gt lt eir_data gt lt cr lf gt lt bd_addr gt 12 digit hexadecimal lt dev_class gt 6 digit hexadecimal lt friendly_name gt printable ASCII character enclosed by lt rssi gt signed 2 digits decimal lt eir_data gt printable ASCII character whenever possible otherwise a byte is displayed aud as 2 digit hexadecimal with preceding V enclosed by Americas 1 800 492 2320 16 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module For example the data block 01 41 42 43 44 02 03 45 46 04 0A OD is presented as 01 ABCD 02 03456 04 0A 0D No validation is performed on incoming EIR data If a higher significant flag is set and a lower significant bit is not set in 330 for each disabled item a comma is printed Example 330 9 ADDR enabled COD and FN disabled RSSI enabled Inquiry Response lt cr lf gt 123456789012 54 lt cr lf gt 123456789014 54 lt cr lf gt OK lt cr lf gt 2 5 4 3 AT BTIV lt devclass gt Inquire As per AT BTI but the response comprises for all inquiry responses Bl
141. detailed information 2 8 1 Analogue Audio Interface Bluecore BCO5 contains an onboard codec providing analogue input and output capabilities for audio signals The following sections describe details of this onboard codec Americas 1 800 492 2320 122 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 8 1 1 Onboard Codec Gain Analogue input and output gains Input Amplifier Output Amplifier Figure 2 29 can be set to one of 23 steps called Gain Level To each gain level an overall gain dBr is assigned according to Table 2 40 The overall gain is formed by an analogue and a digital component as outlined in Table 2 40 Gain values can be specified either as gain level or as overall gain by separate S Registers Note that a pair of such S Registers always updates the partner S Register e g S589 S689 and S590 S690 For S689 and S690 the value must be overall gain in dBr multiplied by ten If the input value doesn t match a gain table entry the nearest possible value is set The actual value can be checked by reading S689 S690 The value of S689 S690 is printed out multiplied by ten to avoid non integer numbers The command class AT G enables incremental and decremental gain settings The increment decrement command corresponds to one row up down in the gain table Table 2 40 The Gain level registers 589 S68
142. disconnection yields reconnect attempts If bit is cleared the record is deleted from the ACR table on normal disconnect Link loss leaves the entry in the ACR table yielding reconnect attempts Bit1 always send AVRCP play Bit2 never send AVRCP play ATI73 Auto Connect Service ACS status 0 service disabled not running service enabled paused between connection attempts interval timer running 2 attempting initiates connections as defined by ACR table 3 attempt repeat resumes connection attempts after a profile with transitional state was found and the transitional state was finished 4 all profiles of ACR table are connected monitors disconnect events ATI74 Auto connect attempt interval in seconds If the interval parameter differs across multiple ACRs without all profiles connected yet the smallest interval applies and is displayed If not applicable e g no ACRs exist response is 0 ATI75 Current incoming peer address regardless of how it was set AT BTM lt bd_addr gt or AT BTG P lt bd_addr gt If not set response is 000000000000 ATI101 The RSSI value in dBm If a connection does NOT exist then a value of 32786 is returned A value of 0 means the RSSI is within the golden range this is quite a large band therefore RSSI is not always a useful indicator Use ATI111 instead which returns the bit error rate ATI111 Returns LinkQual which in the CSR chipset is defined as BER bit error rate This returns
143. e analogue audio input stereo is routed to SD_OUT and at the same time SD_IN is routed to analogue audio output stereo DS cross loopback mode is enabled by AT BTL3 I2S master role or by AT BTL4 I2S slave role Figure 2 33 and Figure 2 34 show a block diagram of DS cross loopback mode The sampling frequency for this mode can be changed by S Register 419 as outlined in Table 2 47 analogue audio stereo DS digital audio SD_IN audio in cn Te va audio out lt PCM_OUT BTM5xx in DS cross loopback PCM_SYNC mode master AT BTL3 PON CUK Figure 2 33 BTM51x DS cross loopback master analogue i 12S digital scree audio stereo io i SD_IN audio in audio out lt gt PCM_OUT SPOUT BTM5xx in I2S ne cross loopback PCM_SYNC mode slave SCK PCM_CLK AT BTL4 Figure 2 34 BTM5 1x 12S cross loopback slave 2 8 2 1 7 12S Use case Wave File Player Recorder One of the use cases for I2S is the wave file player recorder In this use case a wave file is the digital source player scenario which is being played back with its recording sampling rate If the recording sampling rate of the file is different to the playing sampling rate a sampling rate conversion must be performed by the player entity before data is put on the 12S bus Play in this context means data is shifted out to the 12S bus SD with clock timing controlled by only WS and SCK Americ
144. e This section divides AT commands into functional groups including module configuration Bluetooth profiles hardware units and miscellaneous functions 2 4 1 Assumptions All commands are terminated by the carriage return character OxOD which is represented by the string lt cr gt in descriptions below This cannot be changed All responses from the module have carriage return and linefeed characters preceding and appending the response These dual character sequences have the values OxOD and OxOA respectively and shall be represented by the string lt cr f gt All Bluetooth addresses are represented by a fixed 12 digit hexadecimal string case insensitive All Bluetooth Device Class codes are represented by a fixed six digit hexadecimal string case insensitive Al profile specific commands are identified by the prefix shown in Figure 2 1 Table 2 1 AT Command prefix for profiles Serial Port Profile SPP AT SP Advanced Audio Distribution Profile A2DP AT AP Audio Video Remote Control Profile AVRCP AT AV Headset Profile HSP AT HS Hands Free Profile HFP AT HF Dialup Network Profile DUN AT DU 2 4 2 Command Syntax The following syntax is used in this document to describe optional or mandatory parameters for AT commands lt bd_addr gt A 12 character Bluetooth address made of ASCII characters O to 9 A to F and a to f lt devcl
145. e 2 9 SPP Example Command Sequence Preparation A AT amp F Restore factory default settings ATS102 1 Enable Serial Port Profile SPP AT amp W Store settings ATZ Reset Preparation B AT amp F Restore factory default settings ATS102 1 Enable Serial Port Profile SPP ATSO 1 Automatic response after one RING AT amp W Store settings ATZ Reset AT BTP Make device temporary connectable and discoverable ATl4 Query Bluetooth device address of local device lt BdAddr_DevB gt Initiate A AT SPD lt BdAddr_DevB gt Initiate SPP connection from device A to connection device B Asynchronous messages PAIR 0 pairing successful A and B RING B only CONNECT connected A and B Connected A B lt data gt Any character entered on one end is displayed at the other end Enter command AorB ANA Response OK command mode mode confirmed now AT commands are expected at the UART UART data from host is not sent across to remote device Disconnect AT SPH Response NO CARRIER A and Bi disconnection confirmed Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth 35 Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module 10 x CTS DSR DCO RI RTS DTRIV DREI CAPTURE J Echo Clear Data Transfer Test Open COM24 9600 N 8 1 Figure 2 3 SPP example Preparation of Device
146. e HF subsequently The status of the active call s is changed to held and the status of the waiting call is changed to active The states of all current calls can be checked by AT HFGC Response lt cr lf gt OK lt cr lf gt 2 6 6 2 7 Signal outgoing call status from AG to HF 8 4 18 9_4 19 10_4 20 AT HFGC1 lt number_string gt lt type gt dec This command shall signal a successful response to a HF initiated call indicated by one of the following asynchronous messages HFG Dnnn dial number lt nnn gt given by HF unit HFG D gt nnn dial from AG memory location nnn HFG L redial last number OK is sent as successful response to the HF s request Signal an outgoing call status by sending CIEV 3 2 callsetup 2 indicator to HF If an audio connection is not present yet it is initiated A call record with status dialling is created and can be checked by AT HFGC The optional parameters lt number_string gt and lt type gt is stored in the call record Their format is described in Signal incoming call from AG to HF 4_4 13 For HFG Dnnn AT HFGC1 is the only possible response the HFG can issue If the HFG wants to cancel the His call request it shall issue AT HFGC1 first followed by AT HFCH which terminates the call process AT HFGC2 Signal to HF that remote party is reached and is being alerted during an outgoing call setup procedure CIEV 3 3 callse
147. e HS initiates an audio release by AT CKPD 200 Button pressed the ACL is released too if S Register 347 1 If S347 0 it is up to the user to release the ACL manually by AT HSGH or retain the ACL by doing nothing Headset gateway audio routing Audio in the headset profile is always referred to as a SCO connection which is used for bidirectional transmission of speech On a BTM5xx SCO audio is routed to the internal codec by default 315 can select the 12S interface in master or slave mode for SCO connections Refer to Americas 1 800 492 2320 78 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Routing audio streams over DS 2 6 5 2 11 AG status ATI64 Returns the status of the Audio Gateway HSP instance 0 not connected 1 ACL connected 2 Audio connected 5 Alerting HS by sending RING 6 Alerting HS by in band ringing 2 6 5 2 12 AG asynchronous messages CONNECT lt bd_addr gt lt uuid An ACL connection to headset has been established lt bd_addr UU 1112 incoming connection zl lt dir gt hex gt Bluetooth address of headset device hex 1108 outgoing connection lt dir gt lt gt V O optionally indicates the direction incoming outgoing Refer to 331 and UUIDs in CONNECT NO CARRIER messages FS8000 INT The int
148. e initiates a serial port connection The fully qualified string is in the form RING 012345678901 where 012345678901 is a 12 digit hexadecimal number corresponding to the remote device s Bluetooth address This response is sent to the host every 2 seconds until the host either accepts the connection with ATA or rejects it using ATH CONNECT 123456789012 1101 lt An SPP connection with Bluetooth device 123456789012 is established successfully The connection is initiated by the remote device incoming CONNECT 123456789012 1101 gt An SPP connection has with Bluetooth device 123456789012 is successfully established The connection is initiated by the local device outgoing Americas 1 800 492 2320 38 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 6 2 9 SPP S Registers S Registers for SPP are summarized in Table 2 10 Table 2 10 S Registers for SPP SO 0 1 15 Number of RING indications before automatically answering an incoming connection A value of 0 disables autoanswer A value of 1 enables autoanswer on the first RING and disables sending a RING CONNECT response to the host This emulates serial cable replacement Values gt O reset S Register 504 to 0 Values lt 0 set 504 to 1 If SO lt gt 0 and S100 lt gt 0 then SO must be set to lt 100 If a value is entered which violates this rule ERROR 29 is sent in res
149. ec CME ERROR me code gt is sent to HF if HF did enable this feature earlier Otherwise a simple ERROR is sent to HF Disable Enable In Band AT HFGBO 1 BSIR 0 or BSIR 1 is sent to HF SLC ring tone must exist and Bit 3 of S596 HFG supported features must have been set at boot time Ringtone signal must be provided by external circuit Set HFG supported S596 Bitmask features Bit O three way calling Bit 1 echo cancellation and or noise reduction function it 2 voice recognition function t 3 In band ring tone capability it 4 Attach a number to voice tag it 5 Ability to reject call it 6 Enhanced call status it 7 Enhanced call control it 8 Extended Error Result Codes ote Bit 0 Bit 4 of these settings are advertised in the Service Record of the HFG The default value is 0x68 which means Bit 3 Bit 5 and Bit 6 set After a new value was set the commands AT amp W and ATZ are required for the new value to become effective Make sure that Bit 6 is always set because this is a mandatory feature for HFP1 5 AG GG OO oO om om oO OO o Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth 106 Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module Select SCO audio 315 SCO audio interface select interface BTM5xx only 0 internal codec default 1 12S m
150. ects function mapping code or av_operation_id See also Table 2 53 BTM51x GPIO S Registers Table 2 53 BTM51x GPIO S Registers Mode for GPIO Config Registers S650 0 0 1 0 no mask 1 enable i o pin state Mask S651 GPIO1 GPIO Configuration S652 GRO Registers S653 GPIO3 S650 must be set to 0 to enable S654 GPIO4 SR configuration access S655 GPIO5 alternative Configures pin state S656 GPIO6 GPIO 0 OxFFFF om direction pin S657 GPIO7 usage and inversion notification wirina enable function S658 GPIO8 mapping select and function mapping code av_operation_id Americas 1 800 492 2320 139 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech con bluetooth BTM510 511 User Guide Bluetooth Multimedia Module See Table 2 52 S669 GPIO1 8 Ox0000 0 OXFF Enable strong bias strong pull up strong pull down mask if GPIO is configured as input 0x0001 GPIO1 0x0002 GPIO2 0x0004 GPIO3 0x0008 GPIO4 0x0010 GPIO5 0x0020 GPIO6 0x0040 GPIO7 0x0080 GPIO8 S670 GPIO1 8 Ox0000 0 OXFF Read Write all GPIOs in one atomic step Write operation only affects GPIOs configured as outputs 0x0001 GPIO1 Ox0002 GPIO2 0x0004 GPIO3 Ox0008 GPIO4 0x0010 GPIO5 0x0020 GPIO6 0x0040 GPIO7 Ox0080 GPIO8 GPIO function mapping And AVRCP GPIO Mapping Table 2 53 BTM51x GPIO S Registers Mode for GPIO Config Registers
151. ed if LED mode LED_PWM or LED_PULSE Set LED 1 PWM Period referenced if LED mode LED_PWM Set LED 1 Pulse Rate referenced if LED mode LED_PULSE S340 0 0 3 341 2048 0 4095 342 0 343 5 0 15 0 15 2 8 8 GPIO General Purpose Input Output On a BTM module a number of digital I Os can be used for general purposes To each GPIO pin an S Register is assigned S651 to S658 which allows configuration of GPIO settings and single pin read write Configuration of a GPIO comprises pin direction input output inversion enable notification enable function mapping select and function mapping code av_operation_id Refer to Figure 2 36 BTM51x GPIO configuration register and Table 2 50 for details To enable single pin read write mode set S650 to 1 This disables write and read access to configuration bit fields but allows read write access to the pin state flag 0x01 To enable configuration mode set S650 to 0 This allows read write access to the full GPIO configuration register including the pin state flag All logical GPIO lines can be read written in one atomic step by new S Register 670 at any time When a GPIO is configured as input a weak internal pull up or pull down resistance is enabled by default A strong pull up down strong bias can be enabled by setting the appropriate flag for a GPIO in S669 The direction of the resistance up down is determined by the pin state flag of the configuration register
152. ee asynchronous messages Response E lt cr gt lt lf gt OK lt cr gt lt lf gt immediately BTM accepting command And one of the following E lt cr gt lt If gt HF COPS lt mode gt lt operator_size gt lt operator gt lt cr gt lt lf gt refer to Hands free asynchronous messages lt cr gt lt If gt HF COPS OK lt cr gt lt lf gt Or lt cr gt lt If gt HF COPS ERROR lt cr gt lt lf gt 2 6 6 1 14 Enable Extended Error Codes in HFG CMEE 2_ 4 9 2 6 6 1 15 AT HFE1 Enable extended error result codes in HFG AT CMEE 1 is sent to the HFG HFG responds with OKT indicated at the HF by HF CMEE OK or ERROR indicated at the HF by HF CMEE ERROR Response lt cr gt lt lf gt 0K lt cr gt lt lf gt immediately BTM accepting command And one of the following lt cr gt lt lf gt HF CMEE OK lt cr gt lt lf gt confirmation from HFG or lt cr gt lt lf gt HF CMEE ERROR lt cr gt lt lf gt error e g not supported by HFG DTMF tone request 17_4 27 AT HFM lt x gt with lt x gt 0 9 A D Request a DTMF tone to be created by a connected HFG e g mobile phone The command AT VTS lt x gt is sent on the SLC Refer to HFP 1 5 specification feature 17 section 4 27 This command has been tested with an iPhone COD 515 200404 and a Samsung E250 2 6 6 1 16 Disable noise reduction echo cancellation in HFG 14_4 25 AT HFZ
153. efault 0 and is returned multiplied by 10 S590 is also affected Increment current output AT GOU Error 57 shall appear if maximum gain gain level level reached Decrement current output AT GOD Error 58 shall appear if minimum gain gain level level reached Query current output gain AT GO level Restore current output gain AT GOR level from S589 Save current output gain AT GOS level to S589 Americas 1 800 492 2320 124 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech con bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Increment current input AT GIU Error 57 shall appear if maximum gain gain level level reached Decrement current input AT GID Error 58 shall appear if minimum gain gain level level reached Query current input gain AT Gl level Restore current input gain AT GIR level from S590 Save current input gain AT GIS level to S590 2 8 1 1 1 Onboard Mic Input Gain S Register 415 controls a microphone preamplifier which adds extra 24 dB to input gain The amplifier is enabled by ATS415 1 and disabled by ATS415 0 Refer to Table 2 44 The first amplifier in Figure 2 30 represents the microphone preamplifier and the second amplifier represents the analogue component of the programmable audio input gain refer to Table 2 45 Switches shown for Line Mode S415 0 Bypass or 24dB gain 3dB to 18dB gain H 1 H H H H H H H H TEE DH H H UH UH
154. el and serial data SD_IN SD_OUT On a BTM5xx module there are separate data lines for in input and output for a total of four DS signals DS signals are mapped to the PCM pins of a BTM51x as outlined in Table 3 37 When connecting two devices via 12S one must be the I2S master and the other must be the 12S slave The 12S master provides SCK and WS signals output and the DS slave synchronises to these signals WS and SCK input S registers S314 A2DP and 315 SCO select the 12S role for a BTM51x I2S master I2S slave Table 2 42 BTM51x DS signal pin mapping SD_IN PCM_IN 3 5 I2S Serial data in SD_OUT PCM_OUT 4 7 I2S Serial data out WS PCM_SYNC 5 6 12S Word select right left ch SCK PCM_CLK 6 4 I2S clock GND 1 2 3 4 9 22 13 47 10 GND 2 8 2 1 1 12S MCLK In addition to the 12S signals mentioned above many external codec ICs require a high frequency master clock MCLK Typically this clock is a multiple integer of the sampling rate f e g 128 f 192 f 256 f 384 f 512 f and so forth Unfortunately BTM51x cannot provide such MCLK signal Laird recommends you select an external codec IC which has the capability of creating the MCLK internally from the bit clock signal SCK Such capability is referred to as PLL phase locked loop or FLL frequency locked loop functionality of the codec device 2 8 2 1 2 12S example This section describes an example where the DS interface of a BTM5xx is used as
155. endly name displayed in the inquiry response this option can significantly lengthen the inquiry process In areas with a large number of discoverable Bluetooth devices it might become nearly impossible to find a particular device An optimal solution would be a first inquiry scan without friendly name and lt dev_class gt filter In a second run the friendly name is queried by AT BTF lt BdAdar gt for each device found Bit 7 6 5 4 3 2 1 0 Reserved for future usage EIRD RSSI FN COD ADR Default 0 0 0 0 0 0 0 1 Figure 2 1 S Register 330 controlling inquiry response format Table 2 2 Field Descriptions for S Register 330 0 ADR Bluetooth device address 1 display Bluetooth device address on inquiry result 0 do not display Bluetooth device address on inquiry result If any further bit is set a comma is inserted as separator 1 COD Class of device 1 display class of device on inquiry result 0 do not display class of device on inquiry result If any further bit is set a comma is inserted as separator 2 FN Friendly name 1 display friendly name on inquiry result 0 do not display friendly name on inquiry result If any further bit is set a comma is inserted as separator 3 RSSI Receiver signal strength indicator RSSI 1 display RSSI value on inquiry result 0 do not display RSSI value on inquiry result If any further bit is set a comma is inserte
156. eout in s This value must be at least 60 in order to meet the recommendation of BT2 1 specification 2 5 6 9 Asynchronous SSP messages Americas 1 800 492 2320 24 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Table 2 7 lists asynchronous messages which occur if MITM is enabled The sent message depends on the combination of the IO capabilities of both ends The combination of IO capabilities of both devices may be insufficient for MITM protection In that case the pairing fails PAIR 2 lt BdAddr gt Refer to Table 5 6 in BT2 1 EDR specification 1 vol3 Generic Access Profile for sufficient combinations of lO capabilities for MITM authenticated link key Americas 1 800 492 2320 25 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Table 2 7 Asynchronous messages for SSP PAIR lt BdAddr gt lt friendlyname gt lt Passkey gt Example PAIR 0016A4000002 Laird BTM 000002 863611 Passkey compare request Prompts the user to compare the passkey displayed on both ends and to confirm a match by AT BTBY at both ends or reject by AT BTBN to deny a match PASSKEY lt BdAddr gt lt friendlyname gt Example PASSKEY 0016A4000001 Laird BTM 000001 Passkey request Prompts the us
157. er to enter the passkey displayed by the remote device Use AT BTB lt passkey gt example AT BTBO12345 see 1 below PAIR N lt BdAddr gt lt friendlyname gt lt Passkey gt Example PASSKEY N 0016A4000002 Laird BTM 000002 164585 Passkey notification Display BdAddr friendly name and passkey to user Prompts the user to enter the passkey from this message at the remote device s numeric keyboard PAIR O lt BdAddr gt lt nn gt Successfully paired with device of lt BdAddr gt lt nn gt optional indicates the status of automatic storage to trusted device list Value O success Settings are controlled by S325 to 328 Refer to Automatic storage of link keys PAIR 1 lt BdAddr gt Pairing timeout PAIR 2 lt BdAddr gt Pairing failed PAIR 3 lt BdAddr gt Pairing failed too many repeat attempts PAIR 4 lt BdAddr gt Pairing rejected by remote device PAIR 5 lt BdAddr gt Pairing failed unit keys not supported PAIR 6 lt BdAddr gt Pairing failed SSP not supported PAIR 7 lt BdAddr gt Pairing failed already busy with pairing 1 If both devices have a KeyboardOnly capability no pass key can be displayed In that case the user is required to invent and enter the identical 6 digit numeric passkey at both ends 2 5 7 AT Commands for Legacy Pairing 2 5 7 1 AT BTW lt bd_addr gt Initiate Pairing Provided the remote device is a Bluetooth 2 0 device
158. ericas 1 800 492 2320 189 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth
159. ernal codec is configured for a sampling frequency of 8000 Hz HSG AU1 Audio connection SCO is established audio on HSG AUO Audio connection SCO has been released audio off HSG B AT CKPD 200 Button pressed was received from HS HSG VGSn AT VGS n with was received from HS speaker gain setting The valid range for n is 0 15 HSG VGMn AT VGM n with was received from HS microphone gain setting The valid range for n is 0 15 NO CARRIER 1112 ACL connection to local AG instance has been released See UUIDs in CONNECT NO CARRIER messages as well 2 6 5 2 13 AG HSP summary HSG Table 2 28 Audio gateway role HSP Summary of 5 Registers and AT Commands Americas 1 800 492 2320 79 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Enable HSP AG role 102 0x08 AG role of HSP bitmask Must issue AT amp W and atz to activate Initiate SLC from AG AT HSGD lt bd_addr gt Responses HSP successful CONNECT 123456789012 1108 gt failed NO CARRIER wrong state ERROR 63 profile disabled ERROR 59 Alert HS by RING or AT HSGC An existing SLC is required RING in band ringing in band ringing is controlled by 346 Automatic alerting is set using 345 Cancel alerting before ATAH
160. es AT amp W and ATZ for new values to become effective 1 48 kHz 2 44 1 kHz 4 32 kHz 8 24 kHz 16 22 05 kHz 32 16 kHz 1 A2DP Source at least one of these sampling frequencies 48kHz 44 1kHz must be supported A2DP Sink both 48 kHz and 44 1 kHz must be supported at least 2 values ignored as they are not supported by SBC neither by APTx S415 0 0 1 Enable Microphone Input Gain adds extra 24 dB to input gain S419 6 0 6 Set sampling rate for Audio Loopback 0 8 kHz 1 11 025 kHz 2 16 kHz 3 22 050 kHz 4 24 kHz 5 32 kHz 6 44 1 kHz 589 15 0 22 Codec output gain level index of gain table 590 15 0 22 Codec input gain level index of gain table S689 0 450 215 Set codec output gain in dBr 10 applies to sink default 0 S690 0 450 215 Set codec input gain in dBr 10 applies to source default 0 335 0 0 3 Set LEDO mode O LED_OFF 1 LED_ON 2 LED_PWM 3 LED_PULSE 336 2048 0 4095 Set LED O Duty Cycle referenced if LED mode LED_PWM or LED_PULSE 337 0 0 15 Set LED O PWM Period referenced if LED mode LED_PWM 338 5 0 15 Set LED O Pulse Rate referenced if LED mode LED_PULSE Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth 136 Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module Set LED1 mode O LED_OFF 1 LED_ON 2 LED_PWM 3 LED_PULSE Set LED 1 Duty Cycle referenc
161. eseeteeeeeeetieeenteeens 147 2 9 17 RI dependent Start Up Mode 147 2 9 18 Reset Via BREAK 00 2 0 cece eee eeeeeeeeeceee eee eee cece eee e eee t EEEE eect ect cae a eae aa aaaeaaeeeeeeeeeeeeeeeeeeeeteeeeeeeees 147 2 9 19 Append Bluetooth Address to Friendly Name sssisesiisseiieseeieererrrrrisrerssrrrererre ren 148 2 9 20 Three digit Error RESPONSES ccceceeeeeeeeeeeeeeeeeeceeeeeeceeeeceaeeesceaeeeseneeeesieeeeneeeeteas 148 2 9 21 ATI 54 55 56 status information for all profiles 00 0 ccc ccccsccccsseeeesseeeeessseeessseeeeens 148 Americas 1 800 492 2320 4 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 9 22 Management of persistent store oo cece cee eceeee cece cence eeeeeeeeeeeneeeeneeeeteeeteeetieeentteens 149 2 9 23 AT SR lt role gt lt pm gt Setting HCI role master SlaVe oo ccccccccccsececssateeessseeessteeeeens 150 29 2 Ar EMC VOOM deet Ehe Eden 151 2 DDR eebe 152 Bel 5 REQISUCNS a A E A 152 EE Ee en dn E 168 33 HEPO RESPONSES Ree EE ee EE 173 3 4 Status IDS autOMatiON iciisitsccccsddeisiesevdesiae lead a AT aa A Eaa E EEA a ENE A 176 3 5 LED blink pattern IDs status pndicaton 177 Eeer 177 EEN ProfileM ask as per S102 EE 178 ERC 178 4 Related Documents and Files o2 lt ccccs ccneccssisisnwnntnact ENEE ienad adewesdecehedstce seaadcbesuudesehaesdssaesslienabersere dans 179 A
162. est LED blink pattern x Led ID O zero LEDO 1 LED1 y blink pattern ID see Americas 1 800 492 2320 119 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Table 2 39 This command can evaluate and find a suitable blink pattern Example AT SILO 9 pulse medium for LEDO 2 7 4 5 LED indication example When not discoverable not connectable the LED should flash slowly just to indicate that the module is powered When any scanning is enabled discoverable only 2 or connectable only 4 or both 8 the LED should blink fast 2 Note that scanning status IDs can be added in order to cover multiple scanning states in one tuple For this example the value is 2 4 8 14 Finally when any profile is connected 16 the LED shall pulse slowly 10 and when AudioOn 17 the LED shall be permanently on 1 The resulting tuples are summarised in the following table Americas 1 800 492 2320 120 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Table 2 39 LED status indication example Not connectable not discoverable 1 Flash slowly 7 1 7 Discoverable Connectable Both 14 Blink fast 2 14 2 Connected 16 Pulse slowly 10 16 10 AudioOn 17 On permanently 1 17 1 The resulting command for LEDO is ATS744
163. et new records are automatically created and inserted at top of the ACR table All field values of the new ACR are retrieved from the new connection except reconnect interval and option flags The default reconnect interval is fixed to 5s and option flags are copied from 373 Americas 1 800 492 2320 112 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 7 1 6 373 default ACR option flags These flags populate the ACR option field when the auto add flag is enabled in 370 Range 0 7 BitO always re connect 0x01 Bit always send AVRCP play 0x02 Bit2 never send AVRCP play 0x04 f neither Bn nor Bit2 is set AVRCP play is sent intelligently on auto reconnect depending on certain conditions AVRCP version 1 0 doesn t support updating the play status at the controller end Therefore sending AVRCP play may be unexpected in some cases This feature is experimental and can be disabled by setting Bit2 2 7 2 Auto connect service ACS Auto connects service is a prerequisite for the auto connect feature Auto connect service ACS is an entity in firmware which caters to required actions such as initiating attempt cycles monitoring connect disconnect events updating the ACR table and more ACS can be started by AT command AT ACS1 or at boot time by setting BitO of 370 There are preconditions w
164. f gt OK lt cr lf gt In this case the command AT BTX may put the device into the correct idle mode 2 5 1 15 ATin Information This returns the information about the Laird Technologies device and its status Refer to Table 3 2 Appendix for a complete list of supported ATIn parameters For recognised values of n Response lt cr lf gt As Appropriate lt cr lf gt OK lt cr lf gt For unrecognised values of n Response lt cr lf gt Laird Technologies Inc UK 2009 lt cr If gt 2 5 2 AT Commands for S Registers As with modems the Bluetooth module employs a concept of registers which are used to store parameters such as escape sequence character or inquiry delay time For a list of general S registers refer to General S Registers and Table 3 1 S registers associated with a particular profile or specific functions are described in the appropriate profile section of this document The following AT commands edit the values of S registers 2 5 2 1 ATSn m Set S Register The value part m can be entered as decimal or hexadecimal A hexadecimal value is specified via a leading character For example 1234 is a hexadecimal number When S register values are changed the changes are not stored in non volatile memory UNTIL the AT amp W command is used Note that AT amp W does not affect S registers 520 to 525 or 1000 to 1010 as they are updated in non volatile memory when the command is received 2 5 2 2 ATSn Read
165. fining discoverability and connectability See description for S Registers 565 to 569 inclusive for more details For example the feature may allow a device to make an outgoing connection if RI is in one state and await an incoming connection in the other state 2 9 18 Reset via BREAK The module can be reset by sending a BREAK signal A BREAK signal exists when the module s UART_RX input is in a non idle state Ov for more than 125 milliseconds Ezurio Terminal provides a BREAK capability which can reset a connected module by ticking and un ticking the BRK field See Figure 2 39 Americas 1 800 492 2320 156 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Pluto Terminal Yer 6 7 2 CTS DSR OCO RI RTSY DTR Open j COM15 90uu d 8 1 lol x APTURE Echo Clear Data Transfer Test Figure 2 39 BREAK capability in Ezurio Terminal 2 9 19 Append Bluetooth Address to Friendly name If S Reg 593 is set to 1 the last 6 hex digits of the Bluetooth address are automatically appended to the friendly name This differentiates multiple devices with the same name in a neighbourhood 2 9 20 Three digit Error Responses As of firmware version 18 1 4 0 BTM51x 08 error codes are presented as 3 decimal digits with leading zeroes by default For backward compatibility clear bit 2 0x04 of S559 to use legacy two digi
166. for all devices and connectable for only the device with the Bluetooth address lt bd_addr gt Connection requests from any other devices are rejected If lt bd_addr gt is 000000000000 incoming connections are accepted from any device This is as per AT BTP but without an address The setting is valid until the next reset or power cycle unless not changed by any other AT command subsequently For permanent discoverable connectable settings refer to 512 and AT BTM lt bd_addr gt Response lt cr lf gt OK lt cr If gt 2 5 10 2 A7 B7TG lt bd_addr gt Make Device Selectively Connectable Only Make the module connectable only to the device with the Bluetooth address lt bd_addr gt Connection requests from other devices are rejected If the specified address is 000000000000 incoming connections are accepted from any device This is as per AT BTP without an address The module is not discoverable Americas 1 800 492 2320 ER Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module The setting is valid until next reset or power cycle unless changed by any other AT command thereafter For permanent discoverable connectable settings refer to S Register 512 and AT BTM lt bd_addr gt Response lt cr If gt OK lt cr f gt 2 5 10 3 A7 B7M lt bd_addr gt Set Incoming Peer Address non vol mem This command stores a peer address for in
167. functions cannot be configured by S Registers Therefore contact Laird if Wi Fi coexistence is required The following table lists GPIOs and their alternative functions Table 2 51 BTM51x GPIO Alternative Functions GPIO1 BT_Active GPIO2 DCD GPIO3 DSR GPIO4 RI GPIO5 BT_State BT_Priority GPIO6 Wlan_Active GPIO7 Rf_Active GPIO8 DTR 1 Alternate function for modem control lines is fixed A modem control line cannot function as GPIO 2 Recommended pin assignment not configurable by S Registers contact Laird if coexistence is required 3 BT_Active RxEnable OR TxEnable Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 function mapping code reserved FMS NEN INV DIR PS av_operation_id Default 0 0 0 0O O0 0 o 0 0 o 0 OU 0 0 0 0 Figure 2 36 BTM51x GPIO configuration register Table 2 52 BTM51x GPIO Configuration Register Field Descriptions O PS I O Pin State returns the current state of the I O pin 0 1 when read A write affects the 1 0 pin directly if DIR 1 and FMS 0 FMS_NONE 1 DIR Direction controls if the I O pin is an input or an output O input 1 output 2 INV Inversion controls if the I O pin is inverted or not Applies to both pin directions read and write 0 not inverted 1 inverted Americas 1 800 492 2320 138 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 w
168. ge RX lt string gt Outgoing data is sent by ATX lt string gt or ATY lt string gt With this approach you may manage several non SSO connections e g A2DP AVRCP and one SSO connection SSP or DUN An attempt to simultaneously connect a second SSO profile returns Error 65 Americas 1 800 492 2320 28 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Any incoming SSO connection request is also rejected if one SSO is already connected The following section describes AT commands related to SSO profiles 2 5 9 1 AIX lt string gt Send Data in Local Command and Connected Mode This command sends data to the remote device when in local command and connected mode The parameter lt string gt is any string not more than 29 characters long whereby a non printable character nh see below counts 3 characters This restriction results from the maximum AT command length which is 34 query by ATI15 The difference of 5 is caused by ATX 3 characters and the enclosing quotation marks 2 characters If the maximum string length is exceeded this generates ERROR 05 syntax error If a non visual character is to be sent then insert the escape sequence hh where hh is two hexadecimal digits The 3 character sequence hh is converted into a single byte before transmission to the peer Response lt cr lf gt OK lt cr If gt Or l
169. gital MO cable replacement variant uses the AVRCP profile It is suitable if all GPIOs have the same direction and if AVRCP is not used for its primary purpose or with a non BTM5xx module GPIOs on the AVRCP controller are configured as inputs and GPIOs on the AVRCP target are configured as outputs An AVRCP operation ID is selected on the controller side and on target side for each GPIO This allows a free assignment of inputs and outputs not fixed to the index of a GPIO pin Even identical AVRCP operation IDs are allowed for different GPIOs enabling e g one GPIO input on the controller to drive two or more outputs on the target or vice versa An SPP link is not required but an AVRCP link is Furthermore it may be confirmed on the UART if a transition was successfully received by the target See the AVRCP section for details If an additional SPP connection is required for serial data transmission beside the GPIO this is possible with the GPIO AVRCP approach GPIOs mapped to the alternative function modem control cannot be used for this variant of digital I O cable replacement See Digital Cable Replacement by RFC Modem Control Signals 2 9 3 3 Digital Cable Replacement by RFC Modem Control Signals This digital I O cable replacement variant uses signals defined in the RFCOMM specification O RTC RTR IC DV The primary purpose of these signals is the transmission of digital I O signals simultaneously with serial data over the same wireless
170. gt Response if rejected NO CARRIER 110E Close only AVRCP AT AVH or Response connection ATH110E NO CARRIER 110E if connection has existed and 329 0 NO CARRIER if connection has not existed and 329 0 Close all ATH Response connections NO CARRIER lt profileUUID gt for each profile that was previously connected see Disconnecting Profiles Send remote AT AVC lt operatio lt operation_id gt see Table 2 20 control command __n_id gt lt state gt lt state gt optional 0 Button pushed Control 1 Button released Response on command completion AVPTC lt n gt lt operation_id gt lt state gt hex Send a Unit Info AT AVU request Control Response on command completion AVUR lt n gt lt unit_id gt lt unit_type gt lt company_id gt Successful if lt n gt 0 hex Send a Subunit Info AT AVS request Control incomplete Response on command completion AVSR lt n gt lt page gt lt pagedata gt lt cr lf gt Successful if lt n gt 0 only first word of the pagedata is being displayed in the AVSR response message hex Set Company Id S303 0 OxFFFFFF Target IEEE Company ID 24bit hexadecimal Required for UNIT INFO Response in AVRCP target mode default value is OXFFFFFF Enable Unit Info 305 0 1 Response Target 0 reject incoming Unit Info Requests 1
171. h Multimedia Module 2 6 5 1 6 2 6 5 1 7 Routing audio streams over DS Headset asynchronous messages CONNECT lt bd_addr An ACL connection to headset has been established gt lt uuid gt lt dir gt hex lt bd_addr gt Bluetooth address of headset device UU 1108 incoming connection 1112 outgoing connection lt dir gt lt gt O optionally indicates the direction incoming outgoing Refer to 331 and UUIDs in CONNECT NO CARRIER messages HS RING HS has received a RING indication from the connected audio gateway HS is expected to respond with AT CKPD 200 see AT HSB FS8000 NT The internal codec is configured for a sampling frequency of 8000 Hz HS AU1 Audio connection SCO has been established audio on HS AUO Audio connection SCO has been released audio off NO CARRIER 1108 ACL connection to local HS instance has been released Note UUIDs in CONNECT NO CARRIER messages as well Headset summary Table 2 27 Headset role HSP Summary of S Registers and AT Commands Enable HSP HS role S102 0x02 HS role of HSP bitmask needs subsequent AT amp W and atz to activate Initiate ACL from AT HSD lt bd_addr gt Responses headset successful CONNECT 123456789012 1112 gt failed NO CARRIER profile disabled ERROR 59 incorrect state ERROR 63
172. h time window For input FMC 0x11 the following rules apply A time window can be set by 371 in seconds f S371 is zero the module remains discoverable and connectable until changed by another AT command f S371 is greater than zero the module reverts automatically to not discoverable and not connectable on timeout H auto connect service ACS is running while FMC 0x11 is performed button pressed ACS is suspended before turning connectable discoverable On subsequent window timeout 371 gt 0 ACS is resumed 371 range 0 900 default value 0 unit seconds Granularity of this 371 Americas 1 800 492 2320 121 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 4 if value is lt 60 round up 60 if value is gt 60 round down See section 2 8 8 1 for details on how to configure GPIO function mapping codes 2 7 5 Example for host less operation This section gives an example for host less operation of a typical headset or wireless speaker use case It demonstrates the following automation features automatic ACR ACS mode making discoverable connectable by GPIO status indication by LED dynamic registers AT amp F Factory default ATS515 200400 Set class of device ATS370 7 Start AC service at boot time Stop ACS by DSR Auto add new connections to persistent ACR
173. hich must be met before ACS may start Not discoverable not connectable No inquiry in progress No pairing in progress Legacy SPP auto connect disabled AT BTR ACR table not empty except automatic host less mode by 370 Bit2 1 An appropriate error message identifies if a condition is not met ATI73 or AT ACS return the status of ACS Refer to description of ATI73 for values 2 7 2 1 ACS parser limitation Once ACS is running a limited number of AT commands is available All ATI commands AT AC ATO AT HSB Any other command returns ERROR 109 To re enable parser functions ACS must be stopped 2 7 2 2 370 ACS configuration S370 allows configuration of auto connect service as follows 370 Auto Connect Service mode bitmask BitO start AC service at boot time Bit1 stop AC service by de asserting DSR Bit2 auto add new connections to ACR table reconnect interval 5s auto hostless ACR mode S370 range 0 7 default value 0 unit bitmask Americas 1 800 492 2320 113 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 7 2 3 AT ACSn Start Stop ACS AT ACSn start stop auto connect service ACS pl stop service n 1 start service if nis missing n 0 is assumed hence AT ACS stop service In order to stop ACS one can either enter AT ACSO or de assert DSR pr
174. hone with AAC enabled If BTM51x remains master regular drops in the audio stream are observed After requesting slave role for BTM51x the issue is solved The following AT command allows control of HCI role AT SR lt role gt lt profile_mask gt request local HCI role for one given profile lt role gt Mi for master S for slave Example AT SRM 0001 request local master for SPP profile Example AT SRS 0001 request local slave for SPP profile As the role change request can be rejected by the remote device there is no guarantee that the request will be successful Check the outcome by ATI56 100ms delay between AT SRx and ATI56 is recommended ERROR 04 profile is not connected ERROR 05 more than one flag is set in the profile mask or other syntax error Itis also possible to configure automatic request of master or slave role as soon as a profile has connected 368 set SLAVE role on connect Parameter profile mask like 102 For each profile enabled in S368 whenever the profile connects local slave role is requested regardless of the connection s direction incoming outgoing When writing 1 to a profile flag which is already set in S369 the flag is cleared in S369 Check local HCI role for each profile ATI56 Range 0 1FF 369 set MASTER role on connect Parameter profile mask like 102 For each profile enabled in S369 whenever the profile connects master role for BTM51x is requested
175. icates which service this phone number relates to Shall be either 4 voice or 5 fax HF BSIR 0 HFG has disabled In Band Ring tone capability BSIR 0 was received on SLC HF BSIR 1 HFG has enabled In Band Ring tone capability BSIR 1 was received on SLC HF CNUM OK HFG has replied with OK to reception of AT CNUM subscriber number information query HF CNUM ERROR HFG has replied with ERROR to reception of AT CNUM subscriber number information query This may be because this feature is not supported by the HFG z HF COPS m ss Operator Response to a AT COPS request received from HFG Americas 1 800 492 2320 89 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module m contains the current mode and contains no information with regard to the name of the operator ss size of the operator name in characters Operator the name of the network operator in alphanumeric format HF COPS OK HFG has replied with OK to reception of AT COPS HF COPS ERROR HFG has replied with ERROR to reception of AT COPS HF CMEE OK HFG has replied with OK to reception of AT CMEE 1 HF CMEE ERROR HFG has replied with ERROR to reception of AT CMEE 1 HFl lt gt Indicator CIEV from audio gateway was received Refer to
176. ing connection is basically an agreement between the slave and its master that data packets are only be exchanged for N timeslots every M slots The slave can then assume that it will never be contacted during M N slots and so can switch its power hungry circuitry off The specification further specifies a third parameter called timeout T which specifies extra timeslots that the slave agrees to listen for after receiving a valid data packet If a data packet is received by the slave then it knows that it MUST carry on listening for at least T more slots If within that T slot time period another data packet is received the timer is restarted This ensures low idle power consumption at the expense of latency When there is a lot of data to be transferred it acts as if sniff mode were not enabled During sniff mode a slave listens for N slots every M slots The Bluetooth specification states that a master can have up to 7 slaves attached with all slaves having requested varying sniff parameters It may be impossible to guarantee that each slave has its M parameter granted In light of this the protocol for enabling sniff mode specifies that a requesting peer specify the M parameter as a minimum and maximum value This allows the master to interleave the sniff modes for all slaves attached For this reason sniff parameters are specified in the BTM module via four S registers S Register 561 specifies N S Register 562 specifies T
177. io connected 8 In call no SLC 2 6 6 2 17 HFG Call Records The HFG maintains call records for all calls Even when no HF is attached to the HFG no SLC existing the HFG needs to be aware of all ongoing calls in order to send the correct HFP indicators as soon as an HF connects Also it is mandatory for the HFG to respond to a current call list request issued by the HF AT CLCC 21a_4 31 1 The HFG queries its internal list of current calls and replies automatically to AT CLCC The list of current calls is displayed to the host by AT HFGC AT commands beginning with AT HFGC change the state of a call record AT HFGC List all current calls 354 controls verbose mode and is detailed below The response for each call record if it exists is as follows lt cr lf gt lt idx gt lt dir gt lt call_status gt lt call_mode gt lt fmultiparty gt lt number_string gt lt number_type gt With idx unique index of call 1 digit dir O gt for outgoing call 1 lt for incoming call call_status 0 active 1 held 2 dialling outgoing 3 alerting outgoing 4 incoming incoming and ringing 5 waiting incoming and waiting whilst another call is active call mode 0 voice 1 data 2 fax fmultiparty 0 call is point to point p 1 call is part of multiparty m Americas 1 800 492 2320 101 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610
178. it 6 Enhanced call status Bit 7 Enhanced call control Bit 8 Extended Error Result Codes Note Bit 0 Bit 4 of these settings are advertised in the Service Record of the HFG The default value is 0x68 Bit 3 Bit 5 and Bit 6 set After setting a new value the commands AT amp W and ATZ are required for the new value to become effective Ensure Bit 6 is always set This is mandatory for HFP1 5 AG S650 0 0 1 GPIO GPIO pin state mask O no mask enable configuration bit fields 1 enable I O pin state Mask disable configuration bit fields Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth 176 Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module S651 GPIO1 S652 GPIO2 d GPIO Configuration Register S650 must be set to 0 to eee Depending on GPIO3 enable configuration access S654 alternative 0 ffff GRO Controls pin state pin direction pin inversion notification S655 GPIO usage BTM51x GPIOS enable function mapping select and function mapping S656 and wiring GPIO6 code av_operation_id ee See Table 2 52 S657 GPIO7 S658 GPIO8 S669 0000 0 ff GPIO Enable strong bias strong pull up pull down mask if GPIO is configured as input 0x0001 GPIO1 0x0002 GPIO2 0x0004 GPIO3 0x0008 GPIO4 0x0010 GPIO5 0x0020 GPIO6 0x0040 GPIO7 0x0080 GPIO
179. king DUN 0x1105 OBEX Object Push 0x1106 OBEX File Transfer 0x1108 Headset Profile HSP Headset 0x110A A2DP Audio Source 0x110B A2DP Audio Sink 0x110C AVRCP Remote Target 0x110D A2DP Ox110E AVRCP 0x110F AVRCP Remote Controller 0x1112 Headset Profile Audio Gateway Ox111E Hands free Profile HFP Hands free unit Americas 1 800 492 2320 186 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech con bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 0x111F Hands free Profile HFP Audio Gateway 3 7 Profile Mask as per 102 Table 3 7 below lists the profile mask as defined per S102 Table 3 7 Profile mask as per 102 SPP 0001 HS 0002 HSG 0008 HF 0010 HFG 0040 A2DP 0080 AVRCP 0100 3 8 1 2 3 References Bluetooth Specification Version 2 1 EDR vol3 26 July 2007 https Awww bluetooth org Technical Specifications adopted htm click on Core Specification v2 1 EDR Advanced Audio Distribution Profile Specification Rev V12 16 04 2007 https www bluetooth org Technical Specifications adopted htm scroll down to section Traditional Profiles Qualifiable gt A2DP adopted version 1 2 Audio Video Remote Control Profile Revision 1 0 22 05 2003 https Awww bluetooth org Technical Specifications adopted htm scroll down to section Traditional Profiles Qualifia
180. l Control currently not supported Note Bit O Bit 4 of these settings are advertised in the Service Record of the HF Only CLIP presentation capability Bit 2 0x04 is supported in the BTM module After setting a new value to this S register the commands AT amp W and ATZ are required for new value to become effective S584 0 0 1 n a Enable Disable eSCO When changing the unit returns ERROR 14 the device is either in or waiting for a connection The new value cannot be accepted If in a connection drop it and then issue AT BTX and then set the new value If waiting issue AT BTX prior to setting the register 588 0 After a disconnection perform a cold reset S589 15 22 Audio Set output gain level See Gain Table S689 is also affected 590 15 KR Audio Set input gain level See Gain Table S690 is also affected O O 9 592 0 Set this to 1 to reduce the trusted device database to just one record when pairing auto save is enabled via S reg 538 593 0 0 1 n a Automatically append last six digits of local Bluetooth address to the Friendly name set via AT BTN or AT BTF 596 104 0 511 HFP HFG Set HFG supported features Bitmask Bit O three way calling Bit 1 echo cancellation and or noise reduction function Bit 2 voice recognition function Bit 3 In band ring tone capability Bit 4 Attach a number to voice tag Bit 5 Ability to reject call B
181. le the four scanning states not connectable not discoverable discoverable only connectable only discoverable and connectable are mutually exclusive as only one of these states can be entered at a time Other states are characterised by particular parameters e g a profile mask The connected state for instance can be determined for each profile Audio on state can be refined by parameters audio type SCO A2DP or audio direction source sink for A2DP Furthermore there are transitional states such as inquiring pairing connecting ringing etc Hence a huge tree of possible states exists creating the need for simplifications in announcing status indication for ACS As a result only the following states were chosen for indication The four scanning states inquiry page scanning discoverable connectable Connected any profile AudioOn any audio type direction Rather than specifying a profile the Connected state is regarded as TRUE when any profile is connected The AudioOn state is regarded as TRUE whenever the audio circuit is turned on regardless of audio type or direction See Table 2 37 for a summary Table 2 37 ACS Status Summary Not connectable Not discoverable Discoverable Discoverable Connectable 1 2 4 Connectable 8 1 1 6 Connected any profile 7 AudioOn any audio type Americas 1 800 492 2320 E Laird Technologies Europe 44 162
182. link These digital I O signals can be categorized as handshaking Americas 1 800 492 2320 146 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module signals managing send and receive buffers of serial data RTS CTS and modem control signals managing the status of a modem DTR DSR DCD RI The handshaking signals should not be touched but modem control signals can be used for digital I O cable replacement if not otherwise needed In fact modem control signals already control or signal many states on a BTM module particularly in SPP connections These uses include changing from connected to command mode dropping an SPP link by DSR or indicating an SPP connection by DCD see 507 If features like these are not needed for the application RFC control signals can be used for cable replacement Configuration takes place by 551 and 552 Refer to the S Register reference table in 3 1 An SPP link is required for this to be working and the SPP link can still transmit serial data 2 9 3 4 Digital Cable Replacement by mixed variants The fixed mapping of modem control lines to GPIOs reduces the number of free configurable GPIOs by 4 But it is possible to mix the RFC approach with GPIO AVRCP or GPIO FMC to achieve a higher number of GPIOs to be utilized for digital cable replacement 2 9 3 5 Pure Cable Replacement The term pure cable repla
183. ll UART RX traffic is discarded in absence of a connection while DSR is asserted If DSR is not asserted then it behaves exactly as per mode 2 When set to 6 it will be like 3 but all UART RX traffic is discarded in absence of a connection while DSR is asserted If DSR is not asserted then it behaves exactly as per mode 3 When set to 7 it is like 4 but all UART RX traffic is discarded in absence of a connection while DSR is asserted If DSR is not asserted then it behaves exactly as per mode 4 Note that by implication a change to this can only be seen after a power cycle 514 10 n a Pairing Timeout in seconds This includes the time a host takes to supply the PIN number when PIN messages are indicated 515 001FOO 000000 FFFFFF n a Default Device Class Code When queried the value is always printed as a hexadecimal number To change the device class of the module temporary and immediately without power cycle use the command AT BTC To change the device class of the module permanently write the new value to this S Register ATS515 lt devclass _ gt save the setting AT amp W and hex Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech con bluetooth 169 Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module initiate a power cycle ATZ S516 00000 0 n a Default Device Class filter to be used with AT BTI when it is 0
184. location The flash segment fills up with each write or delete operation to persistent store At some point the segment becomes full and write delete operations fail causing error messages e g ERROR 011 or ERROR 102 The firmware has a built in mechanism to recover from this state on a power cycle reset ATZ If the remaining free space of the current segment is below a certain limit the flash segment is defragmented and copied to a free segment Due to this defragmentation which clears out all invalidated data free space in the segment becomes available From now on the new segment is being used for all operations read write delete Finally the old segment is deleted to prepare for the next defragmentation copy cycle 2 9 22 2 AT NVQ F commands to manage persistent store BTM5 1x firmware provides AT commands allowing management of persistent store AT NVQ query the remaining space in current segment Americas 1 800 492 2320 158 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module AT NVF flood the remaining space of current segment On next power cycle ATZ a defragmentation cycle occurs 2 9 22 3 Commands implying persistent store usage The following operations and commands use persistent store Write delete auto connect records AT ACW AT ACRn AT ACDn AT ACD Write dynamic registers S744 S745 Write E
185. lt uuid gt gt 111E if it is an incoming connection 111F if it is an outgoing connection lt dir gt lt gt V O optionally indicates the direction incoming outgoing Refer to S331 and UUIDs in CONNECT NO CARRIER messages HF RING HF has received a RING indication from the connected audio gateway HF is expected to respond with ATA answer see AT HFCA or AT CHUP see AT HFCH HF ERROR HF has received ERROR from the connected audio gateway This can be due to a request for memory dialing with invalid memory location AT HFC gt mmm or a request to redial the last number AT HFDL There is no last number available in the AG if this error appears FS8000 NT The internal codec is configured for a sampling frequency of 8000 Hz HF AU1 Audio connection SCO has been established audio on HF AUO Audio connection SCO has been released audio off HF CLIP OK HFG has replied with OK to reception of AT CLIP 1 or AT CLIP 0 HF CLIP ERROR HFG has replied with ERROR to reception of AT CLIP lt gt HF CLIP n m 1234567 Americas 1 800 492 2320 88 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module A calling line identification notification CLIP 1234567 lt type gt
186. mericas 1 800 492 2320 5 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 1 OVERVIEW The BTM510 and BTM511 are low power Bluetooth modules designed for adding robust audio and voice capabilities Based on the market leading Cambridge Silicon Radio BCO5 chipset these modules provide exceptionally low power consumption with outstanding range Supporting Bluetooth v2 1 EDR specification these modules provide the important advantage of secure simple pairing that improves security and enhances easy use At only 14 mm x 20 mm the compact size of the BTM510 is ideal for battery powered or headset form factor audio and voice devices With a 16 bit stereo codec and microphone inputs to support both stereo and mono applications these modules also contain a full integrated Bluetooth qualified stack along with SPP HFP 1 5 HSP AVRCP and A2DP profiles Customers using these modules may list and promote their products free of charge on the Bluetooth website The BTM510 511 modules include an embedded 32 bit 64 MIPS DSP core within the BCO5 This is integrated with the Bluetooth functionality which allows designers to add significant product enhancements including features such as echo cancellation noise reduction and audio enhancement using additional soft codecs The availability of the 16MB of flash memory in the module allows complex functionalit
187. module BT2 1 General bonding does not work if initiated by the legacy device Instead the legacy device must initiate dedicated bonding first pairing BISM2 AT BTW lt BdAddr gt After successful pairing the connection can be initiated by the legacy device BISM2 ATD lt BdAddr gt 2 9 16 Factory Default UART Baud Rate BTM devices may operate at a very wide range of baud rates S Registers 520 and 521 set the baud rate As long as BAUDRATE 0 004096 produces an integer there is 0 error in clocking for that baud rate It is possible to set a baud rate that a PC can t utilize rendering it nearly incommunicable To cater for this the module comes out of reset using 9600 N 8 1 comms settings for exactly 750 ms and then reverts to the communication parameters as per its S Registers If the host sends the string lt BISM gt lt cr gt where lt cr gt is the carriage return character within that 750ms period then the module remains at 9600 N 8 1 and also configures itself using factory default S Register values If connected to a PC using Ezurio Terminal the module can be reset to the factory default baud rate as follows Right click in the Ezurio Terminal window then click Factory Default gt Via BREAK CMD 9600 Tested with version 6 7 2 of Ezurio Terminal 2 9 17 RI dependent Start up Mode The UART_RI line can be configured as an input and on power up its state can force the device into one of two modes de
188. n of more than one minor device classes so make sure that only one minor device class is select and verify the result with 8 10 Bluecore 5 Multimedia External Data Sheet Cambridge Silicon Radio CSR http Awww csrsupport com log in or new account required 11 Bluecore 4 External Data Sheet Cambridge Silicon Radio CSR http Awww csrsupport com log in or new account required 12 RFCOMM with TS 07 10 specification http Awww bluetooth com Specification 20Documents rfcomm pdf 13 CVC on BTM5xx application note provided by Laird Technologies under NDA 14 FW_ReleaseNote_Btm51x_v18 1 3 0 Doc No BTM51xv18 1 3 0 Information guide for Production and Engineering releases of firmware for part BTM510 BTM511 15 BTM511 Development Kit Quick Start HFPv2 16 BTM511 Development Kit Quick Start A2DP and AVRCP v2 17 BTM511 Development Kit Quick Start SPP v2 4 RELATED DOCUMENTS AND FILES The following additional BTM510 511 technical documents are also available from the Laird BTM51x Series product page under the Documentation tab BTM510 511 Product Brief BTM510 511 User Manual Firmware BTM510 511 Firmware Files BTM510 511 Firmware Release Notes Version 18 1 4 0 Development Kit Schematics BTM510 Development Kit Schematics BTM511 Development Kit Schematics e BTM511 Development Kit Schematics Version A Development Kit Documentation BTM511 Developme
189. n whenever it is a printable character Each non printable ASCII character must be presented as 2 hex digits with a preceding NV For example a byte of decimal value 5 would be presented as 05 because the ASCII character of 05d is not printable A decimal value of 43 should be presented as because is the ASCII character representing 43d The Americas 1 800 492 2320 18 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module module would also accept 2B the hexadecimal presentation of 43d but at the price of two redundant characters Exceptions 77 quotation mark must be presented as 22 Y backslash must be presented as 5C When querying the content of any buffer Baseband RAM Persistent Store non printable ASCII characters is presented by 2 hex digits with preceding V Exceptions 77 quotation mark is presented as 22 Y backslash is presented as 5C 7 comma is presented as 2C Data passed to the baseband must match the format defined in the Bluetooth Specification Version 2 1 EDR 1 vol3 Part C Generic Access Profile 8 Extended Inquiry Response Data Format page 1305 in the pdf file The AT command interpreter does not perform any checks on the baseband data format 2 5 5 2 AT BTE lt data gt Accumulate data in RAM buffer This command adds lt data gt to the content
190. n_state 1 are consecutively created and sent The OK response is sent immediately on receipt of AT AVC command On completion an unsolicited message is sent to the host in the form AVPTC lt n gt lt bd_addr gt lt button_state gt AVPTC means AVrcp Pass Through Confirmation Parameter n indicates the command s status n 0 successful command confirmation received from target n 1 timeout target has not sent confirmation within the specified maximum time n 2 all other unsuccessful outcomes Parameters lt operation_id gt mandatory see Table 2 20 lt button_state gt optional O Button pushed 1 Button released Response lt cr lf gt OK lt cr lf gt immediately And lt cr If gt AVPTC lt n gt lt operation_id gt lt button_state gt lt cr If gt after command completion If status n indicates an unsuccessful outcome lt operation_id gt and lt button_state gt are omitted hex AVRCP Target TG This section describes AT Commands and S registers for when BTM5xx is configured as an AVRCP Target S301 2 In this mode BTM5xx supports one subunit PANEL see 3 2 6 4 4 1 2 6 4 4 2 Incoming AVRCP Connection Request An incoming AVRCP connection request is accepted automatically if a valid link key for the paging device exists If no link key is available Secure Simple Pairing SSP BT2 1 or legacy pairing BT2 0 or earlier is carried
191. nded to set Audio Video as Major Device class both for the SNK and the SRC Select the appropriate Minor Device class as defined in the Bluetooth Assigned Numbers 8 There is a tool available online named Class of Device generator made 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 2 15 provides examples of device class codes for A2DP devices Table 2 15 A2DP device class code examples 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 1 the rendering flag Ox040000 is mandatory for an A2DP SNK 2 the capturing flag Ox080000 is mandatory for an A2DP SRC 3 Audio Video major device class Ox000400 is recommended for an A2DP device Refer to A2DP 1 2 specification section 5 5 1 2 The device class is w
192. nse lt cr lf gt OK lt cr If gt 2 5 8 4 AT BTD Remove All Trusted Devices This command removes all devices from the trusted device list TDL in the non volatile database The device does not ask for confirmation Use caution WARNING If you make a connection the link key gets cached in the underlying stack So if you subsequently delete the key using AT BTD and immediately request a connection to the same device then the connection is established To ensure this does not happen send ATZ after the AT BTD Response lt cr lf gt OK lt cr If gt 2 5 8 5 AT BTW List Cached Trusted Device This command lists the cached trusted device Response lt cr lf gt 12346789012 lt cr lf gt OK lt cr lf gt If the cache is empty the response is as follows Response lt cr If gt OK lt cr f gt 2 5 9 AT Commands for Serial Stream Oriented profiles SSO The Serial Port Profile SSP and the Dialup Networking Profile DUN belong to the group of Serial Stream Oriented profiles SSO When activated an SSO profile claims one UART for its data stream and assumes all data at the UART to be transmitted over or received from RF 1 1 Hence as there is only one UART available on a BTM device the UART is not available for other profiles services or module control purposes One approach to managing data and control over UART is to configure local command mode with 531 3 In this mode incoming RF data is presented by the asynchronous messa
193. nse to AT AVU UNIT INFO Request indicates completion of command lt n gt status 1 fail 4 timeout dec AVSR 0 lt page gt lt pagedata gt Successful response to AT AVS SUBUNIT INFO Request Indicates completion of command lt page gt requested page 0 31 lt pagedata gt 1st word of requested page AVSR lt n gt n gt 0 Unsuccessful response to AT AVS SUBUNIT INFO Request indicates completion of command lt n gt status 1 fail dec 4 timeout AVPTI Indication of incoming Pass Through command lt subunit_id gt lt operation_id gt lt state gt lt subunit_id gt subunit id lt operation_id gt see Table 2 22 lt state gt 0 Button pushed 1 Button released AVPTC lt n gt lt operation_id gt lt state gt Confirmation of AT AVC Control Command Request lt n gt status O success 1 fail 4 timeout 7 operation not supported any value in range 1 9 not successful lt operation_id gt see Table 2 20 lt state gt 0 Button pushed 1 Button released Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth 70 Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module 2 6 4 5 AVRCP GPIO Mapping GPIOs can be mapped to AVRCP Commands operations with GPIO Configuration Registers S 651 to 658 If a GPIO
194. nt DCE and the Data Terminal is referred to as Data Terminal Endpoint DTE A BTM module must be controlled by a host processor using AT commands hosted operation mode BTM DUN implementation supports DT role only The DUN profile belongs to the group of serial stream oriented profiles SSO The appropriate implications and restrictions are described in 2 5 9 An AT command beginning with AT DU indicates affiliation to the DUN profile Americas 1 800 492 2320 107 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 1 Data call without audio M Yes M No feedback 2 Data call with audio feedback O No O No 3 Fax services without audio N A No N A No feedback A Fax services with audio N A No N A No feedback 5 Voice call N A No N A No M mandatory O optional N A not applicable 2 6 7 1 Profile activation DUN profile is activated by setting flag 0x04 in S102 plus AT amp W plus ATZ 2 6 7 2 Initiate DUN connection AT DUD lt bd_addr Initiate ACL connection to remote device with lt bd_addr networking profile DUN Response lt cr If gt CONNECT 123456789012 1103 gt lt cr f gt gt The remote device must support the dialup hex Or lt cr lf gt NO CARRIER lt cr f gt Or lt cr f gt ERROR 59 lt cr lf gt Or lt cr f gt ERROR 63 lt cr f gt Or lt cr lf gt ERRO
195. nt Kit Quick Start A2DP and AVRCP Version 2 BTM511 Development Kit Quick Start HFP Version 2 e BTM511 Development Kit Quick Start SPP Version 2 BTM511 Audio Development Kit ADK User Manual Version 4 The following download are also available from the Laird BTM51x Series product page Laird EZURiO Terminal v6 9 0 zip Americas 1 800 492 2320 188 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Laird global solutions local support USA 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2268 6567 wireless support lairdtech com www lairdtech com wireless Laird Technologies is the world leader in the design and manufacture of customized performance critical products for wireless and other advanced electronics applications Laird Technologies partners with its customers to find solutions for applications in various industries such as Network Equipment Telecommunications Data Communications Automotive Electronics Computers Aerospace Military Medical Equipment Consumer Electronics Laird Technologies offers its customers unique product solutions dedication to research and development as well as a seamless network of manufacturing and customer support facilities across the globe LWS UM BTM510 511 0312 Copyright 2013 Laird Technologies Inc All rights reserved The information contained in this ma
196. nual and the accompanying software programs are copyrighted and all rights are reserved by Laird Technologies Inc Laird Technologies Inc reserves the right to make periodic modifications of this product without obligation to notify any person or entity of such revision Copying duplicating selling or otherwise distributing any part of this product or accompanying documentation software without the prior consent of an authorized representative of Laird Technologies Inc is strictly prohibited All brands and product names in this publication are registered trademarks or trademarks of their respective holders This material is preliminary Information furnished by Laird Technologies in this specification is believed to be accurate Devices sold by Laird Technologies are covered by the warranty and patent indemnification provisions appearing in its Terms of Sale only Laird Technologies makes no warranty express statutory and implied or by description regarding the information set forth herein Laird Technologies reserves the right to change specifications at any time and without notice Laird Technologies products are intended for use in normal commercial and industrial applications Applications requiring unusual environmental requirements such as military medical life support or life sustaining equipment are specifically not recommended without additional testing for such application Limited Warranty Disclaimer Limitation of Liability Am
197. o MITM protection Medium Security Encryption Level 1 No MITM protection Low Security No Encryption 1 Minimal user interaction Level O No MITM protection Permitted only for service discovery No Encryption Minimal user interaction 1 Although encryption is not necessary for security level one encryption is always enabled because this specification mandates encryption for all services other than SDP service discovery The security level is defined by S Register 320 and is referenced at boot time only Hence the register must be saved by AT amp W and the module must be power cycled or ATZ subsequently S320 3 overrules the setting of S Register 322 enable MITM protection The security level remains the same until next power cycle and is valid for all profiles and services of the module For SDP service discovery profile security level O is always assigned internally 2 5 6 2 0 capability 321 S Register 321 defines the O capability of the device The setting is used for O capability negotiations prior to SSP in order to identify whether the O capabilities of both devices are sufficient for MITM protection if required Table 2 4 lists possible values Table 2 4 IO capabilities 0 Display only The device is able to display communicate a 6 digit decimal number Americas 1 800 492 2320 EA Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BT
198. olatile memory to take effect After the reset is complete and the module is ready to receive commands it issues the OK response ATZ and ATZO initiate a reset followed by loading into the current boot mode see command ATI14 ATZ1 to ATZ4 instructs the module to reset and then emerge into their corresponding boot mode Note that S Register 103 specifies the boot mode from cold Boot modes are required to configure some low level device settings which cannot be configured by S registers and AT commands Currently there are predefined settings defining the PCM data format to be used with certain codec ICs applies mainly to BCO4 Response after reset lt cr If gt OK lt cr f gt 2 5 1 4 AT BTC lt devclass gt Set Device Class Code Temporarily This command sets the device class code which is sent in subsequent inquiry responses It can be read back using the AT BTC Command as described below lt devclass gt is a six digit hexadecimal number derived as per Bluetooth Assigned Numbers 8 The 24 bits are 4 fields briefly described as follows bit O corresponds to the least significant bit Bits 0 1 Format Type This field currently only has a value of 00 i e format type 1 Bits 2 7 Minor Device Class The value of these 6 bits is interpreted differently based on the Major Device Class stored in the next 5 bits Bits 8 12 Major Device Class 5 bits see Figure 1 and Table 3 in Bluetooth Assigned Numbers 8
199. oming connection A value of O disables autoanswer If 1 then autoanswer on one RING and do NOT send RING CONNECT response to the host This emulates a serial cable replacement situation Setting values gt 0 resets S Register 504 to 0 and lt 0 forces 504 to 1 If SO lt gt 0 and 100 lt gt 0 then SO must be lt S100 If a value is entered which violates this rule then ERROR 29 is sent in response If S504 1 then this register returns 1 regardless of the actual value stored in non volatile memory ER 94 32 126 n a Escape sequence character It is not by default as a serial link to a mobile phone exposes the phone s AT command set which uses as default If both use there is confusion Ox5e is the character Ai 12 100 40 5000 n a Escape sequence guard time in milliseconds with a granularity of 20ms New values are rounded down to the nearest 20ms multiple 100 15 SPP Number of RING indications before an auto disconnection is initiated A value of O disables this feature If SO lt gt 0 and S100 lt gt 0 then SO must be lt S100 If a value is entered which violates this rule then ERROR 29 is sent in response 101 1101 0 ffff n a UUID of default SPP based profile when not specified explicitly in the ATD command 102 BTM5xx 0181 BTM5xx 1 1ff n a Defines a set of bits masks for enabling profiles Values can
200. on The AG is expected to either confirm the outgoing call with the command AT HFGC1 or to respond with AT HFGE if the memory location is invalid HFG L Request from HF to place an outgoing call using the last number dialled The AG is expected to either confirm the outgoing call with the command AT HFGC1 or to respond with AT HFGE if the last number dialled is unavailable HFG Mn Request from HF to generate DTMF code lt n gt towards the telephony network HFG NRECO Request from HF to disable noise reduction and echo cancellation This message only appears if noise reduction echo cancellation was enabled in 596 at boot time Bit1 The HFG is supposed to disable noise reduction and echo cancellation and respond with an OK If noise reduction echo cancellation was not enabled at boot time no message is displayed and ERROR is sent to the HF silently HFG CLIP1 Request to activate caller line identification notification in the AG Americas 1 800 492 2320 103 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module HFG CCWA1 Request to activate call waiting notification in the AG HFG CMEE1 Request to activate extended AG error result codes in the form CME ERROR lt err gt NO CARRIER 111F Service level connection to local HFG instance has been released See UUIDs in CONNECT N
201. onnecting The response on a disconnect command is usually NO CARRIER lt profileUUID gt if a connection has existed and 329 0 If no connection has existed and 329 0 no profileUUID is appended If all connections are to be released ATH may be used See Table 2 60 Profile release commands Table 2 60 Profile release commands Disconnect SPP ATH1101 or AT SPH or ATH Single ATH retained for backward compatibility response NO CARRIER or NO CARRIER 1101 depending on 329 and if a SPP connection has existed previously Disconnect A2DP ATH110D or AT APH If A2DP connection released response NO CARRIER 110D If no A2DP connection has existed response NO CARRIER Disconnect AVRCP ATH110E or AT AVH If AVRCP connection released response NO CARRIER 110E If no AVRCP connection has existed response NO CARRIER Disconnect HSG ATH1112 or AT HSGH If AG HSP connection released response NO CARRIER 1112 If no HSP connection has existed response NO CARRIER Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth 149 Laird Technologies BTM510 511 User Gu Bluetooth Multimedia Module ide Disconnect HS ATH1108 or Must be enabled by 332 otherwise it results in a AT HSH behaviour not defined in HSP specification If HS HSP connection released response NO CARRIER 1108 If no H
202. or earlier and legacy pairing is not disabled S323 0 this command initiates legacy pairing with the device with lt bd_addr gt Legacy pairing refers to the mechanism of entering an identical PIN key on both ends If the PIN is required if not set earlier by AT BTK lt PIN gt asynchronous indications are sent to the host in the form PIN lt bd_addr gt The address confirms the pairing device To supply a PIN use AT BTK For a successful pairing the link key is stored in a volatile cache which is overwritten every time a new pairing is initiated using this command If S register 325 1 the link key is automatically saved to the non volatile trusted device list Otherwise S325 0 the link key can be added to the trusted device list by AT BTT Refer to AT Commands managing Trusted Devices for further AT commands related to trusted device list Americas 1 800 492 2320 26 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech conm bluetooth BTM510 511 User Guide Bluetooth Multimedia Module The OK response is sent immediately on receipt of the AT BTW command After pairing an unsolicited message is sent to the host in the form PAIR n lt bd_addr gt If AT BTI or AT BTP or AT BTG or AT BTQ or ATD is issued between the AT BTW command and the subsequent PAIR asynchronous response then an ERROR response is sent to those commands They cannot be executed in this mode Response lt cr lf gt OK lt
203. or restore default ATSxx deletes all tuples of the specified AT amp F deletes all tuples of all value dynamic register dynamic registers and reverts AT amp F deletes all tuples of all dynamic all classic S registers to registers and reverts all S registers to factory default factory default value Maximum array length Maximum number of tuples 31 or limited n a by persistent store Response to ATSxx Sxx lt range_val_a gt lt range_val_b gt Sxx lt range_val gt query range Example Example S744 1 18 0 10 S5122 0 47 2 7 4 Status indication Status indication means the automatic indication of module states by suitable indicators Currently firmware v18 1 4 0 the LEDs of BTM51x are supported as indicators A number of LED blink patterns exist LED blink patterns can be tested by AT SILO lt PatternID gt for LEDO and AT SIL1 lt PatternID gt for LED1 Blink pattern IDs are listed in Table 3 5 For AudioOn status indication is also possible by a GPIO output refer to section 16 4 Motivation for status indication is to achieve host less operation for typical headset and wireless speaker use cases Americas 1 800 492 2320 116 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 7 4 1 Status definition There are many states for the BTM51X module with different characteristics and possible parameters For examp
204. otherwise legacy pairing occurs automatically if 323 0 For legacy pairing refer to AT Commands for Legacy Pairing The module immediately sends OK on receipt of AT BTW Depending on the devices collective O capabilities an asynchronous message may appear during pairing See Americas 1 800 492 2320 23 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Table 2 7 for the required actions On pairing completion an unsolicited message in the form PAIR n lt bd_addr gt is sent to the host 2 5 6 8 S Registers for Secure Simple Pairing The following table lists all S Registers for Secure Simple Pairing For details on the S Registers refer to their descriptions above Table 2 6 S Registers for Secure Simple Pairing SSP 320 2 1 3 Security Level see 1 vol3 Generic Access Profile Table 5 7 needs subsequent AT amp W and power cycle to take effect value 3 overwrites 322 321 1 0 4 Set IO capability 0 display only 1 display yes no 2 keyboard only 3 no input no output 4 reject O cap requests 322 0 0 1 Force man in the middle protection MITM 0 disabled 1 enabled referenced only if security level S320 lt 3 323 0 0 1 Disable legacy pre BT2 1 Pairing 0 legacy pairing enabled 1 legacy pairing disabled 324 90 1 255 Secure Simple Pairing tim
205. out depending on the Bluetooth Version of the paging device After an AVRCP connection has been established the module remains in AT command mode S Register 531 is ignored for AVRCP connections UNIT INFO Response It is mandatory to respond to a UNIT INFO command if configured as AVRCP target Required response parameters are IEEE Company ID and a Unit Type The IEEE Company ID is a 24 bit integer which can be set via S Register 303 The response is sent automatically with the company ID as per 303 and a fixed unit type of 0x09 Panel Americas 1 800 492 2320 64 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 6 4 4 3 2 6 4 4 4 2 6 4 4 5 SUBUNIT INFO Response It is mandatory to respond to a SUBUNIT INFO command if configured as AVRCP target Required response parameters are Subunit type and MaxSubUnitld The response is sent automatically with a fixed value of 0x09 Panel for parameter Subunit type and a fixed value of 0x00 for parameter MaxSubUnitld only one subunit exists which is panel PASS THROUGH Indication An incoming PASS THROUGH command is indicated by an unsolicited message AVPTI lt subunit_id gt lt operation_id gt lt button_state gt hex hex subunit_id should always be zero as a BTM supports only one subunit hex For operation_id see Table 3 20 hex
206. ovided Bit1 in S370 is set The latter option has turned out to be more convenient when exploring the auto connect feature Stopping ACS by DSR is confirmed by OK If ACS must be stopped when in an attempt cycle the confirmation can be delayed by ACS waiting for the attempt outcome In inconvenient circumstances e g pairing is triggered by connect attempt and experiences significant delay or multiple profiles are enabled in the ACR a safety timeout is triggered after 10s which forces ACS to stop and return ERROR 105 The error notes the unclean stop of ACS but guarantees ACS is fully stopped and the parser is functional 2 7 2 4 AT ACS Query ACS status AT ACS query status of auto connect service ACS Response is identical to ATI73 see section 2 7 2 5 for ACS status definition 2 7 2 5 ATI73 Query ACS status ATI73 query auto connect service ACS status 0 Service disabled not running 7 Service enabled paused between connection attempts interval timer running 2 Attempting initiating connections as defined by ACR table 3 Attempt repeat resuming connection attempts after a profile with transitional state was found and the transitional state was finished 4 All profiles of ACR table are connected monitoring disconnect events 2 7 2 6 ATI74 Query current ACS interval in seconds ATI74 returns actual current reconnect attempt interval in seconds In scenarios where the interval parameter varies acro
207. owed by ATZ Figure 2 24 illustrates a HSP link and how a BTM5xx module is integrated in hosted operation mode 1 Button Host controller AT command interface Speaker BTM5xx HS Microphone Figure 2 24 Headset block diagram 2 6 5 1 1 Initiate ACL connection from HS AT HSD lt bd_addr gt Initiate ACL connection from local headset instance to remote device with lt bd_addr remote device must support the audio gateway role AG of the headset profile HSP Response lt cr If gt CONNECT 123456789012 1112 gt lt cr If gt gt The Or lt cr f gt NO CARRIER lt cr f gt Or lt cr f gt ERROR 59 lt cr f gt Or lt cr If gt ERROR 63 lt cr lf gt After an ACL connection has been established the module remains in AT command mode S Register 531 is ignored for HSP connections An audio connection should be established within short time The command is AT HSB Americas 1 800 492 2320 2 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 6 5 1 2 Send AT CKPD 200 AT HSB Send AT CKPD 200 to connected audio gateway This indicates a user action on the gateway e g a button press Depending on the audio connection state the audio gateway either establishes or releases the audio connection subsequently Refer to Figure 2 26 Table 2 26 Outcome of AT HSB ACL connected ATI
208. paration ext audio 1 Connect an audio source e g MP3 player to equipment the stereo audio input line in of Device B 2 Connect a headphone or a speaker to the stereo audio output line out of device A Preparation A AT amp 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 Sink ATS512 4 Make device connectable and discoverable permanent setting AT amp W Store settings ATZ Reset ATl4 Query Bluetooth device address of Dev A lt BdAddr_DevA gt Preparation B AT amp F Restore factory default settings A2DP profile is enabled per default in 102 ATS300 2 Enable Audio Source role ATS515 080400 Set A2DP device class source AT amp W Store settings ATZ Reset Initiate B AT APD lt BdAddr_Dev Response Connection A gt PAIR 0 pairing successful A and B CONNECT connected A and B Connected Play music from the audio source Music should be audible on the headphones speakers If not check the audio output device e g connect headphones directly to audio source for a test Adjust A AT GOU Increment volume audio output gain by one Volume AT GOD Decrement volume audio output gain by one B AT GIU Increment volume audio input gain by one AT GID Decrement volume audio input gain by one Note the audio input gain A2DP source is a Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 85
209. pass thru mode no post processing 2 full post processing mode CSR music example Values other than listed above 0 3 4 5 should not be set because no useful function is assigned The command is only accepted in A2DP streaming state otherwise ERROR 93 is returned 2 6 3 25 363 Set default post processing mode 363 set decoder post processing default mode 1 3 Whenever A2DP enters the streaming state i e a decoder is loaded on the DSP the post processing mode is set automatically as per 363 Values 1 pass thru mode no post processing 2 full post processing mode CSR music example 3 reserved for custom post processing algorithms Americas 1 800 492 2320 29 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Default value 1 pass thru no post processing If a loaded A2DP decoder doesn t support post processing 363 is ignored As of v18 1 4 0 all A2DP decoders SBC AAC APTX support post processing 2 6 3 26 A2DP Asynchronous messages CONNECT 123456789012 110D lt An A2DP connection with Bluetooth device address 123456789012 is established The connection was initiated by the remote device incoming CONNECT 123456789012 110D gt An A2DP connection with Bluetooth device address 123456789012 is established The connection was initiated by the local device outgoing FS44100 I
210. ponse If S504 1 this returns 1 regardless of the value in non volatile memory 100 15 0 15 Number of RING indications before auto disconnection A value of 0 disables this feature If SO lt gt 0 and S100 lt gt 0 then SO must be lt 100 If a value is entered that violates this rule ERROR 29 is sent in response 2 6 3 A2DP Advanced Audio Distribution Profile The Advanced Audio Distribution Profile is used for unidirectional transmission of high quality stereo audio streams between two Bluetooth devices A2DP must be enabled by setting 102 128 Also an A2DP role must be assigned to either the source or sink module Lastly the settings must be stored by AT amp W followed by ATZ An incoming A2DP connection request is accepted automatically if a valid link key for the paging device exists If no link key is available Secure Simple Pairing SSP BT2 1 or legacy pairing BT2 0 or earlier is carried out depending on the Bluetooth version of the paging device After A2DP connection is established the module remains in AT Command mode S Register 531 is ignored for A2DP connections Version 1 2 of A2DP is supported The A2DP service record contains an optional field which indicates the A2DP supported features of a device This feature field can be set by 312 for a sink and by 313 for a source Refer to Table 2 17 for details Table 2 11 provides an overview on supported A2DP features on a module Table 2
211. priate AT HFGCx command They send call related indicators call call setup call held automatically Americas 1 800 492 2320 97 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Table 2 32 AG indicators for AT HFGI Service 1 0 1 4 4 Call 2 0 1 Call setup 3 0 3 All call related sections Call held 4 0 2 Signal 5 0 5 4 5 Roam 6 0 1 4 6 Battery Charge 7 0 5 4 7 2 6 6 2 10 Send operator string to HF COPS 2_4 8 AT HFGO lt operator_string gt Send network operator string to HF by COPS 0 0 lt operator_string gt on SLC This command responds to a AT COPS request indicated by the asynchronous message HFG OP 2 6 6 2 11 Send ERROR or CME ERROR to HF AT HFGE lt cme_code gt Send ERROR to HF if no lt cme_code gt is given Required as optional response to HFG D gt nnn an HFG L to confirm that the dial request was not successful i e invalid memory location or last dialled number not available If the optional lt cme_code gt is appended and if extended AG error result codes were enabled by HF stored internally the appropriate extended error result code in the form of CME ERROR lt cme_code gt is sent to HF If lt cme_code gt is appended but extended error codes have not been enabled by HF lt cme_code gt is ignored and only
212. r does not need to do anything But when using the 12S interface the supported sampling rates of the external circuit are not known by the BTM5xx The user must specify all sampling rates supported by S Register 316 Check Table 2 44for details on 316 The negotiated sampling frequency is displayed by the FSddddd lt interface gt asynchronous message see Americas 1 800 492 2320 128 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Routing audio streams over DS 316 is referenced at boot time for building the sampling rate capability record if 314 gt 0 I2S interface for enabled A2DP Before changed values of 316 or S314 become effective commands AT amp W and ATZ must be sent to the module Table 2 45 BTM5 1x A2DP supported sampling rates for Gs 316 63 1 63 I2S sampling rate capability for A2DP values can be added for all sampling frequencies supported Register is referenced if S314 gt 0 at boot time requires AT amp W and ATZ for new values to become effective 1 48 kHz 2 44 1 kHz 4 32 kHz 8 24 kHz 16 22 05 kHz 32 16 kHz 1 A2DP Source at least one of these sampling frequencies 48kHz 44 1kHz must be supported A2DP Sink both 48 kHz and 44 1 kHz must be supported at least 2 values ignored as they are not supported by SBC neither by APTx 2 8 2 1 5 12S Data Format I2S da
213. r future AT firmware release but with low priority 3 not planned to be supported for future AT firmware 4 service level signalization only 5 planned for future AT firmware release Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth 82 Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module 2 6 6 1 Hands free unit role HF Hands free role is activated by setting flag 0x10 in 102 plus AT amp W plus atz Figure 2 26 is a block diagram of a BTM5xx in hosted operation mode e g set of buttons keypad display e En h Kg Echo eaker Microphone f P p Cancellation Telephone control Host controller AT command interface BTM5xx HF Figure 2 26 Hands free unit block diagram 2 6 6 1 1 Initiate service level connection SLC from HF 1_4 2 AT HFD lt bd_addr gt Initiates service level connection SLC from local hands free instance to remote device with lt bd_addr gt The remote device must support the audio gateway role AG of the Hands free profile HFP Response SLC established lt cr If gt CONNECT 123456789012 111F gt lt cr lf gt Failed lt cr If gt NO CARRIER lt cr f gt Or lt cr If gt ERROR 59 lt cr If gt Or lt cr If gt ERROR 63 lt cr f gt After a SLC connection has been established the module remains in AT command mode S Register 531 is ignored for HFP connections
214. r profile line lt profile_Mask 19 nex lt RSSI _signed_decimal_with variable_length gt ATI56 Query local HCI role master slave for all connected profiles Response per profile line lt profile_Mask 19 wees MIB ATI57 Query profile flags of current connections same format as S register 102 ATI58 Query number of current connections total sum of ATI60 ATI67 ATI59 Returns 1 if a pre set PIN code by AT BTK is available legacy pairing Returns 0 otherwise The PIN code is not displayed for security reasons ATI60 SPP connection status 0 not connected 1 connected identical with ATI9 ATl61 A2DP connection status 0 not connected 1 connected and streaming 2 connected but not streaming suspended ATI62 AVRCP connection status 0 not connected 1 connected ATI63 HSP Headset connection status O not connected 1 ACL connected 2 audio connected ATI64 HSP Gateway connection status O not connected 1 ACL connected 2 audio connected ATI65 HF connection status 0 not connected 1 SLC connected 2 audio connected 3 in call SLC 4 in call audio 5 in call setup incoming dialling alerting SLC 6 in call setup incoming dialling alerting audio ATI66 HFG connection status 0 not connected 1 SLC connected 2 Audio connected 3 in call SLC 4 in call audio 5 call setup ringing incoming call dialling or alerting outgoing
215. r to section 3 13 18 as well Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth 166 Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module S356 3 0 3 SCO Enable restoring of last gain used for SCO O disable gain restoring for SCO 1 enable output gain restoring for SCO 2 enable input gain restoring for SCO 3 enable input and output gain restoring for SCO default 357 3 0 3 A2DP Enable restoring of last gain used for A2DP 0 disable gain restoring for A2DP 1 enable output gain restoring for A2DP 2 enable input gain restoring for A2DP 3 enable input and output gain restoring for A2DP default S362 0 0 1 AVRCP Suppress AVRCP direction indicator O AVRCP direction indicator enabled 1 AVRCP direction indicator suppressed S363 1 1 3 A2DP Set default post processing mode 1 pass thru no post processing 2 full processing 3 custom mode S368 0 0 1FF Misc Request HCI slave role on connect for profile flags set Profile mask as per S102 Table 3 7 S369 0 0 1FF Misc Request HCI master role on connect for profile flags set Profile mask as per 102 Table 3 7 370 0 0 7 ACS Configure Auto Connect Service mode Bitmask BitO start AC service at boot time Bit stop AC service by de asserting DSR Bit2 auto add new connections to ACR table automatic host less ACR mode SERA 0 0 900 HLO Time window in seconds
216. rable and connectable state according to 512 3 Enable both actions 1 and 2 default Also refer to Enabling optional codecs APTX AAC Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module Set A2DP Sink supported features bit mask 312 1 15 Bitmask sink supported features Bit O Headphone default Bit 1 Speaker Bit 2 Recorder Bit 3 Amplifier Subsequent AT amp W plus ATZ required for a new value to become effective Set A2DP Source supported features bit mask 313 1 15 Bitmask source supported features Bit O Player default Bit 1 Microphone Bit 2 Tuner Bit 3 Mixer Subsequent AT amp W plus ATZ required to commit value Enable optional A2DP codec 307 0 3 0 no optional codec default 1 APTx Bit 0 2 AAC Bit 1 sink only 3 both APTx and AAC enabled Subsequent AT amp W plus ATZ required to commit value Configure audio resource override 355 0 3 D no override allowed 1 incoming outgoing SCO request is accepted while A2DP is streaming The module initiates A2DP suspend automatically default 2 incoming outgoing A2DP start resume request will be accepted while SCO is active The module releases the SCO link automatically 3 both 1 and 2 enabled Refer to Simultaneous A2DP and HFP as well Ena
217. rate for Audio S419 0 6 0 8 kHz Loopback Mode default 6 1 11 025 kHz 2 16 kHz 3 22 050 kHz 4 24 kHz 5 32 kHz 6 44 1 kHz 1 Refer to 12S Cross Loopback analogue analogue audio audio stereo stereo gt audio in audio in DSP with SBC lt audio out H lt _ audio out Encoder Decoder BTM5xx in audio loopback BTM5xx in DSP loopback mode AT BTL1 mode AT BTL2 Figure 2 35 BTM5 1x Audio Loopback Modes 1 and 2 2 8 6 LED Control The module provides two dedicated output pins for LEDs LEDO LED1 The following modes are supported LED OFF LED ON LED_PWM and LED_PULSE In LED_PWM mode the parameters Duty Cycle an PWM Period can be specified via S Registers This enables either to dim the brightness of an LED PWM Period 0 or to specify blinking with defined on time in a defined period PWM Period gt blinking visible for the eye Americas 1 800 492 2320 134 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech con bluetooth BTM510 511 User Guide Bluetooth Multimedia Module In LED_PULSE mode the brightness of an LED is modulated Modulation speed is defined by parameter Pulse Rate and maximum brightness is defined by parameter Duty Cycle Table 2 48 BTM5 1x LED S Registers Set LED 0 mode 335 0 3 default 0 Mode O LED_OFF Set LED
218. re Ongoing Bluetooth Connection 021 Link Key Cache is Empty 022 Link Key Database is Full 023 Malloc returned NULL Resource Issue 024 Remote Address same as Local Address 025 Connection Setup Fail DSR Not asserted 026 Unauthenticated licence 027 Max Responses too high See S Register 518 Memory allocation error Americas 1 800 492 2320 182 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech conm bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 028 Pin in AT BTK is too long 029 Invalid Ring count for S Register O or 100 If S0 lt gt 0 and S100 lt gt 0 then SO must be lt 100 030 ADC Error 031 Analogue Value cannot be read It is set for output 032 Analogue Value cannot be written It is set for input 033 S Register Value is invalid 034 Both L and R modifier cannot be specified in ATD command 035 Invalid Major Device Class valid value in range 0x00 to Ox1F inclusive 036 Pairing in progress Command cannot be actioned try again later Invalid Sniff parameter specified 037 E g new Attempt value greater than Mininterval Solution is to first increase MinInterval and re enter the Attempt value 038 Get Remote Friendly name Failed 039 Failed to change mode to Multipoint 040 7 Bit mode requires parity to be even or odd 041 Stream Error 042 Stream Pending Error 043 Unknown Audio Gateway Command 044 Busy try later 0
219. required to commit the value w Ww Ww a wv wv w WwW W Americas 1 800 492 2320 91 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech conm bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Select SCO audio 315 SCO audio interface select interface BTM5xx only 0 internal codec default 1 12S master 2 12S slave 3 external PCM interface Refer to Routing audio streams over 125S Inquire HF status ATI65 0 not connected 1 SLC connected 2 Audio connected 3 in call SLC 4 in call audio 5 in call setup incoming dialling alerting SLC 6 in call setup incoming dialling alerting audio 2 6 6 2 Audio gateway role AG HFP HFG Audio gateway role is activated by setting flag 0x40 in S102 plus AT amp W plus atz Refer to Figure 2 25 Audio Gateway block diagram for a block diagram of an audio gateway with a BTM5xx in hosted operation mode Table 2 29 shows the feature requirements for this profile and the support level on BTM5xx Laird highly recommends you download the profile specification 5 order to understand the procedures related to specific AT commands For quick navigation references to 5 are given in this section with the syntax lt Feature gt _ lt Section gt With lt Feature gt HFP feature no in Table 2 29 and Table 3 1 of 5 lt Section gt Appropriate Section in 5 Example 3_4 12 feature no
220. rios A distinction exists between serial cable replacement and digital I O cable replacement In serial cable replacement a serial RS232 cable is replaced by a wireless SPP link In particular this context refers to TxD and RxD lines not to handshaking or modem control signals A stream of serial data is transmitted typically bidirectional with UARTs involved at both ends Americas 1 800 492 2320 145 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module In digital I O cable replacement one or more wire s each transmitting a binary signal in one direction is replaced by a wireless link n mixed cable replacement digital I O data and serial data is being transmitted simultaneously This is needed to replace a real world RS232 cable by a wireless link Handshaking signals RTS CTS and modem control signals DSR DTR DCD RI i e I O data need to be sent and received at the same time that serial data TxD RxD is being transmitted over the wireless link The RFCOMM specification O basis for SPP caters for this by defining the appropriate procedures In addition it assigns modem control signals to corresponding TS 07 10 Signals RTC RTR IC DV A BTM51x module allows creation of digital I O cable replacement in a number of different ways The following sections describe the characteristics of available options
221. ritten to the module using ATS515 lt device_class gt where lt device_class gt is the 6 character device class code without leading Ox Use subsequent AT amp W and ATZ to commit the new value Also refer to AT BTC lt devclasshex gt Set Device Class Code Temporarily Americas 1 800 492 2320 47 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 6 3 6 Initiate A2DP Connection AT APD lt bd_addr gt hex Initiate A2DP connection to Bluetooth address lt bd_addr gt The remote device must support the complementary role to the local device If link keys are missing in one or both devices pairing either occurs automatically or must be initiated by AT BTW lt bd_addr gt This depends on factors like the combination of local and remote IO capabilities or the Bluetooth version of the remote device Response lt cr gt lt If gt PAIR 0 lt bd_addr gt 00 lt cr gt lt lf gt first time only auto pairing without MITM authent lt cr gt lt If gt CONNECT lt bd_addr gt 110D gt lt cr gt lt lf gt Or lt cr gt lt lf gt NO CARRIER 110D lt cr gt lt lf gt not successful 2 6 3 7 Output Gain Settings A2DP Sink AT GOU AT GOD AT GOU Increment audio output gain volume AT GOD Decrement audio output gain volume Response lt cr gt lt lf gt OK lt cr gt lt lf gt lt cr gt lt If gt ERROR 57 l
222. rs Possible indicators are listed in Table 2 30 Table 2 30 CIEV indicators in HFI message Service service 1 4 4 Call call 2 Call Setup callsetup 3 All call related sections Call held callheld 4 Signal signal 5 4 5 Roam roam 6 4 6 Battery Charge battchg 7 4 7 2 6 6 1 20 Hands free audio routing Audio in the Hands free profile is always referred to as a SCO connection which is used for bidirectional transmission of speech On a BTM5xx SCO audio is routed to the internal codec by default 315 can select the 12S interface in master or slave mode for SCO connections Refer to Americas 1 800 492 2320 87 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Routing audio streams over DS 2 6 6 1 21 Hands free status ATI65 Returns the status of the Hands free HFP instance 0 not connected 1 SLC connected 2 Audio connected 3 In call SLC connected 4 In call audio connected 5 In call setup incoming dialling alerting SLC connected 6 In call setup incoming dialling alerting audio connected 2 6 6 1 22 Hands free asynchronous messages CONNECT lt bd_addr A Service level connection to headset has been established and initialized gt lt uuid gt L lt dir gt hex lt bd_addr gt Bluetooth address of headset device
223. s empty the response is as follows Response lt cr lf gt 00000000000 lt cr lf gt OK lt cr lf gt 2 5 10 6 ATI75 Read Current Incoming Peer Address ATI75 displays the currently valid incoming peer address It may originate from non volatile memory at boot time AT BTM lt bd_addr gt 512 gt 3 or be set by AT BTG P lt bd_addr gt Response lt cr f gt 123456789012 lt cr lf gt OK lt cr lf gt If no incoming peer address is currently set the response is as follows Response lt cr lf gt O00000000000 lt cr lf gt OK lt cr lf gt Americas 1 800 492 2320 33 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 5 10 7 AT BTR lt bd_addr gt Set Outgoing Peer Address for SPP legacy SPP auto connect This command stores a peer address for outbound SPP connections in non volatile memory This command sets up a module in pure cable replacement mode If S512 1 and the peer address is NOT 000000000000 then it periodically time specified via S505 attempts to connect to the specified peer address All data from the host are then buffered in the receive buffer until a Bluetooth connects and then sends the buffer across This means if the peer device is not and will not be available and 507 1 or 2 the module effectively becomes useless and does not listen for commands arriving on the UART If this happens two recovery methods are
224. sh an incoming connection from an outgoing connection based on the CONNECT message The direction indicator only applies to role indicating UUIDs if 329 0 The direction indicator is configured by S register 331 refer to Americas 1 800 492 2320 151 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Table 2 64 Americas 1 800 492 2320 152 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Table 2 64 Examples for direction indication in CONNECT messages 0 Disabled CONNECT CONNECT 0123456789AB 1108 0123456789AB 1108 1 Character style CONNECT CONNECT 0123456789AB 1108 0 Tor O 0123456789AB 1108 2 default Symbol style CONNECT CONNECT 0123456789AB 1108 gt lt or gt 0123456789AB 1108 lt 2 9 9 UUIDs in service records of HSP This section provides some background information on UUIDs and their usage in service record of the Headset profile In the Bluetooth Assigned Numbers document 8 in the table Service classes there are three UUIDs assigned for the HSP Table 2 65 Bluetooth Assigned Numbers for HSP HSP uuid16 0x1108 See Headset Profile Bluetooth SIG Headset AG uuid16 0x1112 See Headset Profile Bluetooth SIG Headset HS 0x1131 Bluetooth Headset Profile Bluetooth
225. smission of speech with 8 kHz sampling rate Americas 1 800 492 2320 131 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module The PCM pins of the BTM51x share support for PCM DS and SPDIF 315 selects one of these interfaces or the internal codec internal codec refers to the on board audio ADC DAC clock generator and antialiasing filters hence the onboard analogue interface PCM in combination with CVC doesn t work well 2 SPDIF is currently not supported but seems feasible 1 For I2S normally used for stereo audio ensure the sampling rate is configured to 8kHz if used with SCO Otherwise the sampling rate mismatch produces distorted audio Americas 1 800 492 2320 132 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Table 2 46 SCO audio routing options Internal Codec S315 0 A A Ge q _PCMIS315 3 v4 SO Isablie pse BS V 8kHz V kt SPDIF GA Internal Codec S315 0 CS y CVC PCM S315 3 enabled I2S 5315 1 2 wo 8kHz WA 8kHz S318 gt 0 SPDIF Gu Gu SPDIF not supported currently but seems feasible Seems to be a data format issue CVC creates expects data in a format for the internal audio codec not PCM CSR support required Internal Codec analogue all other interf
226. sponse NO If AVRCP was connected response NO CARRIER 110E ATH110E CARRIER If AVRCP was not connected response NO CARRIER AT HSH Response NO If HS instance was connected response NO CARRIER 110E ATH1108 CARRIER If HS instance was not connected response NO CARRIER AT HSGH Response NO If HSG instance was connected response NO CARRIER 1112 ATH1112 CARRIER If HSG instance was not connected response NO CARRIER AT HFH Response NO If HF instance was connected response NO CARRIER 111E Americas 1 800 492 23 20 150 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module ATH111E CARRIER If HF instance was not connected response NO CARRIER AT HFGH Response NO If HFG instance was connected response NO CARRIER 111F ATH111F CARRIER If HFG instance was not connected response NO CARRIER AT DUH Response NO If DUN was connected response NO CARRIER 1103 ATH1103 CARRIER If DUN was not connected response NO CARRIER 2 9 8 UUIDs in CONNECT NO CARRIER messages In profiles where functionality and command set differs between both possible roles asynchronous profiles role indicating UUIDs are used in the CONNECT and NO CARRIER messages HSP and HF
227. ss multiple ACRs which have some disconnected profiles the smallest value of those ACRs applies and displays 2 7 2 7 Attempt cycle order rules When ACS attempts connections it starts with ACR entries with the lowest index the highest priority If not all of the profiles specified are connected the connection attempt starts attempting to connect all profiles in this record After connection attempt to one or all profiles fails or after successfully connecting ACS updates the status of the ACR entry and proceeds with the next ACR entry in the order of increasing index If a record is found whose profile mask overlaps with a higher priority lower index record and if the higher priority record is at least partly connected the current lower priority record is not processed by ACS The duration of an attempt cycle can vary significantly depending on the number of parameters such as number of profiles number of ACR entries and connection result success or failure Americas 1 800 492 2320 114 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module The reconnect interval timer starts when ACS finishes a attempt cycle If the reconnect interval varies across multiple ACR entries the lowest interval applies ATI74 returns the actual current interval in seconds 2 7 3 Dynamic registers Dynamic registers allow complex settings configuration
228. t 539 0 0 1 n a When set to 1 in idle mode S512 1 UART Rx characters are discarded if DSR is de asserted S541 20 43 20 n a This sets the power level in dBm when inquiring or paging Reading this register returns the value stored in non volatile memory 542 4 43 20 n a As per S541 however reading this register returns the current power level as set in the base band The read can be different from S541because the actual power is set using a lookup table and the base band rounds down to the nearest value in the table 543 0 0 1 n a If this is set to 1 then incoming pairing attempts are accepted if a pin code has been pre entered using AT BTK while in the wait phase of auto connect cycle initiated by the AT BTR command In addition to accepting pairing attempts if the pairing is successful then the new device is automatically set as the peer address for automatic connections as if an explicit AT BTR command was entered See S Register 505 and 530 also S544 1 0 1 UART Configure UART for either high throughput or low latency 0 low latency low throughput 1 high latency high throughput Americas 1 800 492 2320 172 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module S551 3211 0 ffff n a Bluetooth RFCOMM specification allows digital I O signals to be exchanged over an RFCOMM connection RT
229. t 1 2S master Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth 163 Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module 2 12S slave 315 0 0 3 SCO SCO audio interface select O internal codec default 1 12S master 2 12S slave 3 external PCM interface S316 63 1 63 A2DP I2S sampling rate capability for A2DP values can be added for all sampling frequencies supported Register is referenced if S314 gt 0 at boot time requires AT amp W and ATZ for new values to become effective 1 48 kHz 2 44 1 kHz 4 32 kHz 8 24 kHz 16 22 05 kHz 32 16 kHz 1 A2DP Source at least one of the sampling frequencies 48kHz 44 1kHz must be supported A2DP Sink both 48 kHz and 44 1 kHz must be supported at least 2 values ignored as they are not supported by SBC or APTx 318 0 0 3 CVC Select CVC DSP image 0 disable CVC DSP not used un a SCO link 1 Headset 1 microphone 2 Headset 2 microphones 3 Hands free 1 microphone For details on CVC refer to the application note CVC on BTM5xx O provided by Laird Technologies under NDA 319 0 0 1 Misc SPP smart disconnect 0 disabled default 1 enabled With this setting BTM51x detects if there is any data pending in its internal buffers on an incoming disconnect notification If so then BTM51x delays the disconnection until all pending data
230. t Set Device Class Code Permanently S Register 515 sets the device class code permanently Use AT amp W to save the setting to non volatile memory The new value becomes visible on next power cycle which can be initiated by ATZ Refer to AT BTC lt devclasshex gt Set Device Class Code Temporarily for more about the device class code Response lt cr lf gt OK lt cr lf gt 2 5 1 6 AT BTC Read Device Class Code This command reads the current device class code Response lt cr lf gt 123456 lt cr f gt OK lt cr lf gt 2 5 1 7 AT BTF lt string gt Set Friendly Name Temporarily This sets the friendly name of this device as seen by other devices The new name becomes immediately visible Any name set by this command is lost on next power cycle Refer to S Register Table 3 1 Response lt cr lf gt OK lt cr lf gt 2 5 1 8 AT BIN lt string gt Set Friendly Name Permanently This sets the default friendly name of this device as seen by other devices It is stored in non volatile memory The new name becomes visible to other devices on next power cycle Use AT BTF to make the name visible immediately Use AT BTN To read it back An empty string 1 deletes the string from non volatile memory which enables the default name Laird BTM 789012 The digits in the default friendly name represent the last 6 digits of the local Bluetooth address Refer to S593 in Table 3 1 If a new value must be retained permanently save it to
231. t O0 lt cr lf gt OK lt cr If gt ATI72 response syntax lt index gt lt BdAddr gt lt pm gt lt interval gt lt state gt lt pm_cnct gt lt flags gt with lt index gt index of the entry starting with 1 lt BdAddr gt Bluetooth device address of remote device lt pm gt profile mask as per 102 four hexadecimal characters with leading 3 lt interval gt interval of reconnection attempts in seconds lt state gt Status of the ACR 1 attempting connection at every interval seconds 2 partly connected at least one profile of pm connected at least one profile of pm not connected attempting to connect the remaining profiles 3 fully connected all profiles of the ACR connected lt pm_cnct gt profile mask of actually connected profiles as per S102 four hexadecimal characters with leading lt flags gt option flags two hexadecimal characters with leading bitmask BitO always reconnect If this bit is set a normal disconnection yields reconnect attempts If bit is cleared the record is deleted from the ACR table on normal disconnect Only a link loss leaves the entry in the ACR table and allows reconnect attempts Bit1 always send AVRCP play Bit2 never send AVRCP play Example for ATI72 response 1 0016A4001793 0001 005 3 0001 00 2 CO9F43887E15 0180 005 3 0180 00 2 7 1 5 370 4 Automatic host less ACR mode If automatic mode is enabled Bit2 of S370 is s
232. t as 5C 2 5 9 8 SSO S Registers The following table lists S registers for SSO profiles Table 2 8 S Registers for SSO profiles 52 94 32 126 Escape sequence character It is not by default due to potential confusion when serial linked to a mobile phone which exposes an AT command set and also uses as default If both use there is confusion 94 is the character Ai 12 100 40 500 Escape sequence guard time in milliseconds with a granularity of 20 0 ms New values are rounded down to the nearest 20 ms multiple S507 0 0 2 When set to 0 a connection can be dropped using escape sequence only and the state of DSR line is ignored When set to 1 a connection can be dropped using EITHER the 444 escape sequence OR the DSR modem control line When set to 2 a connection can only dropped by deasserting DSR Mode 2 provides for the highest data transfer rate If the DSR line s status is to be conveyed to the remote device as a low bandwidth signal this register MUST be set to 0 Otherwise deasserting DSR is seen as a request to drop the Bluetooth connection This register affects S Register 536 see details of 536 Americas 1 800 492 2320 EN Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module S531 0 0 4 On SPP connect mode Specifies the mode on SPP connection establishment O Normal Da
233. t codes In this case ERROR codes gt 100 are presented as ERROR 99 and ATI12 retrieves the actual error code 2 9 21 ATI 54 55 56 status information for all profiles As of firmware v18 1 4 0 ATI commands are added to query status information such as remote Bluetooth device address RSSI receiver signal strength indicator and local HCI role for connected profiles e ATI54 print remote device s Bluetooth addresses of connected profiles Response one line for per profile gt lt BdAddr gt with lt BdAddr gt 12 hex digit Bluetooth device address lt profile_Mask 4 hex digit Example 0001 0016A40009C8 connection of SPP profile with device B 0080 C09F42934E02 connection of A2DP profile with device C 0100 CO09F42934E02 connection of AVRCP profile with device C If no profile is connected response is O zero ATI55 print RSSI receiver strength indicator for connected profiles Americas 1 800 492 2320 157 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Response one line for per profile lt profile_mask gt lt RSSI gt _4 hex_digits with lt RSSI gt signed decimal value of RSSI variable length Example 0001 11 RSSI of device with SPP connection device B 0080 4 RSSI of device with A2DP connection device C 0100 4 RSSI of device with AVRCP connection device C
234. t cr gt lt lf gt Maximum gain level reached lt cr gt lt If gt ERROR 58 lt cr gt lt lf gt Minimum gain level reached S register 589 can set the output gain level directly Alternatively S register 689 may set the required overall output gain in dBr multiplied by 10 Refer to Onboard Codec Gain 2 6 3 8 Input Gain Settings A2DP Source AT GIU AT GID AT GIU Increment audio input gain AT GID Decrement audio input gain Response lt cr gt lt lf gt OK lt cr gt lt lf gt lt cr gt lt lf gt ERROR 57 lt cr gt lt lf gt Maximum gain level reached lt cr gt lt lf gt ERROR 58 lt cr gt lt lf gt Minimum gain level reached S Register 590 can set the input gain level directly Alternatively S register 690 can set the required overall input gain in dBr multiplied by 10 Refer to Onboard Codec Gain 2 6 3 9 Release A2DP Connection AT APH ATH110D Release an A2DP connection by AT APH Alternatively you may use ATH110D 110D presents the UUID for the A2DP profile Refer to Disconnecting Profiles for more information Americas 1 800 492 2320 48 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 6 3 10 Suspend A2DP Stream AT APU When creating an A2DP link the module enters the streaming state normally Streaming can be manually suspended using AT APU The A2DP link is retained The asynchronous mess
235. t cr lf gt 2 5 3 General S Registers Refer to Appendix Table 3 1for a list of supported S Registers The main purpose of S Registers is to make the device configuration persistent All S Registers can be saved to non volatile memory by AT amp W In some cases an AT command and an S register exist for one and the same setting In the majority of those cases the AT command s setting is lost on next power cycle The S register can be saved and is still available after power cycle This rule applies to many but not all of those cases 2 5 4 AT Commands for Inquiry 2 5 4 1 AT BTl lt devclass gt Inquire This initiates an inquiry for delay seconds and max number of unique responses where delay is defined by S register 517 and max is specified by S register 518 The lt devclass gt is an optional parameter where the value specifies either a 6 digit device class code or a 2 digit major device class If it is not specified the value is taken from S register 516 When lt devclass gt is 6 hexadecimal characters long it specifies an AND mask which filters inquiry responses When lt devclass gt is 2 hexadecimal characters long it forces the inquiry to filter responses to devices that match their major device class code to this value which can only be in the range 00 to 1F The response format to AT BTI is defined by 330 by bitmask This is device address device class friendly name receiver strength indicator and extended inquiry da
236. t cr lf gt ERROR O5 lt cr If gt e g lt string gt too long 2 5 9 2 ATY lt string gt Send Data in Local Command and Connected Mode This command is similar to ATX in syntax and functionality except that the string is only copied to the output RF buffer When an empty string is presented all pending data in the output RF buffer is flushed The parameter lt string gt is any string not more than 29 characters long whereby a non printable character bh see below counts 3 characters This restriction results from the maximum AT command length which is 34 query by ATI15 The difference of 5 is caused by ATX 3 characters and the enclosing quotation marks 2 characters If the maximum string length is exceeded ERROR 05 syntax error occurs If a non visual character is to be sent then insert the escape sequence hh where hh are two hexadecimal digits The 3 character sequence hh is converted into a single byte before transmission to the peer Response lt cr lf gt OK lt cr If gt Or lt cr lf gt ERROR O5 lt cr If gt e g lt string gt too long 2 5 9 3 Enter Local Command Mode When in data and connected mode and when S 507 is set to O or 1 the host can force the device into a command and connected mode so that AT Commands can be issued to the device The character in this escape sequence is specified in the S2 register which may be changed In addition the escape sequence guard time is specified by S 12 B
237. t role support the setup should follow these steps 1 Identify the Bluetooth Device Address of the PC 2 Enable the AV Remote Control Service 3 Select the player and or setup display of incoming remote control commands 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 2 19 Figure 2 18 to Figure 2 23 show appropriate screenshots This example can be combined with the A2DP Example 1 A2DP Example 1 Then the AVRCP connection should be initiated after A2DP is connected Table 2 19 AVRCP Example 1 Command Sequence Preparation BTM5 AT amp F Restore factory default settings XX AVRCP profile is enabled per default in 102 AVRCP Control role is enabled per default in S301 ATZ Reset Preparation PC na 1 Select Options from the Bluetooth icon in the taskbar Figure 2 18 2 Identify the PC s Bluetooth Address lt BdAddr_PC gt in the General tab of Bluetooth Options Figure 2 18 3 Enable AV Remote Control Service Figure 2 18 4 Go to Other tab of Bluetooth Options and click AV Player Figure 2 19 5 Select TopRight at the Display Position dropdown menu Figure 2 20 6 Close each window by clicking OK Initiate BTM5 AT AVD Response Figure 2 21 Connection XX lt BdAddr_PC gt CONNECT lt BdAddr_PC gt 110E gt AVRCP
238. ta Refer to Figure 2 1 and Table 2 2 For 330 1 Response lt cr lf gt 12346789012 lt cr lf gt 12345678914 lt cr lf gt OK lt cr lf gt In the Bluetooth inquiry process a device could respond many times for a single inquiry request To ensure that an address is sent to the host only once for a particular AT BTI an array of addresses is created at the start of each AT BTI and is filled as responses come in This array of addresses is stored in dynamic memory If the memory allocation fails the inquiry procedure is aborted and an error response is sent to the host To clarify a single AT BTI does not return the same Bluetooth address more than once As long as the responding device is active all AT BTI commands always return it As the inquiry process is driven by randomness it is not guaranteed that each discoverable device is always found on the first attempt Sometimes more than one inquiry processes might be necessary to find a particular device The probability also depends on the inquiry scanning intervals of the device being searched for The inquiry process can be speed up if the friendly name is not required flag not set in 330 as part of the inquiry response or if a lt dev_class gt filter is used Americas 1 800 492 2320 15 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Although it is very convenient to have the fri
239. ta is exchanged between UART and RF 1 LOCAL_COMMAND UART input is parsed by the AT interpreter and RF data is discarded 2 REMOTE_COMMAND FF input is parsed by the AT interpreter and UART data is discarded If S Reg 536 is not 1 then this register cannot be set to 2 An ERROR is returned 3 LOCAL_COMMAND UART input is parsed by the AT interpreter Incoming RF data is sent to the host using the RX lt string gt asynchronous response 4 LOCAL_COMMAND On the RF side the GPIO is automatically sent when there is a change in input digital I O cable replacement mode S536 0 0 1 When set to 1 a remote device can capture the AT parser of this unit by sending this module an escape sequence Inter character timing is set via S Register 12 If S Register 507 is gt 2 reading this register always returns 0 Writing 1 results in ERROR 33 2 5 10 AT Commands for a Selected Peer Device This section describes AT commands to make the BTM Bluetooth device connectable for one specific remote device only or to automatically connect to one particular remote device on reset or power cycle Prior to firmware v18 1 3 9 the AT commands of this section applied to serial port profile SPP only Beginning with v18 1 3 9 including v18 1 4 0 and later these commands apply to all profiles supported by BTM51x 2 5 10 1 A7 B7P lt bd_addr gt Make Device Discoverable and Selectively Connectable Make the module discoverable
240. ta is transferred in so called I2S mode This means left justified mode with the MSB starting one SCK cycle delayed after transition of the WS signal The number of bits per sample is set to 24 24 SCK cycles between two WS transitions but the actual sampling bit length is only 16 bit Hence 8 SCK cycles are not used for data transmission Refer to Figure 2 32 time 1 f_sampling ws Ah Channel le 24 cycles SCK SD_IN OUT IS Mode Figure 2 32 BTM5 1x 12S data format This standard 12S data format can be modified to customer needs as described in the BCO5 EXT data sheet 10 chapter 10 p 50 However a modified I2S data format cannot be accomplished by AT commands Instead certain PSKEYs must be written to the BTM51x module Laird Technologies provide the utility PsUpdate bat which allows certain PSKEYs to be downloaded to a BTM51x module over the UART The PSKEY that applies for I2S configuration is Americas 1 800 492 2320 129 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module PSKEY_DIGITAL_AUDIO_CONFIG amp 01D9 More details on downloading PSKEYs over UART can be found in the application note CVC on BTM5xx which is provided by Laird Technologies under NDA 2 8 2 1 6 12S Cross Loopback I2S functions can be tested by a feature called 12S cross loopback mode In this mod
241. table ATS651 113C Use GPIO1 to make module discoverable and connectable BTM51x mini dev kit all revisions ATS371 32 Set discoverable connectable window to 32 seconds AT amp W Store settings ATS744 1 7 14 2 16 10 17 1 Set LEDO blink patterns ATZ Reset module AT72 Check ACR table Now scanning states can be triggered using GPIO_1 button on BTM511 DVK V04 When in discoverable and connectable state connect to the module from a smartphone Once the connection is established LEDO should start pulsing slowly When audio is transmitted from the phone e g by starting playback of music the LED should turn on permanently as long as audio is activated If you press the GPIO_1 button again the blink pattern should not change because a status with higher priority than scanning is being indicated currently Similarly you may test an incoming SPP connection Connecting or disconnecting SPP should not change the blinking pattern as long as audio is on or another connection exists A2DP AVRCP here After audio playback stops some phones leave the A2DP in streaming mode for a few seconds before suspending streaming to save power On streaming suspend audio circuitry is disabled and LEDO should fall back to indicate the connected state 2 8 Hardware Units BTM510 511 This section covers S Registers and AT Commands that are related to hardware units of a BTM510 or BTM511 device For this section refer to the Bluecore data sheet 10 for more
242. tch DREG 116 Internal error code DREG 117 Non volatile memory for dynamic register exhausted DREG 118 Maximum number of tuples exceeded DREG 119 Maximum dynamic register data length exceeded DREG 120 Internal error code DREG 121 Internal error code DREG 3 4 Status IDs automation Table 3 4 lists status IDs These are used with D Regs 744 745 Table 3 4 Status IDs 1 Not connectable Not discoverable 2 Discoverable 4 Connectable 8 Discoverable Connectable 16 Connected any profile 17 AudioOn any audio type Americas 1 800 492 2320 185 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 3 5 LED blink pattern IDs status indication Table 3 5 lists blink pattern IDs These are used with AT SILx y or D Regs 744 745 Table 3 5 Blink Pattern IDs 0 LED off LED on Blink fast Blink medium Blink slowly Flash fast Flash medium Flash slowly Pulse fast OO WINID Wm HR WIN Pulse medium oO Pulse slowly 3 6 List of UUIDs Table 4 4 provides a list of selected UUIDs For a complete list refer to the Assigned Numbers Service Discovery SDP document 8 by the Bluetooth SIG Table 3 6 Selected UUIDs 0x1101 Serial Port Profile SPP 0x1102 LAN access using PPP 0x1103 Dialup Networ
243. te command mode identical with ATI9 Get connection status ATI61 0 not connected of A2DP 1 connected and streaming 2 connected but not streaming suspended Get connection status ATI62 0 not connected of AVRCP 1 connected Get connection status ATI63 0 not connected of HSP Headset 1 ACL connected 2 audio connected Get connection status ATI64 0 not connected of HSP AG 1 ACL connected 2 audio connected Americas 1 800 492 2320 148 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Get connection status ATI65 of HFP HF 0 not connected 1 SLC connected 2 audio connected 3 in call SLC 4 in call audio 5 in call setup incoming dialling alerting SLC 6 in call setup incoming dialling alerting audio Get connection status ATI66 of HFP AG 0 not connected 1 SLC connected 2 Audio connected 3 in call SLC 4 in call audio 5 call setup ringing incoming call dialling or alerting outgoing call SLC 6 call setup ringing incoming call dialling or alerting outgoing call audio 8 in call but no SLC Get connection status ATI67 of DUN 0 not connected 1 connected 2 9 6 Disconnecting Profiles A connection to a profile can be released by ATH lt Profile UUID gt For A2DP and AVRCP this is a second way of disc
244. ter specifies a time in seconds for which the device stays in the S512 mode after power up or reset On timeout it aborts the discoverable and or connectable and fall back into 512 1 mode when it is not connectable or discoverable Note that if AT BTR has been used to specify a peer device then on reverting to mode 1 it attempts to make a connection to that peer device A power cycle reset via BREAK or ATZ is required to see the effects of change Granularity 4 if value is lt 60 round up 60 if value is gt 60 round down S555 1 leat n a If S Register 554 is nonzero after the post reset window expires defined by S554 the mode reverts to the mode specified in this register This allows for example the device to be discoverable and connectable on power up mode 4 or 7 and on window timer expiry to revert to connectable only mode 3 or 6 A power cycle reset via BREAK or ATZ is required to see effects of a change In some firmware builds S Registers 565 to 569 inclusive are visible which allows the start up mode to depend on the state of RI line Setting S Reg 565 forces the RI pin to be configured as an input For this feature to be active set SReg 565 to 1 In that case if RI is asserted on start up the start up mode is defined by S Reg 568 and if de asserted then S Reg 569 Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth 174 Laird Technologies BT
245. the EIR data in the baseband and deletes any data from the RAM buffer Response lt cr lf gt OK lt cr lf gt 2 5 5 11 AT BTE Delete RAM buffer This command deletes all data from the RAM buffer Response lt cr f gt OK lt cr lf gt 2 5 5 12 AT BTEW Delete FIR persistent store This command deletes the EIR persistent store Response lt cr lf gt OK lt cr lf gt Americas 1 800 492 2320 20 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 5 6 Secure Simple Pairing SSP Secure Simple Pairing SSP has been introduced since Bluetooth 2 1 EDR It aims to increase the security provided by a Bluetooth link whilst making the pairing process more user friendly There are whitepapers about SSP available through the internet provided by the Bluetooth SIG and other companies explaining the background and mechanisms of SSP They can be found by searching the internet for e g Bluetooth Secure Simple Pairing Read these to better understand SSP and the following settings 2 5 6 1 Security Level 320 The security level is defined in the BT2 1 EDR specification 1 vol3 Generic Access Profile Table 5 7 The specification provides four levels of security shown in Table 2 3 Table 2 3 Security Levels Level 3 MITM protection Man in the Middle attack High security Encryption User interaction Level 2 N
246. the link key The value MM indicates the result of the save operation A value of 00 implies success otherwise MM is an error code 2 5 8 AT Commands managing Trusted Devices 2 5 8 1 AT BTT List Trusted Device This command lists the contents of the trusted device database The link key is NOT displayed so the response is as shown below If the list is empty then just the OK response is sent Otherwise an OK terminates the list Use the command ATI6 to read the maximum size of the trusted device database Response lt cr lf gt 12346789012 lt cr lf gt 12345678913 lt cr lf gt 12345678914 lt cr lf gt OK lt cr H Americas 1 800 492 2320 27 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 5 8 2 AT BIT Add Trusted Device This command stores the cached link key in the non volatile database If the database is full it responds with an ERROR If the device is already in the database then the key is replaced If the link key cache is empty a pairing has not been performed since powering this responds with an ERROR Response lt cr lf gt OK lt cr f gt Or Response lt cr lf gt ERROR lt cr f gt 2 5 8 3 AT B7TD lt bd_addr gt Remove Trusted Device This command removes the specified device from the list of trusted devices in the non volatile database The response is OK even if the device is not in the database Respo
247. then this register cannot be set to 2 and an ERROR is returned 3 LOCAL_COMMAND UART input is parsed by the AT interpreter and incoming RF data is sent to the host using the RX lt string gt asynchronous response 4 LOCAL COMMAND and on the RF side the GPIO is automatically sent when there is a change in input digital Americas 1 800 492 2320 171 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module VO cable replacement mode 532 0 0 7 n a If non zero then on every connection a SCO channel audio is initiated Bit O for HVT Bit1 for HV2 and Bit2 for HV3 When the connection is lost the SCO channel disappears along with it 535 5 0 41 n a Link Supervision Timeout If units go out of range then a NO CARRIER message is sent to the host after the time specified here as of v18 1 4 0 changed default value from 20 gt 5 applies to outgoing connections of all profiles 536 0 0 1 n a When set to 1 a remote device can capture the AT parser of this unit by it sending this module an escape sequence The inter character timing is set via S Register 12 If S Register 507 is gt 2 then reading this register always returns 0 Writing 1 results in ERROR 33 538 1 0 1 Pairing If 1 then when a successful pairing occurs it is automatically saved in the trusted device database if it has room to store i
248. to AT BTX 2 When exiting an A2DP connection restore discoverable and connectable state according to 512 3 Enable both actions 1 and 2 default Also refer to Release A2DP Connection 309 1 O Audio Inter face Enable asynchronous FS message presenting sampling frequency and audio interface 0 Disable 1 Enable default S310 1 O AVRCP TG Configure PASS THROUGH PT Response 1 Enable automatic PT response response type is read from S311 default 0 Host is required to respond to PT Indication see AT AVR S311 1w 9r O AVRCP TG Set automatic PT response type This value is queried for automatic PT Response see Table 2 23 Default value is accepted 1w 9r Note if this value is set to reject 2w 10r then incoming Pass Through commands are not forwarded to the host processor no AVPTI message is sent to the host 312 1 Waa 15 A2DP SNK Set A2DP Sink supported features Bitmask Bit O Headphone default Bit 1 Speaker Bit 2 Recorder Bit 3 Amplifier Subsequent AT amp W plus ATZ required for a new value to become effective 313 1 E 15 A2DP SRC Set A2DP Source supported features bit mask Bit O Player default Bit 1 Microphone Bit 2 Tuner Bit 3 Mixer Subsequent AT amp W plus ATZ required for a new value to become effective 314 0 O A2DP A2DP audio interface select 0 internal codec defaul
249. tomatic ACR mode persistent store consumption depends largely on the number of connections to different devices and is difficult to predict For this scenario BTM51x provides two options of automatic reset controlled by flags of 374 Bit 0 automatic reset on disconnect if no more profile is connected and if NVQ lt 300 This is preventive but the conditions may not be met before ERROR 102 occurs Bit 1 immediate reset on ERROR 102 This is a robust recovery method but it may lose existing connections Combining both flags S374 3 seems ideal but it is up to the user to select the best solution for the application 2 9 23 AT SR lt role gt lt pm gt Setting HCI role master slave Usually the Bluetooth device which initiates a connection becomes master of the link and the accepting device becomes slave Some devices initiate a role change swapping master and slave role once a connection is established This is observed when initiating an SPP link from BTM51x to a PC Windows 7 reading back the local HCI role ATI56 has indicated slave for SPP Americas 1 800 492 2320 159 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module Normally the application doesn t need to address the HCI role However in some cases changing HCI role can resolve issues Such a scenario is an A2DP AVRCP connection initiated by BTM51x to an iP
250. tooth Profiles on BTM 2 6 1 Profile Activation To activate available profiles and advertise them to potential clients S102 is used Per default only SPP is activated value 1 Other supported profiles can be activated by setting the appropriate Flag in 102 Once 102 is written the value must be saved to non volatile memory AT amp W Subsequently a reset ATZ or power cycle is required AT amp W saves all S Registers to non volatile memory Americas 1 800 492 2320 34 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 6 2 SPP Serial Port Profile The serial port profile SPP enables bidirectional serial data transmission with a remote device like a wireless replacement for a serial cable SSP belongs to the group of serial stream oriented profiles SSO so refer to AT Commands for Serial Stream Oriented profiles SSO as well In order to use SPP enable the profile in S102 value 1 If it is not enabled prior set S102 and then issue AT amp W followed by ATZ 2 6 2 1 SPP example This section explains how to make an SPP connection between two Laird BTM devices This assumes devices A and B are connected to a terminal program e g Ezurio Terminal on a PC The example sequence of AT commands is listed in Table 2 9 Figure 2 3 SPP example Preparation of Device A Figure 2 6 show the Ezurio Terminal Tabl
251. tooth slots which are 625 ms long converted from values of S Registers 561 562 563 and 564 respectively ATI14 The current boot mode ATI15 The maximum length of an AT command not including the terminating carriage return ATI16 Codec Output Maximum Gain Range Americas 1 800 492 2320 178 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module ATI17 Codec Input Maximum Gain Range ATI18 Bluetooth version ATI19 Audio connection status 0 off 1 on ATI20 Returns the number of pending bytes in the RF buffer during a connection ATl21 The index of the profile instance owning an active SCO connection 0 none 1 HS 2 HSG 3 HF 4 HFG 5 SPP_BTA ATI22 Last SCO output gain ATI23 Last SCO input gain ATI24 Last A2DP output gain ATI25 Last A2DP input gain ATI26 Display current A2DP decoder info if 333 1 lt CodecTypeString gt lt Sysidhex gt lt BuildNohex gt lt PostProcFriendlyName gt lt SdkName gt CodecTypeString SBC AAC APTX Sysld BuildNo 4 hex digits Example SBC E006 0101 Music ADK2 0 When A2DP is connected but not streaming the extended data is not available Only the CodecTypeString e g SBC is printed in this case If S333 0 only the ID of current decoder type is printed O none 1 SBC 2 APTX 5 AAC ATI27 Current
252. tup 3 indicator is sent to HF If the telephone network does not provide an indication of alerting the remote party the HFG may not send this indication The status of the appropriate call record is changed from dialling to alerting Americas 1 800 492 2320 95 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module AT HFGC3 Signal to HF that remote party has answered the call CIEV 2 1 call 1 and CIEV 3 0 callsetup 0 indicators is sent to HF subsequently The status of the appropriate call record is changed from dialling or alerting to active AT HFGC4 lt number_string gt lt type gt This command is used if a call is initiated at the HFG and not at the HF OK is not sent to the HF in contrast to HFGC1 Signal an outgoing call status by sending CIEV 3 2 callsetup 2 indicator to HF If an audio connection does not exist it is initiated A call record with status dialling is created and can be checked by AT HFGC The optional parameters lt number_string gt and lt type gt are stored in the call record Their format is described in Signal incoming call from AG to HF 4_4 13 2 6 6 2 8 Signal termination or rejection of a call from AG to HF 6_4 15 AT HFGCH Terminate or reject all calls in one of the following states active incoming waiting dialling alerting And signal termination of
253. ture for managing EIR data is composed of three buffers and a set of AT commands around them Baseband EIR data visible to inquiring devices RAM buffer allows accumulation of data EIR persistent store non volatile buffer copied to baseband at boot time As the input buffer length for one AT command is limited there is a RAM buffer to accumulate several short data packets The accumulated data of the RAM buffer can be copied to the Baseband where it becomes visible to other inquiring devices immediately The content of the RAM buffer can also be copied to the EIR persistent store If the EIR persistent store contains data it is copied to the Baseband automatically at boot time This allows a flexible usage of extended inquiry data For example data with a low data rate e g temperature can be transmitted without creating a Bluetooth connection This method sacrifices encryption and authentication Extended Inquiry Response AT BTE command family We eA lial AT BTE lt data gt llle Delete AT BTE AT BTE AT BTE AT BTED AT BTE EIR Buffer AT BTEW EIR copy RAM copy Persistent Store AT BTE boot time copy Figure 2 2 Extended Inquiry Response command overview 2 5 5 1 EIR Data Format When passing EIR data lt data gt to AT commands AT BTE lt data gt AT BTE lt data gt each byte should be presented by its ASCII representatio
254. tures for local HF and features locally and connected remote HFG remotely Query NREC flag locally AT HFFN Returns status of NREC flag for local HF and and remotely connected remote HFG Disable noise AT HFZ Only works when NREC enabled in both local HF reduction echo and connected remote HFG otherwise ERROR 89 cancellation of HFG Request DTMF tone AT HFM lt x gt with lt x gt 0 9 A D from HFG Request a DTMF tone to be created by a connected HFG Disconnect SLC from HF and audio if exists AT HFH ATH111E ATH See sections 2 9 6 and 2 9 8 Enable verbose indicators 333 0 display indicator ID only in HFI asynchronous message refer to DTMF tone request 17_4 27 1 display indicator string in HFI asynchronous message refer to DTMF tone request 17_4 27 Set HF supported features 581 itmask it O echo cancellation and or noise reduction it 1 call waiting notification capability and 3 way alling it 2 CLIP presentation capability it 3 voice recognition activation it 4 Remote volume control it 5 Enhanced call status it 6 Enhanced call Control currently not supported Note Bit O Bit 4 of these settings are advertised in the Service Record of the HF Only CLIP presentation capability Bit 2 0x04 is currently supported in the BTM module After setting a new value to this S register the commands AT amp W and ATZ are
255. ty actual value is this value plus 411 actual value is returned by ATI412 S413 2000 4000 GPIO Component of long press duration in ms 500ms granularity actual value is this value plus 411 S412 actual value is returned by ATI413 S415 0 0 1 MicGain Enable Microphone Input Gain adds extra 24 dB to input gain 504 0 0 1 n a Enable silent operation Setting to 1 forces SO to 1 and suppresses messages arising from connections or pairing E g CONNECT NO CARRIER RING PAIR etc Suppressing connection based messaged allows the device to be configured in cable replacement mode 505 10 2 120 n a Minimum delay before abandoning connection attempt as a master Referenced by ATD In units of seconds See S Registers 530 and 543 also Note that since disconnection times vary this register only guarantees the minimum delay Note that for invalid addresses specified in the ATD command the NO CARRIER response is immediate See S register 560 for specifying disconnect max timeout S506 0 0 1 n a Enable Disable echoes The ATEn command also affects this 507 0 0 2 n a When set to 0 a connection can be dropped using escape sequence only and the state of DSR line is ignored When set to 1 a connection can be dropped using EITHER the 444 escape sequence OR the DSR modem control line When set to 2 a connection can only dropped using a de assertion of DSR Mode 2 provides for the highest data transfer rate
256. uetooth device address Device class code S register 330 is not referenced 2 5 4 4 AT BTIN lt devclass gt Inquire As per AT BTI but the response comprises for all inquiry responses Bluetooth device address Device class code e Friendly name S register 330 is not referenced 2 5 4 5 AT BTIR lt devclass gt Inquire As per AT BTI but the response comprises for all inquiry responses Bluetooth device address Device class code e Friendly name RSSI receiver signal strength indicator S register 330 is not referenced 2 5 4 6 AT BTlE lt devclass gt Inquire As per AT BTI but the response comprises for all inquiry responses Bluetooth device address Device class code e Friendly name RSSI receiver signal strength indicator Extended inquiry data S register 330 is not referenced Americas 1 800 492 2320 17 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 5 5 AT Commands for Extended Inquiry Response Data Bluetooth 2 1 specification allows up to 240 Bytes of extended inquiry data On BTM5xx modules this data is limited to a maximum length of 112 Bytes due to internal memory restrictions Extended inquiry data may to transmit information such as the friendly name UUIDs of supported profiles or user defined data within the inquiry process and without a Bluetooth connection The architec
257. um power consumption UART baud rate set to 115200 amp F5 Maximum power consumption UART baud rate set to 115200 The new values are not updated in non volatile memory until the AT amp W command is sent to the device Response lt cr lf gt OK lt cr If gt Or Response lt cr lf gt ERROR nn lt cr lf gt 2 5 2 5 AT amp F Clear Non volatile Memory The AT amp F variant of the command installs values in S registers as per command AT amp F4 and then erases all user parameters in non volatile memory The trusted device database is cleared as are parameters related to AT BTR AT BTN and AT BTS Response lt cr lf gt OK lt cr If gt Or Response lt cr lf gt ERROR nn lt cr lf gt 2 5 2 6 AT amp F Clear Non volatile Memory This command erases all user parameters in non volatile memory except S Registers 520 to 525 This means that the trusted device database is cleared as are parameters related to AT BTR AT BTN and AT BTS Response lt cr lf gt OK lt cr lf gt Or Response lt cr lf gt ERROR nn lt cr lf gt Americas 1 800 492 2320 14 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 5 2 7 AT amp W Write Registers to Non volatile Memory Writes current S Register values to non volatile memory so that they are retained over a power cycle Response lt cr lf gt OK lt cr f gt Or Response lt cr lf gt ERROR nn l
258. ure of a pass through command See Cable replacement for this purpose Table 2 54 BTM5 1x GPIO Function Mapping Codes Input 0x00 Cable Replacement TX Cable replacement via SPP data 0x01 RFC_RTC_TX Cable replacement via RFC control signals 0x02 RFC_RTR_TX Cable replacement via RFC control signals 0x03 RFC_IC_TX Cable replacement via RFC control signals 0x04 RFC_DV_TX Cable replacement via RFC control signals 0x05 Volume down single step Decrease output gain by one see AT GOD 0x06 Volume up single step Increase output gain by one see AT GOU 0x07 Volume down multiple after short press AT GOD S411 0x08 Volume up multiple after short press AT GOU S411 0x09 Volume down multiple after medium AT GOD 411 5412 press Ox0A Volume up multiple after medium press AT GOU S411 S412 Ox0B Headset Button AT HSB Headset profile HS unit Ox0C HF green button AT HFCA accept incoming calls HF unit Ox0D HF red button AT HFCH reject incoming call hang up call HF unit OxOE SSP YES button Equivalent to command AT BTBY positive confirmation of pairing request Americas 1 800 492 2320 Europe 44 1 Asia 852 29 142 628 858 940 23 0610 www lairdtech con bluetooth Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module OxOF SSP NO button Equivalent to command AT BTB
259. ut AT For values 0 22 refer to Table 2 40 gain Query last A2DP ATI24 For values 0 22 refer to Table 2 40 output gain Query last A2DP ATI25 For values 0 22 refer to Table 2 40 input gain Query current AT APM As of v18 1 4 0 for A2DP decoder SBC AAC APTX in post processing streaming state mode Set current AT APMx Range x 0 6 post processing For A2DP decoder in streaming state only mode Set default post 363 1 3 Whenever an A2DP decoder capable of post processing mode processing modes is loaded the mode defined by S363 is entered Refer to S363 Set default post processing mode Range 1 3 default value 1 Query available A2DP ATI38 Display Type SysID BuildNo FriendlyName and CSR decoders capable of post processing SDK of all available A2DP decoders capable of post processing Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module 2 6 4 AVRCP Audio Video Remote Control Profile The Audio Video Remote Control Profile remotely controls audio or video streaming devices A device must be defined as either control CT or target TG Furthermore you must assign a device to one of four categories Player Recorder Monitor Amplifier Tuner Menu Version 1 0 of AVRCVP is supported The AVRCP specification 3 adopts the AV C Digital Interface Command Set AV C
260. ution profile A2DP is enabled by issuing ATS102 128 After verifying that a role is set S300 0 the S registers must be saved by AT amp W and then issue ATZ to make the new settings effective If the A2DP flag in S102 0x80 is not set after these steps then S300 was 0 at boot time which is invalid for A2DP 2 6 3 4 Select A2DP Role The A2DP role is selected by S register 300 as follows 0 no role selected 1 A2DP Sink default 2 A2DP Source The setting must be saved by AT amp W and takes effect on next power cycle ATZ Americas 1 800 492 2320 46 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module CAUTION If S300 0 at boot no role selected 102 is set with the A2DP flag 0x80 the A2DP flag is cleared automatically A2DP cannot be enabled without a role selected 2 6 3 5 Set A2DP Device Class A1TS515 lt device_class gt AT amp W ATZ hex For compliance with the A2DP specification 2 and hence for successful interoperability to other devices you must set up a valid device class code The default device class code of a module is 0x001F00 which is invalid for A2DP The A2DP specification 2 mandates the following requirements for the device class of an A2DP device Mandatory to set the Rendering bit for the SNK and the Capturing bit for the SRC in the Service Class field Recomme
261. vice Address Device Type Laptop nd Detail Tray Icon Bluetooth Radio Power Radio is enabled c 8 C Hide Click Button to Disable Enable Bluetooth Services IV Bluetooth Information Exchange Service IT PAN Networking Service E Enable DHCP Service I Blyptocblatem htRer Service IV AV Remote Control Service Cancel Apply Figure 2 18 AVRCP Example 1 Bluetooth Address of PC and AV Remote Control Service Americas 1 800 492 2320 Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth 60 Laird Technologies BTM510 511 User Guide Bluetooth Multimedia Module ER ebe Security Bluetooth Information Exchanger Cather Diagnostics IT Admin COM Auto Connect Settings COM port settings for fax transmission or dial up accesses Settings AY Player Selection Choose the application to be operated by the A Remote Control feature AV Profile Copyright Protection Setting Connect only to a device which conform to the SCMS T copy protection method OK Cancel Sp Figure 2 19 AVRCP Example 1 Player Selection and Receiving Commands Display Setup Bluetooth Manager Bluetooth Security EZ Allow this device to connect Request Device Bluetooth Device Address 00 16 44 00 00 04 Bluetooth Device Name Laird BTMM 000004 Figure 2 20 AVRCP Example 1 Secure simple pairing dialogue BER CTS DSR D
262. w power operation Wi Fi co existence hardware support Americas 1 800 492 2320 6 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 2 AT COMMAND SET REFERENCE 2 1 Introduction This document describes the protocol used to control and configure the BTM Bluetooth device The protocol is similar to the industry standard Hayes AT protocol used in telephony modems It is appropriate for cable replacement scenarios as both types of devices are connection oriented Just like telephony modems the Laird Technologies device powers up in an unconnected state and only responds via the serial interface In this state the device does not even respond to Bluetooth Inquiries The host can then issue AT commands which map to various Bluetooth activities The configuration of the device can be saved so that on the next power up the device is automatically discoverable or connectable The device has a serial interface which can be configured for baud rates from 1200 up to 921600 default is 9600 and an RF communications end point The latter operates in terms of connected and unconnected modes and the former operates in command and data modes This leads to the matrix of states shown below Local Command Mode OK OK Remote Command Mode ILLEGAL OK Data Mode ILLEGAL OK The combinations Data Mode RF Unconnected and Remote Command Mode
263. ww lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 3 NEN Notification enable sends a notification to the host via UART on each status change if the GPIO is configured as input If changed AT amp W and ATZ are required for the new setting to become effective Notification format nGPIOx y r n With x GPIO index 1 8 y new pin state 0 1 with INV flag applied 0 disable notification 1 enable notification 4 5 FMS Function Mapping Select Select function mapping code FMC or av_operation_id see Table 2 21 FMC or av_operation_id is set in bit fields 8 15 O EMS NONE function mapping disabled 1 FMS_MODEMCTRL use GPIO as modem control line read only Table 2 51 2 FMS_AVRCP_OP bits 8 15 specify AVRCP operation ID Table 2 21 3 FMS_MAPCODE bits 8 15 specify Function Mapping Code Table 2 54 and Table 2 55 6 7 Reserved A Function Mapping Code FMC Table 2 54 and Table 2 55 or an 8 15 av_operation_id Table 2 21 is set in this bit field The pin is mapped to a profile erg specific function A2DP HFP or to an AVRCP remote control operation and it mapping code av_operation_id carries out the assigned operation A mapped function does not affect any other flag of the GPIO configuration register So e g DIR and INV must be set manually according to the selected function and hardware requirements Valid only if FMS gt 2 FMS sel
264. y default the guard time is set to 100 milliseconds Leaving data mode using severe impacts data throughput because each incoming character needs to be checked for 4 with respect to the guard time Alternatively a de assertion of the DTR DSR line can be used as the only trigger to leave data mode S507 2 This gives a significant higher data throughput because data is passed directly between UART and RF without character checking Refer to Dropping SSO Connections for more information Americas 1 800 492 2320 29 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module In modems this escape sequence is usually AAA is specified to avoid confusion when the module is providing access to a modem Response lt cr lf gt OK lt cr lz 2 5 9 4 II Enter Remote Command Mode When in data and connected mode the host can force the remote device into connected command mode so that AT Commands can be remotely issued to the device The escape sequence guard time is specified by S Register 12 and is the same as per the escape sequence By default the guard time is set to 100 milliseconds The remote device issues ATO as normal to return to data mode Refer to 0 For this command to be effective S Register 536 must be set to 1 Response lt cr lf gt OK lt cr lf gt 2 5 9 5 ATO Enter Data Mode letter ol Returns to d
265. y one of the following baud rates are accepted 1200 2400 4800 9600 19200 28800 38400 57600 115200 If S register 525 1 then the maximum baud rate is limited to 115200 S521 9521 1200 n a Change baud rate to non standard value BTM modules 921600 support any baud rate The only limitation is the integer arithmetic involved which may adjust the applied rate slightly If the internally computed baud rate is more than 2 offset from the desired input value then an ERROR is returned and the old baud rate will prevail To inspect the actual baud rate use ATS521 S521 should only be used for non standard baud rates For standard baud rates use 520 The effect is immediate and in fact the OK is sent at the new baud rate If S Register 525 1 then the max baud rate is limited to Americas 1 800 492 2320 170 Laird Technologies Europe 44 1628 858 940 Asia 852 2923 0610 www lairdtech com bluetooth BTM510 511 User Guide Bluetooth Multimedia Module 115200 In the event that a non standard baud rate is requested it is entirely possible that the host is not capable of generating such a baud rate In this case the module cannot be communicated with If this happens there is a procedure to recover from this situation which is described in Factory Default UART Baud Rate 523 1 1 2 n a Number of Stop bits See S Register 526 for further information S524 0 0 2 n a Parity O None 1 Odd 2
266. y to be included DSP routines can be licensed through a number of specialist partners Typical applications for these modules include Bluetooth stereo headsets VoIP phones and wireless audio links To speed product development and integration Laird Technologies has developed a comprehensive AT command interface that simplifies application development including support for audio and headset functionality Access to GPIO pins allows mapping for direct connection to actuator buttons on headsets Combined with a low cost development kit Laird Technologies Bluetooth modules provide faster time to market Features D rons Application Areas Fully featured Bluetooth multimedia module High quality stereo headsets Bluetooth v2 1 EDR Mono voice headsets Supports mono and stereo headset applications Hands free devices Adaptive Frequency Hopping to cope with interference Wireless audio cable replacement from other wireless devices MP3 and music players 32 bit Kalimba DSP for enhanced audio applications Phone accessories Support for Secure Simple Pairing VoIP products External or internal antenna options Cordless headsets HSP HFP A2DP and AVRCP audio profiles Automotive 16 bit stereo codec and microphone input Integrated audio amplifiers for driving stereo speaker Comprehensive AT interface for simple programming Bluetooth END product qualified Compact size Class 2 output 4 dBm Lo
Download Pdf Manuals
Related Search
Related Contents
Uniden EXI976 Ultra Compact 900MHz Cordless Telephone/Caller ID/Call Waiting (EXI M2110P SMART PRESSURE GAUGE USER`S MANUAL AEG MC2664E-M ASSEMBLÉE GÉNÉRALE MIXTE Versão completa em PDF - Escola de Enfermagem DEH-P7400MP - Pioneer Europe - Service and Parts Supply website Tecumseh AVB5535EXH Performance Data Sheet Handling instructions Bedienungsanleitung Mode d INSTALLATION MANUAL Copyright © All rights reserved.
Failed to retrieve file