background image

BTM520/521

DATA MODULE

USER MANUAL

Innovative 

Technology

 

 

for a 

Connected

 World

www.lairdtech.com

Summary of Contents for BTM520

Page 1: ...BTM520 521 DATA MODULE USER MANUAL Innovative Technology for a Connected World www lairdtech com ...

Page 2: ...0 521 11 References 11 Glossary of Terms 12 AT Command Set 13 Assumptions 13 Commands 13 General AT Commands 13 General Bluetooth Control 24 Hardware Unit Control 30 Bluetooth Profiles 32 Secure Simple Pairing 39 Link Key Management 39 Miscellaneous 40 Appendix 41 BT MM Unsolicited Messages 41 BT MM Error Responses 41 Mechanical Drawings 43 Mechanical Details 43 Recommended PCB Footprint 43 Diagra...

Page 3: ...ified so that no further Bluetooth qualification is required For users with more complex applications additional profiles will be available for file transfer object exchange dial up networking messaging and phone book control Future support also includes the Health Device Profile making this the ideal module for development of Continua compliant medical devices Because these modules are pre qualif...

Page 4: ...l or internal antenna options HSP HFP A2DP and AVRCP audio profiles Future support for OBEX DUN FTP HDP profiles for additional functionality 16 bit stereo codec and microphone input Integrated audio amplifiers for driving 16Ω speakers Comprehensive AT interface for simple programming Bluetooth END Product Qualified Compact Size Class 1 output 8dBm typical Low power operation Wi Fi Coexistence Har...

Page 5: ... supported Bits 8 Parity Odd even none Stop bits 1 or 2 Default Serial parameters 9600 n 8 1 Levels 1 7 3 6V CMOS independent of Vcc Modem Control RTS CTS DTR DSR DCD RI General Purpose Interface I O 16 general purpose I O pins ADC 2 x ADC I2 S Stereo Audio Digital Interface Bus PCM Shared with I2 S SPDIF Shared with I2 S LED Two dedicated Audio Codec Integrated stereo codec with 95dB SNR for DAC ...

Page 6: ...mA including speaker drive Low Power Sniff Mode Less than 1 5mA Supply Voltage Supply 3 0V 4 2V DC I O 1 7V 3 6V DC Coexistence Compatibility WLAN 802 11 2 3 and 5 wire hardware coexistence schemes supported Connections External Antenna option Pad for 50 Ohm antenna BTM520 Interface Surface Mount Pads Physical Dimensions 20 0mm x 36 0mm x 4 9mm Weight 3 grams Environmental Operating Temperature 30...

Page 7: ...y 16 VDD_PIO VIO supply 17 VDD_IN Main supply 18 GND 19 AUDIO_GND 20 SPKR_B_P Speaker channel B right Note 3 21 SPKR_B_N Speaker channel B right Note 3 22 SPKR_A_P Speaker channel A left Note 3 23 SPKR_A_N Speaker channel A left Note 3 24 MIC_BIAS Microphone bias Note 4 25 MIC_BN_C Microphone channel A left Note 4 26 MIC_BP_C Microphone channel A left Note 4 27 MIC_AP_C Microphone channel B right ...

Page 8: ...1 ADC Input 10 bit 0 1 5V input range 68 PIO10 DSR Host I O VPADS 69 PIO11 DTR Host I O VPADS 70 AIO0 ADC Input 10 bit 0 1 5V input range 71 PIO9 DCD Host I O VPADS 72 PIO13 SDA Host I O VPADS 73 PIO8 RI Host I O VPADS 74 PIO6 WLAN_ACTIVE Host I O BT Co existence VPADS 75 GND 76 USB_D VUSB 77 USB_D VUSB 78 PIO2 USB_PULL_UP VIO 79 VDD_USB VUSB supply 80 VREGENABLE_H Main regulator enable pull high ...

