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 BC05
chipset, these modules provide exceptionally low power consumption with outstanding range.
Supporting the latest Bluetooth Version 2.1+EDR specication, these modules provide the
important advantage of secure simple pairing that improves security and enhances easy use.
At only 14mm x 20mm, the compact size of the BTM510 makes it 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-qualied stack along with SPP, HFP 1.5, HSP, AVRCP, and A2DP
proles. 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 BC05.
This is integrated with the Bluetooth functionality which allows designers to add signicant
product enhancements including features such as echo cancellation, noise reduction, and
audio enhancement using additional soft codecs. The availability of the 16MB of ash memory
in the module allows complex functionality 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 simplies 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
FEATURES
• Fully featured Bluetooth® multimedia module
• Bluetooth® v2.1+EDR
• Supports mono and stereo
headset applications
• Adaptive Frequency Hopping to cope with
interference from other wireless devices
• 32bit Kalimba DSP for enhanced
audio applications
• Support for Secure Simple Pairing
• External or internal antenna options
• HSP, HFP, A2DP, and AVRCP audio proles
• 16-bit stereo codec and microphone input
• Integrated audio ampliers for driving
stereo speaker
• Comprehensive AT interface for
simple programming
ConnectionsExternal Antenna (option)Pad for 50 Ohm antenna – BTM510
Interface Surface Mount Pads
PhysicalDimensions14.0mm x 20.0 x 1.6mm - BTM510
Weight3 grams
EnvironmentalOperating Temperature -30°C to +70°C
Storage Temperature-40°C to +85°C
ApprovalsBluetooth
FCCMeets FCC requirements
CE & R&TTEMeets CE and R&TTE requirements
MiscellaneousLead freeLead-free within EU requirements and RoHS compliant
Warranty12 Months
®
including extensions for Audio control.
Direct mapping of GPIO to audio functions, e.g. Play, Volume,
etc.
S Registers for non-volatile storage of parameters
Note: 1. Reset input is active low. Input is pulled up to VDD_IN via 22k. Minimum reset pulse width is 5ms.
2. LED drive pins are open drain outputs and hence the external circuit to the right should be used.
The voltage on the module pad should be maintained below 0.5V
in which case the Ron of the FET is around 20Ω. Provided that this
condition is met, then the current owing through the diode is:
F
led
I
VDD - V
=
R + 20
Where VF is the forward bias voltage of the LED.
3. The speaker output is capable of driving loads with a minimum
impedance of 16Ω directly.
4. The audio inputs can operate in either line input mode or microphone
mode. The input circuit has a two stage amplier – the rst stage
provides a xed 24dB gain and the second a variable gain of
between -3dB and 18dB. If an input gain of less than 24dB is selected,
then the rst stage is switched out and the module is operating in line input mode.
When operating in microphone mode the
microphone should be biased as follows:
7
www.lairdtech.com
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 microphone 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 inputs of between 1μA
and 10μA at 94dB SPL. If the biasing resistors are set to 1kΩ, this implies a microphone with a
sensitivity in the range -40dBV to -60dBV.
The low pass lter elements formed by the inductor and capacitor are required to eliminate RF pick
up on the microphone inputs and should be placed as close to the module as possible.
When operating in line input mode, the input can be connected directly to the module input pins
in either single or double ended conguration as follows:
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
OPERATING
PARAMETERS
OPERATING PARAMETERS
RECOMMENDED OPERATING CONDITIONS
Operating ConditionMinMax
VDD_USB
(USB compatibility not required)
VDD_USB
(USB compatibility required)
VDD_IO1.73.3
VDD_IN3.03.6
1.73.6
3.13.6
VOLTAGE SPECIFICATIONS
LOGIC LEVELS (VUSB)
Input Voltage LevelsMinTypMax
V
ih
V
il
Output Voltage Levels
(Iout = -4mA) 0.75VDD_USBVDD_USB
V
oh
(Iout = 4mA)00.125
V
ol
LOGIC LEVELS (VIO)
Input Voltage LevelsMinTypMax
V
ih
V
il
Output Voltage Levels
(Iout = -4mA) 0.75VDD_IOVDD_IO
V
oh
(Iout = 4mA)00.125
V
ol
0.625VDD_USBVDD_USB+0.3
-0.30.25VDD_USB
0.625VDD_IOVDD_IO+0.3
-0.30.25VDD_IO
LOGIC LEVELS (VUSB – USB TERMINALS D+, D-)
Input Voltage LevelsMinTypMax
V
ih
V
il
Output Voltage Levels (to correctly terminated USB cable)
2.8VDD_USB
V
oh
V
ol
0.7VDD_USB
0.3VDD_USB
00.2
NOTES FOR PCB LAYOUT:
1. The RF output pin must be matched to a 50Ω strip-line or coplanar waveguide on the antenna-less version (BTM510).
2. Ensure that there are no exposed conductors under the module to avoid shorts to the test points on the module underside.
This document describes the protocol used to control and congure the BTM Bluetooth device.
The protocol is similar to the industry standard Hayes AT protocol used in telephony modems which is
appropriate for cable replacement scenarios, as both types of devices are connection oriented.
Just like telephony modems, Laird Technologies’ devices power up in an unconnected state and will only
respond via the serial interface. In this state, the device will not even respond to Bluetooth inquiries. Then,
just like controlling a modem, the host can issue AT commands which map to various Bluetooth activities.
The conguration of the device can be saved, so that on a subsequent power up the device is discoverable
or automatically connects.
The device has a serial interface which can be congured 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 UnconnectedRF Connected
Local Command ModeOKOK
Remote Command ModeILLEGALOK
Data ModeILLEGALOK
The combinations ‘Data and RF Unconnected Mode’ and ‘Remote Command and RF Unconnected Mode’
do not make sense and will be ignored.
Navigation between these states is done using the AT commands which are described in detail in
subsequent sections.
www.lairdtech.com
9
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT COMMAND SET
REFERENCE
GLOSSARY OF TERMS
Description
A2DP:Advanced Audio Distribution Prole
ACL: Asynchronous Connection-Oriented Link
ADC:Analogue to Digital Converter
AGHFP:Audio Gateway Hands-Free Prole
AT:Command prex, ‘Attention’
AVRCP:Audio/Video Remote Control Prole
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
DSP:Digital Signal Processor
DUN:Dial-Up Network Prole
EIR:Extended Inquiry Response
eSCO:Enhanced Synchronous Connection Oriented Link (used for Audio)
FTP:File Transfer Prole
GOEP:Generic Object Access Exchange Prole
GPIO:General Purpose Input Output
HF:Hands-free Role of Hands-free Prole (“Hands-free Unit”)
HFG:Audio Gateway Role of Hands-free Prole (“Hands-free Gateway”)
HFP:Hands Free Prole
HID:Human Interface Device Prole
HS:Headset Role of Headset Prole (“Headset”)
HSG:Audio Gateway Role of Headset Prole (“Headset Gateway”)
HSP:Headset Prole
I/O (IO):Input/Output
Mic:Microphone
MITM:Man In The Middle
OPP:Object Push Prole
PBAP:Phone Book Access Prole
PT:PASS THROUGH Command
PWM:Pulse Width Modulation
SBC: Sub Band Codec
SCO:Synchronous Connection Oriented Link (used for Audio)
This section describes the AT Command Set for a BTM module. This section is structured in functional
groups of AT commands related to module conguration, Bluetooth proles, hardware units and
miscellaneous purposes.
Assumptions
1. All commands are terminated by the carriage return character 0x0D, which is represented by the string
<cr> in descriptions below this cannot be changed.
2. All responses from the BTM device have carriage return and linefeed characters preceding and
appending the response. These dual character sequences have the values 0x0D and 0x0A respectively
and shall be represented by the string <cr,lf>.
3. All Bluetooth addresses are represented by a xed 12 digit hexadecimal string, case insensitive.
4. All Bluetooth Device Class codes are represented by a xed six digit hexadecimal string, case insensitive.
5. All prole specic commands are identied by the prex shown in Table 3.1
ProleTermAT-Command Prex
Serial Port ProleSPPAT+SP…
Advanced Audio Distribution ProleA2DPAT+AP…
Audio/Video Remote Control ProleAVRCP AT+AV…
Headset ProleHSPAT+HS…
Hands-Free ProleHFPAT+HF…
Dial-Up Network ProleDUNAT+DU…
Table 3.1: AT Command prex for proles
Command Syntax
The following syntax is employed throughout this document to describe optional or mandatory parameters for
AT commands.
<bd_addr>A 12 character Bluetooth address consisting of ASCII characters ‘0’ to ‘9’, ‘A’ to ‘F’ and ‘a’ to ‘f’.
<devclass>A six character Bluetooth device class consisting of ASCII characters ‘0’ to ‘9’, ‘A’ to ‘F’ and ‘a’ to ‘f’.
nA positive integer value.
mAn integer value which could be positive or negative, which can be entered as a decimal value or
<string>A string delimited by double quotes, e.g., “Hello World”. The “ character MUST be supplied as delimiters.
<uuid>A four character UUID number consisting of ASCII characters ‘0’ to ‘9’, ‘A’ to ‘F’ and ‘a’ to ‘f’.
in hexadecimal if preceded by the ‘$’ character, e.g., the value 1234 can also be entered as $4D2.
General AT Commands
1. AT
Used to check the module is available.
Response: <cr,lf>OK<cr,lf>
2. 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.
E0 … Disable echo.
E1 … Enable echo.
All other values of n will generate an error.
Response: <cr,lf>OK<cr,lf>
Or
Response: <cr,lf>ERROR nn<cr,lf>
www.lairdtech.com
12
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT COMMAND SET
REFERENCE
3. ATZ<n> {Hardware Reset and Emerge Into Boot 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 changes to the non-volatile memory to take effect.
The module will issue an OK response after the reset is complete and it is ready to receive commands
once again.
ATZ and ATZ0 signify reset and emerge into the current boot mode (see command ATI14). ATZ1 to ATZ4
instructs the module to reset and then emerge into the appropriate boot mode. Note that S Register 103
species the boot mode from cold.
Boot modes are required to congure some low level device settings which cannot be congured by
S registers and AT commands. Currently there are predened settings dening the PCM data format
to be used with certain codec ICs (applies mainly to BC04).
Response after reset: <cr,lf>OK<cr,lf>
4. AT+BTC<devclass
This command is used to set the device class code which will be sent in subsequent inquiry responses.
It can be read back using the AT+BTC? Command, as described below.
<devclass> is a six digit hexadecimal number derived as per “Bluetooth Assigned Numbers” [8].
The 24 bits are made of four elds briey described as follows (bit 0 corresponds to the least
signicant bit):-
Bits 0-1:Format Type. This eld currently only has a value of 00 (i.e.,
Bits 2-7:Minor Device Class: The value of these six bits is interpreted
Bits 8-12:Major Device Class: Five bits, refer to Figure 1 and Table 3 in
Bits 13-23:Major Service Class: 11 bit eld, used as a mask to dene
> {Set Device Class Code Temporarily}
hex
format type 1).
differently based on the Major Device Class stored in the next
ve bits.
“Bluetooth Assigned Numbers” [8].
service classes, refer to Figure 1 and Table 2 in “Bluetooth
Assigned Numbers” [8].
www.lairdtech.com
13
Laird Technologies devices do not map to any predened Major Service Class or Major Device Class and
so the default devclass as shipped is 001F00, which means no Major Service Class and “Unclassied”
There is a tool available in the Internet for creating a particular device class code: refer to [9].
A device class set by AT+BTC becomes visible immediately but will be lost on next power cycle.
Response: <cr,lf>OK<cr,lf>
Or for an invalid <devclass> value (usually a value which is not 6 hexadecimal characters long):
Response: <cr,lf>ERROR 08<cr,lf>
5. ATS515=<devclass
S Register 515 is used to set the device class code permanently. Use AT&W to save the setting to
non-volatile memory. The new value will become visible on next power cycle which can be initiated
by ATZ. Refer to number 4 for more information about the device class code.
Response: <cr,lf>OK<cr,lf>
6. AT+BTC? {Read Device Class Code}
This command is used to read the current device class code.
Response: <cr,lf>123456
<cr,lf>OK<cr,lf>
> {Set Device Class Code Permanently}
hex
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT COMMAND SET
REFERENCE
7. AT+BTF=”<string>” {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 will be lost on next power cycle.
Please refer to S register 593 (Table 4.1) too.
Response: <cr,lf>OK<cr,lf>
8. AT+BTN=”<string>” {Set Friendly Name Permanently}
This sets the default friendly name of this device as seen by other devices. It will be stored in non-volatile
memory. The new name will become 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 (“”) will delete the string
from non-volatile memory which will force the default name to be used which is “Laird BTM 789012”.
The digits in the default friendly name represent the last six digits of the local Bluetooth address.
Please refer to S register 593 (Table 4.1) too. If a new value of S593 needs to be retained permanently,
save it to non-volatile memory by “AT&W”.
Response: <cr,lf>OK<cr,lf>
9. AT+BTN? {Read Friendly Name from Non-volatile Memory}
Read the default friendly name from non-volatile memory.
Response: <cr,lf>”My Friendly Name”<cr,lf>
<cr,lf>OK<cr,lf>
10. AT+BTF<bd_addr> {Get Remote Friendly Name}
This command gets the remote friendly name of the peer specied.
Response: <cr,lf><bd_addr>,”Friendly Name”
<cr,lf>OK<cr,lf>
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, please refer to S Register 512.
Response: <cr,lf>OK<cr,lf>
12. AT+BTQ {Make Device Discoverable}
Make the device discoverable but not connectable. Being discoverable implies that this device will
respond 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, please refer to S Register 512.
Use AT+BTX to make the device not discoverable.
Response: <cr,lf>OK<cr,lf>
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, please refer to S Register 512.
Response: <cr,lf>OK<cr,lf>
www.lairdtech.com
14
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT COMMAND SET
REFERENCE
14. AT+BTV<bd_addr>,<uuid> {SDP Query for Service }
This command is used to interrogate the SDP database of the peer device <bd_addr> for the service
<uuid>. It results in an ACL connection and then an SDP transaction.
If the <uuid> service is present then
Response: <cr,lf>0
<cr,lf>OK<cr,lf>
If the <uuid> service is not present then
Response: <cr,lf>1
<cr,lf>OK<cr,lf>
If the device < bd_addr > cannot be reached, or is in non-connectable mode then
Response: <cr,lf>2
<cr,lf>OK<cr,lf>
If the SDP database is corrupt or invalid then
Response: <cr,lf>3
<cr,lf>OK<cr,lf>
If the device is not in idle mode then
Response: <cr,lf>4
<cr,lf>OK<cr,lf>
and in this case, the command AT+BTX may put the device into the correct idle mode.
15. ATIn {Information}
This will return the information about the Laird Technologies device and its status. Please refer to
Table 4.2 (Appendix) for a complete list of supported ATIn parameters.
As with modems, the Bluetooth module employs a concept of registers which are used to store parameters,
such as escape sequence character, inquiry delay time, etc.
For a list of general S registers please refer to page 17 and Table 4.1.
S registers associated with a particular prole or specic functions, are described in the appropriate prole
section of this document.
The following AT commands allow the manipulation of S registers.
1. ATSn=m {Set S Register}
The value part ‘m’ can be entered as decimal or hexadecimal. A hexadecimal value is specied 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&W command is used. Note that AT&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. ATSn? {Read S Register Value}
This will return the current value of register n.
For recognized values of n
Response: <cr,lf>As Appropriate<cr,lf>OK<cr,lf>
For unrecognized values of n
Response: <cr,lf>ERROR nn<cr,lf>
www.lairdtech.com
15
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT COMMAND SET
REFERENCE
3. ATSn=? {Read S Register – Valid Range}
This will return the valid range of values for register n.
For recognized values of n
Response: <cr,lf>Sn:(nnnn..mmmm)<cr,lf>OK<cr,lf>
For unrecognized values of n
Response: <cr,lf>ERROR nn<cr,lf>
4. AT&Fn {Set S Register Defaults}
This command will only work when the device is in local command and unconnected mode.
Depending on the value of ‘n’, it installs 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 will generate a syntax error
response. If ‘n’ is not specied then a default value of 0 is assumed where the baud rate is
NOT changed.
&F0 (Default)Medium power consumption, UART baud rate unchanged
&F1Minimum power consumption, UART baud rate set to 9600
&F2Minimum power consumption, UART baud rate set to 38400
&F3Minimum power consumption, UART baud rate set to 115200
&F4Medium power consumption, UART baud rate set to 115200
&F5Maximum power consumption, UART baud rate set to 115200
The new values are NOT updated in non-volatile memory until the AT&W command is sent to
the device.
Response: <cr,lf>OK<cr,lf>
Or
Response: <cr,lf>ERROR nn<cr,lf>
5. AT&F* {Clear Non-Volatile Memory}
The AT&F* variant of the command installs values in S registers as per command AT&F4 and then
all other user parameters in non-volatile memory are erased. This means that the trusted device
database is cleared, and so are parameters related to the following commands: AT+BTR, AT+BTN,
AT+BTS.
Response: <cr,lf>OK<cr,lf>
Or
Response: <cr,lf>ERROR nn<cr,lf>
6. AT&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, and so are parameters related to the following
commands: AT+BTR, AT+BTN, AT+BTS.
Response: <cr,lf>OK<cr,lf>
Or
Response: <cr,lf>ERROR nn<cr,lf>
www.lairdtech.com
16
7. AT&W {Write S Registers to Non-Volatile Memory}
Writes current S Register values to non-volatile memory so that they are retained over a power cycle.
Response: <cr,lf>OK<cr,lf>
Or
Response: <cr,lf>ERROR nn<cr,lf>
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT COMMAND SET
REFERENCE
General S Registers
Please refer to Appendix, Table 4.1 for a list of supported S Registers.
The main purpose of S Registers is to make the device conguration persistent. All S Registers can be saved to
non-volatile memory by AT&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 will be lost on next power cycle whereas the S register can be saved and is still
available after power cycle. This rule applies to many but not to all of those cases.
AT Commands for Inquiry
1. AT+BTI<devclass> { Inquire}
This will make the device perform an inquiry for delay seconds and max number of unique responses,
where delay is dened by S register 517 and max is specied by S register 518.
The <devclass> is an optional parameter where the value species either a six digit device class code or
a two digit major device class. If it is not specied, the value is taken from S register 516.
When <devclass> is six hexadecimal characters long, it species an AND mask which is used to lter
inquiry responses. When <devclass> is two hexadecimal characters long, it forces the inquiry to lter
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 dened by S Register 330 by bitmask. This is device address, device
class, friendly name, receiver strength indicator and extended inquiry data. Please refer to Figure 3.1
and Table 3.2.
For S330=1:
Response: <cr,lf>12346789012
<cr,lf>12345678914
<cr,lf>OK<cr,lf>
A Bluetooth inquiry process is such that for a single inquiry request a device could respond many times.
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 lled as responses come in. This array of addresses is stored
in dynamic memory and as such if the memory allocation fails then the inquiry procedure is aborted and
in that case an error response is sent to the host. To clarify, a single AT+BTI will never return the same
Bluetooth address more than once. But as long as the responding device is active, all AT+BTI commands
will always return it.
As the inquiry process is driven by randomness, it is not guaranteed that each discoverable device is
always found on the rst attempt. Sometimes more than one inquiry processes might be necessary
to nd a particular device. The probability also depends on the inquiry scanning intervals of the device
being searched for.
The inquiry process can be sped up if the friendly name is not required (ag not set in S330) as part of
the inquiry response or if a <dev_class> lter is used.
www.lairdtech.com
17
Bit76543210
Reserved for future usageEIRDRSSIFNCODADR
Default00000001
Figure 3.1: S Register 330 controlling inquiry response format
FieldDescription
0 – ADR1 – 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 – COD1 – 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 – FN1 – 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 – RSSI1 – display RSSI value on inquiry result
0 – do not display RSSI value on inquiry result; if any further bit is set, a comma is inserted as separator
As per AT+BTI but the response comprises for all inquiry responses:
1. the Bluetooth device address
2. device class code
S register 330 is not referenced.
www.lairdtech.com
18
3. AT+BTIN<devclass> { Inquire }
As per AT+BTI but the response comprises for all inquiry responses:
1. the Bluetooth device address
2. device class code
3. friendly name
S register 330 is not referenced.
4. AT+BTIR<devclass> { Inquire }
As per AT+BTI but the response comprises for all inquiry responses:
1. the Bluetooth device address
2. device class code
3. friendly name
4. rssi (receiver signal strength indicator)
S register 330 is not referenced.
5. AT+BTIE<devclass> { Inquire }
As per AT+BTI but the response comprises for all inquiry responses:
1. the Bluetooth device address
2. device class code
3. friendly name
4. rssi (receiver signal strength indicator)
5. extended inquiry data
S register 330 is not referenced.
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT COMMAND SET
REFERENCE
6. AT+BTE=”<EIR-Data>” {Set Up Outgoing EIR Data}
This command sets up outgoing EIR (extended inquiry response) data.
Format: <EIR-Data> = printable ASCII character whenever possible, otherwise a two digit hexadecimal
with preceding ‘\’ presenting one byte. Please note that the given data is written to baseband as it
is (raw data) and no checks on the data format is performed. Hence, the user is responsible for writing
data that corresponds to the extended inquiry response data format as described in the Bluetooth
Specication Version 2.1 + EDR [1], vol3, Part C – Generic Access Prole, 8 Extended Inquiry Response
Data Format (page 1305 in the .pdf-le).
Response: <cr,lf>OK<cr,lf>
7. AT+BTE? {Query Outgoing EIR Data}
This command prints the outgoing EIR data that is currently set up
Response:
<cr,lf>
<EIR-Data>
<cr,lf>OK<cr,lf>
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 white papers about SSP available through the Internet (provided by the Bluetooth SIG and other companies), explaining the mechanisms and backgrounds of SSP. They can be found by searching the Internet for,
e.g., “Bluetooth Secure Simple Pairing”. Please familiarize with those documents to get a better understanding
of SSP and the following settings.
1. Security Level (S320)
The security level is dened in the BT2.1+EDR specication [1], vol3, Generic Access Prole (Table 5.7).
There are 4 Levels providing different levels of security:
Security LevelCharacteristicsComment
Level 3• MITM protection (MITM = “Man in the
Middle” attack)
• Encryption
• User interaction
Level 2• No MITM protection
• Encryption
Level 1• No MITM protection
• (No) Encryption (1)
• Minimal user interaction
Level 0• No MITM protection
• No Encryption
• Minimal user interaction
(1) Although encryption is not necessary for security level 1, encryption will always be enabled
because this specication mandates encryption for all services other than SDP (service discovery).
Table 3.3: Security Levels
The security level is dened by S Register 320 and is referenced at boot time only. Hence the register
must be saved by “AT&W “ and the module must be power cycled (or “ATZ”) subsequently.
S320 = 3 will overwrite the setting of S Register 322 (enable MITM).
The security level will remain the same until next power cycle and is valid for all proles and services
of the module. For SDP (service discovery prole), security level 0 is always assigned internally.
High security
Medium Security
Low Security
Permitted only for service
discovery
www.lairdtech.com
19
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT COMMAND SET
REFERENCE
2. IO-Capability (S321)
S-Register 321 denes the IO-capability of the device. The setting is used for IO-capability negotiations
prior to SSP in order to identify whether the IO-capabilities of both devices are sufcient for MITM
protection (if required). Table 3.4 lists possible values.
S321IO-CapabilityComment
0Display onlyThe device has the capability to display or communicate a
six digit decimal number.
1Display yes noThe device has the capability to display or communicate
a six digit decimal number and 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).
2Keyboard onlyThe device has a numeric keyboard that can input
numbers ‘0’ through ‘9’ and a conrmation. The device
has also 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).
3No input no outputThe device does not have the ability to indicate ‘yes’ or
‘no’, and the device does not have the ability to display or
communicate a 6 digit decimal number.
4Reject IO-Cap requestsIO-capability requests prior to SSP are rejected.
Table 3.4: IO capabilities
3. Force Man-In-The-Middle Protection (MITM, S322)
Protection against MITM-attacks can be enabled by S332. This S-Register only applies if the security
level (S320) is less than 3. In case of security level (S320) = 3, MITM protection is always enabled and
this S 322 is ignored.
A new value written to S322 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”.
4. Disable Legacy Pairing (S323)
If the remote device is a legacy device (BT2.0 or earlier), legacy pairing with usage of PIN codes will
be initiated. Legacy Pairing can be disabled by S-Register 323 = 1. Then pairing with legacy devices
will always fail.
5. SSP Timeout (S324)
The SSP timeout [s] is dened by S-Register 324. The timeout must be at least 60s to meet the BT
specication requirements [1]. This time is required to be sufcient 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.
6. SSP Input Commands
Table 3.5 lists all AT commands related to SSP input operations.
AT+BTB012345 Enter six digit passkey displayed by remote device Representing keyboard input
Table 3.5: SSP Input commands
www.lairdtech.com
20
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT COMMAND SET
REFERENCE
7. AT+BTW<bd_addr> {Initiate SSP}
This command initiates secure simple pairing (dedicated bonding) with a device whose Bluetooth
address is <bd_addr>. The correct term for this command’s action with respect to the Bluetooth
specication 2.1+EDR [1] is “Dedicated Bonding”.
Dedicated bonding means the exchange of link keys (pairing) without creating a connection to a
particular prole or service immediately.
The remote device must be a Bluetooth 2.1 device, otherwise (BT2.0 or earlier) legacy pairing will occur
automatically if S323=0. For legacy pairing please refer to page 23.
The “OK” response is sent immediately on receipt of the AT+BTW command. Depending on the
combination of IO-capabilities of both devices, one of the asynchronous messages from Table 3.7
might appear during the pairing process. Please refer to that table for the required actions.
On pairing completion, an unsolicited message in the form PAIR n <bd_addr> will be sent to the host.
8. S Registers for Secure Simple Pairing
The following table lists all S Registers for Secure Simple Pairing. For the registers’ details please refer
to their descriptions above.
This value must be at least 60 in order to meet the recom-
mendation of BT2.1 specication
Table 3.6: S-Registers for Secure Simple Pairing (SSP)
www.lairdtech.com
21
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT COMMAND SET
REFERENCE
9. Asynchronous SSP Messages
Table 3.7 lists asynchronous messages which occur if MITM is enabled. The actually sent message
depends on the combination of the IO capabilities of both ends. The combination of IO capabilities
of both devices can also be insufcient for MITM protection. In that case the pairing will fail (PAIR 2
<BdAddr>). Please refer Table 5.6 in BT2.1+EDR specication [1], vol3, Generic Access Prole for
sufcient combinations of IO-capabilities for MITM (=authenticated link key).
MessageAction / Comment
PAIR ? <BdAddr>,”<friendlyname>”,<Passkey>
Example:
PAIR ? 0016A4000002,”Laird BTM
000002”,863611
PASSKEY ? <BdAddr>,”<friendlyname>”
Example:
PASSKEY ? 0016A4000001,”Laird BTM 000001”
PAIR N <BdAddr>,”<friendlyname>”,<Passkey>
Example:
PASSKEY N 0016A4000002,”Laird BTM
000002”,164585
PAIR 0 <BdAddr> <nn>Successfully paired with device of <BdAddr>.
PAIR 1 <BdAddr>Pairing timeout
PAIR 2 <BdAddr>Pairing failed
PAIR 3 <BdAddr>Pairing failed (too many repeat attempts)
PAIR 4 <BdAddr>Pairing rejected by remote device
PAIR 5 <BdAddr>Pairing failed (unit keys not supported)
PAIR 6 <BdAddr>Pairing failed (SSP not supported)
PAIR 7 <BdAddr>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.
Table 3.7: Asynchronous messages for SSP
Passkey compare request:
Expecting the user to compare the passkey
displayed on both ends and to conrm a
match by “AT+BTBY” at both ends or reject by
“AT+BTBN” if passkey does not match.
Passkey request:
Expecting the user to enter the passkey
displayed by the remote device.
Use AT+BTB<passkey>,
example: AT+BTB012345 *see(1) below
Passkey notication:
Display BdAddr, friendly name and passkey to
user.
Expecting the user to enter the passkey from
this message at the remote device’s numeric
keyboard.
<nn> (optional) indicates the status of automatic storage to trusted device list. Value 0 =
success; settings controlled by S325 to S328.
Please refer to section 2.3, page 82.
www.lairdtech.com
22
10. Known SSP Issues
a.) General Bonding (automatic pairing on link setup if devices have not been paired previously) does
not work with legacy devices (BT2.0 and earlier). If the remote device is BT2.0 or earlier, initiate
dedicated bonding (AT+BTW<BdAddr>) prior to connection establishment.
b.) Outgoing General Bonding (automatic pairing on link setup if devices have not been paired
previously) with MITM does not work with two BTM devices, because any UART input on the
initiating device is not accepted until the link has been established. Workaround: initiate dedicated
bonding (AT+BTW<BdAddr>) prior to connection establishment.
c.) If the link key of previously paired devices is not available any more in the remote device but still
available in the trusted device list (TDL) of the local device (query by AT+BTT?), pairing will fail. In that
case remove the device address from the local TDL using AT+BTD<BdAddr> and reinitiate pairing
from the local device (AT+BTW<Bd_addr>).
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT COMMAND SET
REFERENCE
AT Commands for Legacy Pairing
1. AT+BTW<bd_addr> {Initiate Pairing}
Provided the remote device is a Bluetooth 2.0 device or earlier and legacy pairing is not disabled
(S323 = 0), this command is used to initiate legacy pairing with the device with <bd_addr>.
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=”<PIN>”), asynchronous indications will be sent
to the host in the form PIN? <bd_addr> where the address conrms the device with which the pairing
is to be performed. To supply a PIN, use 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. 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. Please refer to below under AT Commands managing Trusted Devices for
further AT commands related to trusted device list.
The “OK” response is sent immediately on receipt of the AT+BTW command. On pairing completion,
an unsolicited message will be sent to the host which will be in the form PAIR n <bd_addr>.
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 will be sent to those commands
as the device is not in a mode from where such commands can be actioned.
Response: <cr,lf>OK<cr,lf>
2. AT+BTK=”<string>” {Set Passkey}
This command is used to provide 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 will not be 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, otherwise an error will be returned.
Response: <cr,lf>OK<cr,lf>
3. Legacy Pairing – Asynchronous Messages
PIN?
This response is sent to the host during a pairing negotiation.
The fully qualied 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 specied as
000000000000 – and the pairing will proceed as normal.
PAIR n <bd_addr>
This response is sent to the host on termination of a pairing process. If pairing was successful then
‘n’ = 0, if a timeout occurred then ‘n’=1 and for all other unsuccessful outcomes the value will be 2.
The parameter <bd_addr> is the address of the peer device if available.
PAIR 0 <bd_addr> 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 to automatically save the link key (see Section
2, page 82). The value MM indicates the result of the save operation and a value of 00 implies success,
otherwise the value corresponds to an error code.
www.lairdtech.com
23
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT COMMAND SET
REFERENCE
AT Commands Managing Trusted Devices
1. AT+BTT? {List Trusted Device}
This command is used to list 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 is used to terminate the list. Use the command ATI6 to read the maximum size of the trusted
device database.
Response: <cr,lf>12346789012
<cr,lf>12345678913
<cr,lf>12345678914
<cr,lf>OK<cr,lf>
2. AT+BTT {Add Trusted Device}
This command is used to store the cached link key in the non-volatile database. If the database is full,
it will respond with an ERROR. If the device is already in the database, then the key is replaced. If the
link key cache is empty, that is, a pairing has not been performed since the device was powered, then
the response will be an ERROR.
Response: <cr,lf>OK<cr,lf>
Or
Response: <cr,lf>ERROR<cr,lf>
3. AT+BTD<bd_addr> {Remove Trusted Device}
This command is used to remove the specied device from the list of trusted devices in 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>
www.lairdtech.com
24
4. AT+BTD* {Remove All Trusted Devices}
This command is used to remove all devices from the trusted device list (TDL) in the non-volatile
database. No conrmation will be asked for. So beware!!!
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 will be established. To ensure this does not happen, send ATZ after the AT+BTD*.
Response: <cr,lf>OK<cr,lf>
5. AT+BTW? {List Cached Trusted Device}
This command is used to list the cached trusted device.
Response: <cr,lf>12346789012
<cr,lf>OK<cr,lf>
If the cache is empty the response is as follows.
Response: <cr,lf>OK<cr,lf>
AT Commands for Serial Stream Oriented Proles (SSO)
The Serial Port Prole (SSP) and the Dial-up Networking Prole (DUN) belong to the group of Serial Stream
Oriented proles (SSO).
When activated, an SSO prole 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 proles, services or module control purposes.
One approach of managing data and control over UART is to congure local command mode with S531=3.
In this mode, incoming RF data is presented by the asynchronous message RX<string>. Outgoing data is sent
by ATX<string> or ATY<string>.
With this approach it is possible to manage several non-SSO connections (e.g., A2DP, AVRCP) and at
maximum one SSO connection (SSP or DUN). An attempt to connect a second SSO prole while already
one SSO connected will result in Error 65.
Any incoming connection request to an SSO prole will be rejected if one SSO is already connected.
The following section describes AT- commands related to SSO-proles.
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT COMMAND SET
REFERENCE
1. ATX”<string>” {Send Data in Local Command and Connected Mode}
This command is used to send data to the remote device when in local command and connected mode.
The parameter <string> is any string not more than 29 characters long whereby a non-printable
character (\hh, see below) counts three characters. This restriction results from the maximum AT
command length which is 34 (query by ATI15). The difference of 5 is caused by “ATX” (three characters)
and the enclosing quotation marks (two characters).
If the maximum string length is exceeded, ERROR 05 (syntax error) will occur.
If a non-visual character is to be sent then insert the escape sequence \hh where hh are two
hexadecimal digits. The three character sequence \hh will be converted into a single byte before
transmission to the peer.
Response: <cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR 05<cr,lf> (e.g. <string> too long)
2. ATY”<string>” {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. Only when an empty string is presented, all pending data in the output rf buffer
will be ushed out.
The parameter <string> is any string not more than 29 characters long whereby a non printable
character (\hh, see below) counts three characters. This restriction results from the maximum AT
command length which is 34 (query by ATI15). The difference of 5 is caused by “ATX” (three characters)
and the enclosing quotation marks (two characters).
If the maximum string length is exceeded, ERROR 05 (syntax error) will occur.
If a non-visual character is to be sent then insert the escape sequence \hh where hh are two
hexadecimal digits. The three character sequence \hh will be converted into a single byte before
transmission to the peer.
Response: <cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR 05<cr,lf> (e.g. <string> too long)
3. ^^^ {Enter Local Command Mode}
When in data and connected mode and when S 507 is set to 0 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 specied in the S2 register, so it can be changed. In addition, the escape sequence
guard time is specied by S Register 12. By default the guard time is set to 100 milliseconds.
Leaving data mode by “^^^” has a severe penalty on data throughput, because each incoming
character needs to be checked for ‘^’ 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 signicant higher data throughput because data is passed directly between UART
and RF without character checking. Please refer to Section 6, page 26 for more information.
In modems this escape sequence is usually “+++”. “^^^” is specied to avoid confusion when the
module is providing access to a modem.
Response: <cr,lf>OK<cr,lf>
4. !!! {Enter Remote Command Mode}
When in data and connected mode, the host can force the remote device into a command and
connected mode so that AT Commands can be issued to the device remotely. The escape sequence
guard time is specied 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 5). For this command to be effective S Register 536 must be set to 1.
Response: <cr,lf>OK<cr,lf>
www.lairdtech.com
25
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT COMMAND SET
REFERENCE
5. ATO {Enter Data Mode} (letter ‘o’)
Return to data mode. Assume that the module is in data mode after OK is received. Responds with
an error if there is no Bluetooth SSO connection.
Response:
<cr,lf> CONNECT 123456789012,<<cr,lf> (if it was an incoming connection)
<cr,lf> CONNECT 123456789012,><cr,lf> (if it was an outgoing connection)
Or
Response: <cr,lf>ERROR nn<cr,lf>
6. Dropping SSO Connections
In a conventional telephony modem, a call is normally terminated by rst sending a +++ character
sequence enveloped by an escape sequence guard time (of the order of 100 to 1000 milliseconds)
to enter local command and connected mode and then the ATH command.
Laird Technologies BTM devices provide a variety of ways of dropping 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 is in progress via a mobile phone which was established using the mobile phone’s Bluetooth
AT modem. The second method involves the host dropping the DTR (DSR from the module’s viewpoint)
handshaking line.
Being able to drop a connection using the escape sequence ^^^ has a severe penalty on data
throughput. In fact, the data rate is of the order of 85kbps instead of about 300kbps. To cater for
this performance hit, the device’s connection drop capability is congurable to be in one of two modes.
One mode allows for a connection to be dropped using either method, and the other mode allows for
a connection drop using the DTR method only. By default, the device is in the former mode. This mode
is selected using the S507 register (Appendix, Table 4.1).
This means that even when a le transfer is occurring and it happens to be full of <Esc Chr> characters
then it is not going to drop into command mode because, when transferring, a le it is going to happen
as fast as possible and so the inter character gap is going to be signicantly shorter than the <Guard time>.
The <Esc Chr> character can be changed via the S2 register and the <Guard time> interval can be
specied via the S12 register (Appendix, Table 4.1).
www.lairdtech.com
26
7. SSO - Asynchronous Messages
RX<string>
This response is sent to the host when the unit is in online-command mode and 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), then those characters are translated into a three character escape sequence starting with ‘\’.
For example the embedded <cr><lf> sequence would be sent as the six character string \0D\0A.
If the data contains the character ‘“’ then it is sent as \22.
If the data contains the character ‘\’ then it is sent as \5C.
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT COMMAND SET
REFERENCE
8. SSO – S Registers
The following table lists S registers for SSO proles.
RegisterDefault RangeDescription
S29432..126Escape sequence character. It is not ‘+’ by default as a
Bluetooth serial link can be used to connect to a mobile
phone which exposes an AT command set, which will in turn
use ‘+’ as default. So if both used ‘+’, there will be confusion.
94 is the character ‘^’.
S1210040..5000Escape sequence guard time in milliseconds, with a
granularity of 20ms. New values are rounded down to
the nearest 20ms multiple.
S50700..2When 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
^^^ escape sequence OR the DSR handshaking line. When set
to 2, a connection can only be dropped using a deassertion of
DSR. Mode 2 provides for the highest data transfer rate.
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 deassertion of DSR will be seen as
a request to drop the Bluetooth connection.
This register affects S Register 536 – see details of 536.
S53100..4Species the mode on 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 Reg 536 is not
1 then this register cannot be set to 2 and an ERROR will be
returned.
3 = LOCAL_COMMAND. UART input is parsed by the AT
interpreter and incoming RF data is sent to the host using the
RX<string> asynchronous response.
4 = LOCAL_COMMAND and on the rf side, the gpio is
automatically sent when there is a change in input (digital I/O
cable replacement mode).
S53600..1When 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 >= 2, then reading this register will always
return 0 and writing 1 will result in ERROR 33.
Table 3.8: S Registers for SSO proles
www.lairdtech.com
27
AT Commands for a Selected Peer Device
This section describes AT commands to make the BTM Bluetooth device connectable for one particular remote
device only or to connect to a particular remote device on reset or on power cycle automatically.
1. AT+BTP<bd_addr> {Make Device Discoverable and Selectively Connectable}
Make the BTM device discoverable (for all devices) and connectable for the device with the Bluetooth
address <bd_addr> only. Connection requests from any other devices will be rejected.
If <bd_addr> is 000000000000 then incoming connections are accepted from any device, as per
AT+BTP without an address.
The setting remains valid until next reset or power cycle (unless not changed by any other AT
command subsequently). For permanent discoverable/connectable settings, please refer to S Register
Make the BTM device connectable for the device with the Bluetooth address <bd_addr> only.
Connection requests from any other devices will be rejected.
If the specied address is 000000000000 then incoming connections are accepted from any device,
is as per AT+BTP without an address.
The BTM device is not discoverable.
The setting remains valid until next reset or power cycle (unless not changed by any other AT command
subsequently). For permanent discoverable/connectable settings, please refer to S Register 512 and
AT+BTM<bd_addr>
Response: <cr,lf>OK<cr,lf>
3. AT+BTM<bd_addr> {Set Incoming Peer Address}
This command is used to store a peer address for incoming connections in non-volatile memory.
Only the device with Bluetooth address <bd_addr> will be permitted to make a connection to the
BTM device. Connection requests from other devices will be rejected.
The new setting applies immediately and will retain over a power cycle (unless not changed by any
other AT command subsequently).
When S register 512 = 3, 4, 6 or 7 then the BTM device will wait for an incoming connection from
the peer address specied. If <bd_addr> is 000000000000, then incoming connections from any
devices are permitted.
Response: <cr,lf>OK<cr,lf>
4. AT+BTM {Delete Incoming Peer Address}
This command is used to delete the peer address previously stored using AT+BTM<bd_addr>.
If the BTM device was connectable for the selected device before this command, it will be connectable
for any device immediately after this command.
Response: <cr,lf>OK<cr,lf>
5. AT+BTM? {Read Incoming Peer Address}
This command is used to display the peer address stored in non-volatile memory, used to put the
module in pure cable replacement mode.
Response: <cr,lf>12346789012
<cr,lf>OK<cr,lf>
If the location is empty, the response is as follows.
Response: <cr,lf>00000000000
<cr,lf>OK<cr,lf>
6. AT+BTR<bd_addr> {Set Outgoing Peer Address}
This command is used to store a peer address for outbound connections in non-volatile memory.
This command is used to set up a module in pure cable replacement mode. If S register 512 = 1
and the peer address is NOT 000000000000, then it will periodically (time specied via S register 505)
attempt to connect to the peer address specied. In this circumstance all data from the host are
buffered in the 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 and S507=1 or 2, the device effectively becomes useless, as in this circumstance the module is
not listening for commands arriving on the UART.
In this circumstance, a recovery is possible by one of two methods. The rst method assumes that
the DTR from the host is connected to the DSR line of the module and S507=1. The second method
assumes that this connection is absent and S507=1 or 2.
In the rst method it is enough to deassert the DTR line from the host and that will abort the
autoconnect cycle. No “OK” is sent in response. Hence it is up to the host to send a character regularly
(e.g., one per second) until the BTM device echoes all buffered characters to the host (provided echo is
enabled). Once the BTM device echoes characters, it is in command mode.
www.lairdtech.com
28
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT COMMAND SET
REFERENCE
The second method is initiated by resetting the device and then ensuring that the text string
“AT+BT&BISM&<cr>” is sent (where <cr> is the carriage return character). There is special code which
looks out for this magic command and terminates the autoconnect cycle if it sees it and conrms to
the host of that fact by sending an “OK” response.
Response: <cr,lf>OK<cr,lf>
7. AT+BTR {Delete Outgoing Peer Address}
This command is used to delete the peer address previously stored using AT+BTR<bd_addr>.
Response: <cr,lf>OK<cr,lf>
8 AT+BTR? {Read Outgoing Peer Address}
This command is used to display the peer address stored in non-volatile memory, used to put the device
in pure cable replacement mode.
Response: <cr,lf>12346789012
<cr,lf>OK<cr,lf>
If the location is empty the response is as follows.
Response: <cr,lf>00000000000
<cr,lf>OK<cr,lf>
Bluetooth Proles
This section covers S-Registers and AT-Commands that are related to supported Bluetooth Proles on BTM.
1. ProleActivation
In order to activate available proles and advertise them to potential client devices, S-Register 102 is
used. Per default, only SPP is activated (value=1). Other supported proles can be activated by setting
the appropriate Flag in S-Register 102. Once S-Register 102 has been written, the changed value needs
to be saved to non-volatile memory (“AT&W”) and subsequently a reset (“ATZ”) or power cycle is
required. Please note that “AT&W” saves the content of all S Registers to non-volatile memory.
2. SPP(SerialPortProle)
The serial port prole (SPP) is used for serial data transmission with a remote device in both directions.
It behaves like a wireless replacement for a serial cable.
SSP belongs to the group of serial stream oriented proles (SSO) so please refer to page 24 too.
In order to use SPP, the prole must be enabled in S102 (value=1). If it was not enabled earlier, set the
S register accordingly and issue AT&W followed by ATZ.
2.1 SPP Example
This section gives an example on how an SPP connection between two Laird Technologies
BTM devices can be established. It is assumed that two 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 3.9.
Figure 3.2 through to Figure 3.5 are presenting appropriate screenshots with Ezurio Terminal.
PhaseDev.AT CommandComment
PreparationAAT&F*Restore factory default settings
ATS102=1Enable Serial Port Prole (SPP)
AT&WStore settings
ATZReset
PreparationBAT&F*Restore factory default settings
ATS102=1Enable Serial Port Prole (SPP)
ATS0=1Automatic response after one “RING”
AT&WStore settings
ATZReset
AT+BTPMake device temporary connectable and discoverable
ATI4Query Bluetooth device address of local device <BdAddr_DevB>
www.lairdtech.com
29
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT COMMAND SET
REFERENCE
PhaseDev.AT CommandComment
Initiate
connection
ConnectedA,B<data>Any character entered on one end is displayed at the
Enter
command
mode
DisconnectAT+SPHResponse “NO CARRIER…” (A and B): disconnection
AAT+SPD<BdAddr_DevB> Initiate SPP connection from device A to device B.
Asynchronous messages:
“PAIR 0…” (pairing successful, A and B)
“RING…” (B only)
“CONNECT…” (connected, A and B)
other end.
A or B^^^Response “OK” :
Command mode conrmed, now AT commands are
expected at the UART; UART data from host is not sent
across to remote device.
conrmed.
Table 3.9: SPP Example Command Sequence
www.lairdtech.com
30
Figure 3.2: SPP example - Preparation of Device A
Figure 3.3 SPP example – Preparation of Device B
Laird Technologies
Loading...
+ 86 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.