Page 9: ...Vil 0 3 0 25VDD_USB Output Voltage Levels Voh Iout 4mA 0 75VDD_USB VDD_USB Vol Iout 4mA 0 0 125 Logic Levels VIO Input Voltage Levels Min Typ Max Vih 0 625VDD_IO VDD_IO 0 3 Vil 0 3 0 25VDD_IO Output Voltage Levels Voh Iout 4mA 0 75VDD_IO VDD_IO Vol Iout 4mA 0 0 125 Logic Levels VPADS Input Voltage Levels Min Typ Max Vih 0 625VDD_PADS VDD_PADS 0 3 Vil 0 3 0 25VDD_PADS Output Voltage Levels Voh Iout...

Page 10: ...microphone should be biased as follows The input impedance on the microphone inputs in microphone mode is typically 6kΩ In order to maintain the regulation on the MIC_BIAS pin the current drawn must be in the range 0 2 1 23mA If the resistor draws less current than this then an additional resistor to ground must be added to pre load the microphone output The audio input is designed for use with in...

Page 11: ... subsequent power up the device is discoverable or automatically connects The device has a serial interface which can be configured for baud rates from 1200 up to 921600 default setting is 9600 and an RF communications end point The latter has a concept of connected and unconnected modes and the former will have a concept of command and data modes This leads to the matrix of states shown below RF ...

Page 12: ...ng an analogue digital signal DAC Digital to Analogue Converter DSP Digital Signal Processor DUN Dial Up Network Profile FTP File Transfer Profile GOEP Generic Object Access Exchange Profile GPIO General Purpose Input Output HFP Hands Free Profile HID Human Interface Device Profile I O IO Input Output Mic Microphone OPP Object Push Profile PBAP Phone Book Access Profile PWM Pulse Width Modulation ...

Page 13: ...ing delimited by double quotes E g Hello World The character MUST be supplied as delimiters uuid A 4 character UUID number consisting of ASCII characters 0 to 9 A to F and a to f General AT Commands 1 AT Used to check the module is available Response cr lf OK cr lf 2 ATA Answer Call Accept an incoming connection which is indicated by the unsolicited string cr lf RING 123456789012 cr lf every secon...

Page 14: ...urned if the R modifier is specified AND a Bluetooth address If both R and L modifiers are specified then an error will be returned Response cr lf CONNECT 123456789012 AE cr lf Or cr lf NO CARRIER cr lf 6 ATEn Enable Disable Echo This command enables or disables the echo of characters to the screen A valid parameter value will be written to S Register 506 All other values of n will generate an err...

Page 15: ...on is initiated A value of 0 disables this feature If S0 0 and S100 0 then S0 must be S100 If a value is entered which violates this rule then ERROR 29 is sent in response S101 1101 0 ffff UUID of default SPP based profile when not specified explicitly in the ATD command S102 1 1 0x7FF Defines a set of bits masks for enabling profile servers Values can be ORed 0x001 is Serial Port Profile 0x080 is...

Page 16: ...or automatic PT Response see Table 3 10 The written value is mapped internal that is why the Read value is different from the written value The Read value is actually sent out as response S312 1 0 15 A2DP sink supported features Bitmask Bit 0 Headphone default Bit 1 Speaker Bit 2 Recorder Bit 3 Amplifier S313 1 0 15 A2DP source supported features Bitmask Bit 0 Player default Bit 1 Microphone Bit 2...

Page 17: ...ctions or pairing E g CONNECT NO CARRIER RING PAIR etc Suppressing connection based messaged allows the device to be configured in cable replacement mode S505 10 2 120 Minimum delay before abandoning connection attempt as a master Referenced by ATD In units of seconds See S Registers 530 and 543 also Please note that as disconnection time can vary this register only guarantees the minimum delay No...

Page 18: ...s defined by S Reg 566 and if deasserted then S Reg 567 S514 10 1 60 Pairing Timeout in seconds This includes the time a host takes to supply the PIN number when PIN messages are indicated S515 0x001F00 0 0xFFFFFF Default Device Class Code to be used with AT BTO when it is not explicitly specified When queried the value is always printed as a hexadecimal number To change the device class of the mo...

Page 19: ...s connectable or discoverable then GPIO4 will blink This register will not necessarily be effective immediately after changing the value It must be saved to non volatile store using AT W and will operate as expected after an ATZ or a power cycle S535 20 0 41 Link Supervision Timeout If units go out of range then a NO CARRIER message will be sent to the host after the time specified here S536 0 0 1...

Page 20: ...hile in command and connected mode then on going back online using the ATO command a fresh signal will be sent to the peer to update the bits S552 0x0122 0x0FFF This register specifies in each 4 bit nibble how the DTR DCD RI output pins are controlled when 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 Each nibble...

Page 21: ...by ok When Bit 1 is 1 then error responses do not include the error number and instead the error number can be retrieved using ATI12 S560 15 15 120 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 There can be instances where a confirmation does not arrive and so...

Page 22: ...ead S Register Valid Range This will return the valid range of values for register n For recognised values of n Response cr lf Sn nnnn mmmm cr lf OK cr lf For unrecognised values of n Response cr lf ERROR nn cr lf 11 ATZ n Hardware Reset and emerge into mode n Forces the device through a hardware reset which means it will eventually come alive in the local command and unconnected mode This allows ...

Page 23: ...8 The chipset format I9 0 if not in a connect state and 1 if in a connect state I11 The reason why a NO CARRIER resulted in the most recent attempt at making an outgoing connection Where 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 uuid requested not availab...

Page 24: ... cr lf General Bluetooth Control 1 AT BTAn Control Audio Channel Once a Bluetooth connection is active and assuming the peer device is also a Laird Technologies device this command is used to start stop a SCO channel to transfer audio between the two peer devices On receipt of the command the following response immediately follows Response cr lf OK cr lf The lower layers then go through the proces...

Page 25: ... the non volatile database If the device is not in the database then the response will still be an OK Response cr lf OK cr lf 5 AT BTD Remove All Trusted Devices This command is used to remove all devices from the list of trusted devices in the non volatile database No confirmation will be asked for So beware WARNING If you make an authenticated connection the link key gets cached in the underlyin...

Page 26: ... is used to filter inquiry responses When devclass 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 Response cr lf 12346789012 cr lf 12345678914 cr lf OK cr lf If the module is waiting for an incoming connection entered via AT BTP AT BTG AT BTQ then it will respond wi...

Page 27: ...hen the pin is written to non volatile memory for future use Specifying an empty string deletes the key from the non volatile memory The string length must be in the range 0 to 8 otherwise an error will be returned Response cr lf OK cr lf 14 AT BTM Delete Incoming Peer Address This command is used to delete the peer address previously stored using AT BTR bd_addr Response cr lf OK cr lf 15 AT BTM R...

Page 28: ...he receive buffer until a Bluetooth connection is established with the peer device and it then sends the buffer across This means that if the peer device is not in the vicinity and will never be there the device effectively becomes useless as in this circumstance a host would want to get attention of the AT parser to send it new commands probably one to delete the peer device In this circumstance ...

Page 29: ...se the AT BTK command 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 The link key can be stored in a non volatile database within the device The list of trusted devices is managed using commands AT BTT AT BTT and AT BTD The AT BTT command produces a list of trusted Bluetooth addresses link key is NEV...

Page 30: ...S690 the overall gain dBr must be entered multiplied by 10 If the input value doesn t match a gain table entry the nearest possible value is set The actually set value can be checked by reading back S689 S690 The value of S689 S690 is printed out multiplied by 10 in order to avoid non integer numbers The new command class AT G is introduced in Bism3 which enables incremental and decremental gain s...

Page 31: ...lt 15 See Gain Table S690 is affected too Set input overall gain dBr S690 450 215 default 0 See GainTable value must be entered and is returned multiplied by 10 S590 is affected too Increment current output gain level AT GOU Error 57 may appear if maximum gain level reached Decrement current output gain level AT GOD Error 58 may appear if minimum gain level reached Query current output gain level ...

Page 32: ...ated by setting the appropriate Flag in S Register 102 see Table 3 1 After S Register 102 has been written all S Registers must be saved to non volatile memory AT W and subsequently a reset has to be carried out ATZ 2 A2DP The Advanced Audio Distribution Profile is used to transmit high quality audio streams between two Bluetooth devices An A2DP role must be assigned to a BT MM module either sourc...

Page 33: ...90 450 215 Set codec input gain in dBr 10 applies to source default 0 Set A2DP sink supported features bit mask S312 0 15 Bitmask sink supported features Bit 0 Headphone default Bit 1 Speaker Bit 2 Recorder Bit 3 Amplifier Set A2DP source supported features bit mask S313 0 15 Bitmask source supported features Bit 0 Player default Bit 1 Microphone Bit 2 Tuner Bit 3 Mixer 3 AVRCP The Audio Video Rem...

Page 34: ...command mode S Register 531 is ignored for AVRCP connections 3 1 2 Release AVRCP control connection AT AVH Release AVRCP control connection Response cr lf NO CARRIER 110E cr lf 3 1 3 Send UNIT INFO Request AT AVU Send a Unit Info request to a connected AVRCP target Response immediately cr lf OK cr lf On command completion cr lf AVUR n unit_idhex unit_typehex company_idhex cr lf n statusdec 0 succe...

Page 35: ...cr lf AVPTC n operation_idhex button_state cr lf after command completion If status n indicates an unsuccessful outcome operation_idhex and button_state are omitted 3 2 AVRCP Target TG This section describes AT Commands and S registers when BT MM is configured as an AVRCP Target S301 2 In this mode BT MM supports one subunit PANEL see 5 3 2 1 Incoming AVRCP Connection Request An incoming AVRCP con...

Page 36: ...nse S305 0 1 default 1 Enable Subunit Info Response S306 0 1 default 1 Configure PASS THROUGH PT Response S310 0 1 1 Enable automatic PT response response type is read from S311 default 0 Host is required to respond to PT Indication see AT PTR Set automatic response type S311 0 7 This value is queried for automatic PT Response see Table 3 10 Default value is accepted 1w 9r Advertise service S102 2...

Page 37: ...0x0B Favorite menu 0x0C Exit 0x0D 0 0x20 1 0x21 2 0x22 3 0x23 4 0x24 5 0x25 6 0x26 7 0x27 8 0x28 9 0x29 Dot 0x2A Enter 0x2B Clear 0x2C Channel up 0x30 Channel down 0x31 Sound select 0x32 Input select 0x33 Display information 0x34 Help 0x35 Page up 0x36 Page down 0x37 Power 0x40 Volume up 0x41 Volume down 0x42 Mute 0x43 Play 0x44 PLAY Stop 0x45 STOP Pause 0x46 PAUSE Record 0x47 Rewind 0x48 REWIND F...

Page 38: ...on of AVRCP control connection request CONNECT 0123456789012 AE 110E AVRCP control connection established 0123456789012 bd_addr of peer device A authenticated E encrypted 110E UUID indicating AVRCP NO CARRIER 110E AVRCP connection rejected or closed NO CARRIER All Connections closed AVUR unit_typehex company_idhex AV Unit Info Response sent in response to AT AVU UNIT INFO Request unit_type see Tab...

Page 39: ... 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 wants to connection 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 ATD BdAddr AT AP...

Page 40: ...be released ATH may be used Please see Table 3 13 3 Production Info String A string with production information can be retrieved by ATI200 Table 3 13 Profile Release Commands Task AT Command Comment Disconnect A2DP ATH110D orAT 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 releas...

Page 41: ...n_idhex button_state subunit_idhex subunit_typehex Indication of incoming Pass Through command operation_idhex see Table 3 8 button_state 0 pushed 1 released subunit_idhex subunit id subunit_typehex subunit type see Table 3 9 AVPTC n operation_idhex state Confirmation of AT AVC Control Command Request n 0 successful 1 timeout 2 not successful other than timeout PAIR BdAddr Incoming pairing request...

Page 42: ...fier cannot be specified in ATD command 35 Invalid Major Device Class valid value in range 0x00 to 0x1F inclusive 36 Pairing in progress Command cannot be actioned try again later 37 Invalid Sniff parameter specified E g new Attempt value greater than MinInterval Solution is to first increase MinInterval and re enter the Attempt value 38 Get Remote Friendly name Failed 39 Failed to change mode to ...

Page 43: ...DE E D 34 RF OUT SIDE VIEW Description 54 pin BT Voice Module 8X6 Flash Size 20 0 x 14 0 x 2 4mm Pitch 1 0mm Dimension Minimum Typical Maximum Notes H A1 A2 A b A 2 4 2 7 A1 0 8 0 9 1 0 A2 1 5 1 7 b 0 60 D 13 87 14 0 14 13 E 19 87 20 0 20 13 e 1 0 D1 11 0 E1 14 0 F 1 50 G 3 00 PCB Thickness RF Shield Height Global pad width Global pitch 2 3 H 0 85 Global length of pad to edge of board Units mm Pin...

Page 44: ...0R R16 0R 1 2 R25 NF 0R R25 NF 0R 1 2 R2 0R R2 0R 1 2 C33 NF 100u C33 NF 100u R22 NF 0R R22 NF 0R 1 2 J2 3 way 2 5mm audio jack J2 3 way 2 5mm audio jack 1 2 4 3 C3 100u C3 100u 1 2 SW3 NF SW3 NF 1 3 2 4 R17 0R R17 0R 1 2 C14 15pF C14 15pF 1 2 R10 1MR R10 1MR 1 2 R15 0R R15 0R 1 2 R6 0R R6 0R 1 2 SW4 NF SW4 NF 1 3 2 4 TP3 TP3 1 C12 15pF C12 15pF 1 2 R9 39R R9 39R 1 2 R29 0R R29 0R 1 2 R36 2K2 R36 ...

Page 45: ...2 GND 3 OUT 4 VCC 5 U4 CONN_SM_54 U4 CONN_SM_54 PIO_15 DTR 1 PIO_5 BT_STATE BT_PRIORITY 2 PCM_IN 3 PCM_OUT 4 PCM_SYNC 5 PCM_CLK 6 VDD_USB 10 VDD_IO 11 MASTER_VIN 12 SPI_CS 14 SPI_MISO 15 SPI_CLK 16 SPI_MOSI 17 PIO_2 DSR 18 LED_EXT1 7 LED_EXT0 8 PIO_0 BT_ACTIVE 21 GND2 22 AUDIO_GND 23 SPKR_A_N 24 SPKR_A_P 25 SPKR_B_N 26 SPKR_B_P 27 MIC_BIAS 28 BC05_RST 54 PIO_6 WLAN_ACTIVE 53 USB_D 46 USB_D 45 PIO_...

Page 46: ...e M1 Mounting Hole R84 10K R84 10K 1 2 R73 110R R73 110R 1 2 R90 0R R90 0R 1 2 L5 BLM18PG221SN1D L5 BLM18PG221SN1D 1 2 FID2 Fiducial FID2 Fiducial D3 Diode_S1A D3 Diode_S1A 1 2 R11 NF 9K1 R11 NF 9K1 1 2 CN1 DC Power jack_2 1mm CN1 DC Power jack_2 1mm 1 2 3 R77 1K R77 1K 1 2 R91 NF 9K1 R91 NF 9K1 1 2 R81 0R R81 0R 1 2 U6 MCP1726 ADJE MF U6 MCP1726 ADJE MF Vin_1 1 Vin_2 2 SHDN 3 GND 4 PWRGD 5 Cdelay...

Page 47: ... Plus Module with integrated antenna DVK BTM520 Development Board with BTM520 soldered in place DVK BTM521 Development Board with BTM521 soldered in place General Comments This is a preliminary user manual Please check with Laird Technologies for the latest information before commencing a design If in doubt ask Refer to the schematic BTV R 003 pdf for the Development Kit for examples of typical pi...

Page 48: ...ress 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 equip...

Reviews: