Download: | ![Ezurio 511B Bluetooth Multimedia Module User Manual](/pdf.png) |
Mirror Download [FCC.gov] | ![Ezurio 511B Bluetooth Multimedia Module User Manual](/pdf.png) |
Document ID | 1215695 |
Application ID | oebj3wBmmIVMfh69sKyItA== |
Document Description | User Manual |
Short Term Confidential | No |
Permanent Confidential | No |
Supercede | No |
Document Type | User Manual |
Display Format | Adobe Acrobat PDF - pdf |
Filesize | 358.66kB (4483265 bits) |
Date Submitted | 2009-12-18 00:00:00 |
Date Available | 2009-12-18 00:00:00 |
Creation Date | 2009-12-07 13:39:54 |
Producing Software | Adobe PDF Library 8.0 |
Document Lastmod | 2009-12-07 13:43:20 |
Document Title | User Manual |
Document Creator | Adobe InDesign CS3 (5.0.4) |
BTM510/511
MULTIMEDIA
MODULE
USER MANUAL
www.lairdtech.com
Innovative Technology
for a Connected World
BTM510/511
Bluetooth® Multimedia Module
TABLE OF
CONTENTS
CONTENTS
BTM510/511 Bluetooth® Module ...3
Overview . ............................................. 3
BTM510/511 Key Features . .................. 3
Specifications .................................4
Detailed Specifications .......................... 4
Pin Definitions ....................................... 6
Operating Parameters ....................8
Voltage Specifications ........................... 8
Notes for PCB Layout ............................ 8
Configuring the BTM510/511 .........9
References ............................................ 9
Glossary of Terms ............................... 10
AT Command Set ............................... 11
Assumptions ....................................... 11
Commands ......................................... 11
General AT Commands ...................... 11
www.lairdtech.com
General Bluetooth® Control . .............. 22
Hardware Unit Control........................ 28
Bluetooth® Profiles . ............................ 30
Secure Simple Pairing . ........................ 37
Link Key Management ........................ 37
Miscellaneous...................................... 38
Appendix ............................................ 39
BT-MM Unsolicited Messages ............. 39
BT-MM Error Responses . .................... 39
Mechanical Drawings ...................41
Mechanical Details .............................. 41
Recommended PCB Footprint . ........... 41
Diagrams ............................................ 42
Ordering Information ...................45
Product Part Numbers . ....................... 45
General Comments ............................ 45
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
OVERVIEW AND
KEY FEATURES
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 specification, 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-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 BC05.
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 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 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.
www.lairdtech.com
FEATURES
APPLICATION AREAS
• 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 profiles
• 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 – 4dBm
• Low power operation
• Wi-Fi co-existence hardware support
•
•
•
•
•
•
•
•
•
High-quality stereo headsets
Mono voice headsets
Hands-free devices
Wireless audio cable replacement
MP3 and music players
Phone accessories
VoIP products
Cordless headsets
Automotive
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
SPECIFICATIONS
CATEGORIES
FEATURE
IMPLEMENTATION
Wireless Specification
Standards Supported
Bluetooth® v2.1 + EDR
Transmit Class
Class 2
Frequency
2.402 – 2.480 GHz
Channels
79 channels Frequency Hopping Adaptive Frequency Hopping
Max Transmit Power
+4 dBm @ antenna pad – BTM510
+4 dBmi from integrated antenna – BTM511 (provisional)
Min Transmit Power
-27 dBm @ antenna pad – BTM510
-27 dBmi from integrated antenna – BTM511 (provisional)
Receive Sensitivity
Better than -86 dBm
Data Transfer rate
Up to 300kbps
Range
Up to 50 meters free space (Data)
External Antenna
50 Ohm matched SMT pad – BTM510
Integrated Antenna
+0dB (provisional) multilayer ceramic – BTM511
Serial Interface
RS-232 bi-directional for commands and data 16550 compatible
Baud Rate
Configurable from 1,200 to 921,600bps
Non-standard baud rates supported
Bits
Parity
Odd, even, none
Stop bits
1 or 2
Default Serial parameters
9,600,n,8,1
Levels
Set by VDD_USB pin
Modem Control
DTR, DSR, DCD, RI, RTS, CTS
I/O
8 general purpose I/O pins
I2S
Stereo Audio Digital Interface Bus
LED
Two
Codec
Integrated stereo codec with -95dB SNR for DAC
Amplifiers
Direct drive for 22Ω Mono Speaker / 44Ω Stereo Speakers
Microphone
Input with bias for low noise microphone
Antenna Modes
UART Interface
General Purpose Interface
Audio
Protocols & Firmware
Sample Rates (DAC & ADC)
8, 11.025, 16, 22.05, 32 & 44.1kHz
Bluetooth® Stack
V2.1 compliant. Fully integrated.
Profiles
GAP (Generic Access Profile)
SDP (Service Discovery Profile)
SPP (Serial Port Profile)
HSP
HFP – Audio Gateway and Handsfree
A2DP – Source and Sink
AVRCP – Target and Controller
Protocols
RFCOMM
AVCTP
AVDTP
Available over UART
Firmware Upgrade
www.lairdtech.com
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
SPECIFICATIONS
CATEGORIES
FEATURE
IMPLEMENTATION
Command Interface
AT Instruction set
Comprehensive control of connection and module operation,
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
DSP
Kalimba DSP
Integrated in BC05 32bit, 64MIPS, 16Mbps Flash Memory
(shared)
Applications
Available from partners
Data Transfer
Typically < 35mA
Stereo Music
Typically < 70mA (including speaker drive)
Low Power Sniff Mode
Less than 1.5mA
Supply
3.0V – 3.6V DC
I/O
1.7V – 3.6V DC
USB
1.7V – 3.6V DC
Coexistence / Compatibility
WLAN (802.11)
2-wire and 3-wire hardware coexistence schemes supported
Connections
External Antenna (option)
Pad for 50 Ohm antenna – BTM510
Interface
Surface Mount Pads
Physical
Dimensions
14.0mm x 20.0 x 1.6mm - BTM510
14.0mm x 26.0mm x 1.6mm - BTM511 (provisional)
Weight
3 grams
Environmental
Operating Temperature
-30°C to +70°C
Storage Temperature
-40°C to +85°C
Approvals
Bluetooth®
Qualified as an END product
FCC
Meets FCC requirements
Modular Approval (Integrated Antenna option – BTM511)
Current Consumption
Supply Voltage
Miscellaneous
Development Tools
www.lairdtech.com
CE & R&TTE
Meets CE and R&TTE requirements
Lead free
Lead-free within EU requirements and RoHS compliant
Warranty
12 Months
Development Kit
Development board and software tools
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
SPECIFICATIONS
www.lairdtech.com
Pin
Signal
Description
Voltage
Specification
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
PIO15 / DTR
PIO5/BT_STATE/BT_PRIORITY
PCM_IN
PCM_OUT
PCM_SYNC
PCM_CLK
LED_EXT1
LED_EXT0
GND
VDD_USB
VDD_IO
VDD_IN
GND
SPI_CSB
SPI_MISO
SPI_CLK
SPI_MOSI
PIO2/DSR
PIO3/RI
PIO1/DCD
PIO0/BT_ACTIVE
GND
AUDIO_GND
SPKR_A_N
SPKR_A_P
SPKR_B_N
SPKR_B_P
MIC_BIAS
MIC_BP_C
MIC_BN_C
MIC_AP_C
MIC_AN_C
Unused
ANT
Unused
Unused
Unused
Unused
Unused
Unused
Unused
Unused
Unused
Unused
USB_DUSB_D+
GND
UART_RTS
UART_CTS
UART_TX
UART_RX
PIO7/RF_ACTIVE
PIO6/WLAN_ACTIVE
Reset
Host I/O
Host I/O, BT Co-existence
PCM Data I/P
PCM Data O/P
PCM Sync I/P
PCM CLK I/P
Host I/O
Host I/O
VIO
VIO
VIO
VIO
VIO
VIO
See Note 2
See Note 2
USB supply voltage
I/O supply voltage
Main supply voltage
SPI bus chip select I/P
SPI bus serial O/P
SPI bus clock I/P
SPI bus serial I/P
Host I/O
Host I/O
Host I/O
Host I/O, BT Co-existence
VIO
VIO
VIO
VIO
VIO
VIO
VIO
VIO
Audio ground
Speaker, channel A- (left)
Speaker, channel A+ (left)
Speaker, channel B- (right)
Speaker, channel B+ (right)
Microphone bias
Microphone, channel A- (left)
Microphone, channel A+ (left)
Microphone, channel B- (right)
Microphone, channel B+ (right)
See note 3
See note 3
See note 3
See note 3
See note 4
See note 4
See note 4
See note 4
See note 4
Antenna connection – BTM510 (50 ohm matched)
VUSB
VUSB
Request to Send O/P
Clear to Send I/P
Transmit data O/P
Receive data I/P
Host I/O, BT Co-existence
Host I/O, BT Co-existence
Module reset I/P
VUSB
VUSB
VUSB
VUSB
VIO
VIO
See Note 1
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
SPECIFICATIONS
Note: 1.
2.
Reset input is active low. Input is pulled up to VDD_IN via 22k.
Minimum reset pulse width is 5ms.
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 flowing through the diode is:
Iled =
VDD - VF
R + 20
VDD
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 amplifier – the first stage
provides a fixed 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 first 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:
Module
External Circuit
MIC_BIAS
15nH
MIC_AP
15pF
External Circuit
15nH
MIC_AN
15pF
External Circuit
Module
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 filter 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 configuration as follows:
AC
Single ended
www.lairdtech.com
AC
Double ended
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
OPERATING
PARAMETERS
Operating Parameters
Recommended Operating Conditions
Operating Condition
Min
Max
VDD_USB
(USB compatibility not required)
1.7
3.6
VDD_USB
(USB compatibility required)
3.1
3.6
VDD_IO
1.7
3.3
VDD_IN
3.0
3.6
Voltage Specifications
Logic Levels (VUSB)
Input Voltage Levels
Min
Typ
Max
Vih
0.625VDD_USB
VDD_USB+0.3
Vil
-0.3
0.25VDD_USB
Voh (Iout = -4mA)
0.75VDD_USB
VDD_USB
Vol (Iout = 4mA)
0.125
Output Voltage Levels
Logic Levels (VIO)
Input Voltage Levels
Min
Typ
Max
Vih
0.625VDD_IO
VDD_IO+0.3
Vil
-0.3
0.25VDD_IO
Voh (Iout = -4mA)
0.75VDD_IO
VDD_IO
Vol (Iout = 4mA)
0.125
Output Voltage Levels
Logic Levels (VUSB – USB terminals D+, D-)
Input Voltage Levels
Min
Typ
Max
0.7VDD_USB
Vih
0.3VDD_USB
Vil
Output Voltage Levels (to correctly terminated USB cable)
Voh
2.8
VDD_USB
Vol
0.2
Notes for pcb layout:
www.lairdtech.com
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.
3.
The PCB footprint is provided for guidance only. Users may wish to modify the PCB land dimensions to suit their specific
manufacturing or process.
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT Command Set
Reference
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 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 configuration 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 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 Unconnected
RF Connected
Local Command Mode
OK
OK
Remote Command Mode
ILLEGAL
OK
Data Mode
ILLEGAL
OK
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
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT Command Set
Reference
Glossary of Terms
Description
10
www.lairdtech.com
A2DP
Advanced Audio Distribution Profile
ACL
Asynchronous Connection-Oriented Link
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
DSP
Digital Signal Processor
DUN
Dial-Up Network Profile
EIR
Extended Inquiry Response
eSCO
Enhanced Synchronous Connection Oriented Link (used for Audio)
FTP
File Transfer Profile
GOEP
Generic Object Access Exchange Profile
GPIO
General Purpose Input Output
HF
Hands-free Role of Hands-free Profile (“Hands-free Unit”)
HFG
Audio Gateway Role 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
I/O (IO)
Input/Output
Mic
Microphone
MITM
Man In The Middle
OPP
Object Push Profile
PBAP
Phone Book Access Profile
PT
PASS THROUGH Command
PWM
Pulse Width Modulation
SBC
Sub Band Codec
SCO
Synchronous Connection Oriented Link (used for Audio)
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
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT Command Set
Reference
Overview of the BTM product family
BTM410 / BTM411
Chipset
CSR BC4-Ext
Bluetooth version
2.1
Features
SSP, EIR, SCO (1), eSCO (1)
Profiles
SPP
(1) external codec required
BTM510 / BTM511
Chipset
CSR BC5MM-Ext
Bluetooth version
2.1
Features
SSP, EIR, SCO, eSCO
Profiles
SPP, A2DP, AVRCP,HSP,HFP,DUN(DT)
BTM520 / BTM521
11
www.lairdtech.com
Chipset
CSR BC5MM-Ext
Bluetooth version
2.1
Features
SSP, EIR, SCO, eSCO
Profiles
SPP, A2DP, AVRCP,HSP,HFP,DUN(DT)
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT Command Set
Reference
BTM - AT Command Set
This section describes the AT Command Set for a BTM module. This section is structured in functional
groups of AT commands related to module configuration, Bluetooth profiles, hardware units and
miscellaneous purposes.
Assumptions
1.
2.
3.
4.
5.
All commands are terminated by the carriage return character 0x0D, which is represented by the string
in descriptions below this cannot be changed.
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 .
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.
All profile specific commands are identified by the prefix shown in Table 3.1
Profile
Term
AT-Command Prefix
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…
Dial-Up Network Profile
DUN
AT+DU…
Table 3.1: AT Command prefix for profiles
Command Syntax
The following syntax is employed throughout this document to describe optional or mandatory parameters for
AT commands.
A 12 character Bluetooth address consisting of ASCII characters ‘0’ to ‘9’, ‘A’ to ‘F’ and ‘a’ to ‘f’.
A six character Bluetooth device class consisting of ASCII characters ‘0’ to ‘9’, ‘A’ to ‘F’ and ‘a’ to ‘f’.
A positive integer value.
An integer value which could be positive or negative, which can be entered as a decimal value or
in hexadecimal if preceded by the ‘$’ character, e.g., the value 1234 can also be entered as $4D2.
A string delimited by double quotes, e.g., “Hello World”. The “ character MUST be supplied as delimiters.
A four 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: OK
2. ATEn
12
www.lairdtech.com
{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: OK
Or
Response: ERROR nn
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT Command Set
Reference
3. ATZ
{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
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 BC04).
Response after reset: OK
4. AT+BTC
{Set Device Class Code Temporarily}
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.
is a six digit hexadecimal number derived as per “Bluetooth Assigned Numbers” [8].
The 24 bits are made of four fields briefly described as follows (bit 0 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 six bits is interpreted
differently based on the Major Device Class stored in the next
five bits.
Bits 8-12:
Major Device Class: Five bits, refer to Figure 1 and Table 3 in
“Bluetooth Assigned Numbers” [8].
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].
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.
Other examples of device class codes are follows:
Code (Hexadecimal)
Name
Major Service
Major Device
Minor Device
0x001F00
Unclassified
None
Unclassified
n/a
0x200404
Headset
Audio
Audio
Headset
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: OK
Or for an invalid value (usually a value which is not 6 hexadecimal characters long):
Response: ERROR 08
5. ATS515=
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: OK
6. AT+BTC?
13
www.lairdtech.com
{Set Device Class Code Permanently}
{Read Device Class Code}
This command is used to read the current device class code.
Response: 123456
OK
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT Command Set
Reference
7. AT+BTF=””
{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: OK
8. AT+BTN=””
{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: OK
9. AT+BTN? {Read Friendly Name from Non-volatile Memory}
Read the default friendly name from non-volatile memory.
Response: ”My Friendly Name”
OK
10. AT+BTF {Get Remote Friendly Name}
This command gets the remote friendly name of the peer specified.
Response: ,”Friendly Name”
OK
11. AT+BTP
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: OK
12. AT+BTQ
www.lairdtech.com
{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: OK
13. AT+BTG
14
{Make Device Discoverable and Connectable }
{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: OK
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT Command Set
Reference
14. AT+BTV, {SDP Query for Service }
This command is used to interrogate the SDP database of the peer device for the service
. It results in an ACL connection and then an SDP transaction.
If the service is present then
Response: 0
OK
If the service is not present then
Response: 1
OK
If the device < bd_addr > cannot be reached, or is in non-connectable mode then
Response: 2
OK
If the SDP database is corrupt or invalid then
Response: 3
OK
If the device is not in idle mode then
Response: 4
OK
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.
For recognized values of n:
Response: As AppropriateOK
For unrecognized values of n.
Response: Laird Technologies Inc, UK, (c)2009
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, 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 profile or specific functions, are described in the appropriate profile
section of this document.
The following AT commands allow the manipulation of S registers.
1. ATSn=m
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&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?
15
www.lairdtech.com
{Set S Register}
{Read S Register Value}
This will return the current value of register n.
For recognized values of n
Response: As AppropriateOK
For unrecognized values of n
Response: ERROR nn
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT Command Set
Reference
3. ATSn=?
This will return the valid range of values for register n.
For recognized values of n
Response: Sn:(nnnn..mmmm)OK
For unrecognized values of n
Response: ERROR nn
4. AT&Fn
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 specified then a default value of 0 is assumed where the baud rate is
NOT changed.
&F0 (Default)
Medium power consumption, UART baud rate unchanged
&F1
Minimum power consumption, UART baud rate set to 9600
&F2
Minimum power consumption, UART baud rate set to 38400
&F3
Minimum power consumption, UART baud rate set to 115200
&F4
Medium power consumption, UART baud rate set to 115200
&F5
Maximum 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: OK
Or
Response: ERROR nn
{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: OK
Or
Response: ERROR nn
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: OK
Or
Response: ERROR nn
7. AT&W
www.lairdtech.com
{Set S Register Defaults}
5. AT&F*
16
{Read S Register – Valid Range}
{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: OK
Or
Response: ERROR nn
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 configuration 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 { Inquire}
This will make the device perform 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 is an optional parameter where the value specifies either a six digit device class code or
a two digit major device class. If it is not specified, the value is taken from S register 516.
When is six hexadecimal characters long, it specifies an AND mask which is used to filter
inquiry responses. When is two 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 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: 12346789012
12345678914
OK
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 filled 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 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 sped up if the friendly name is not required (flag not set in S330) as part of
the inquiry response or if a filter is used.
Bit
Default
Reserved for future usage
EIRD
RSSI
FN
COD
ADR
Figure 3.1: S Register 330 controlling inquiry response format
Field
Description
0 – ADR
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 – 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
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
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 inserted as separator
1 – display eird on inquiry result
0 – do not display eird on inquiry result
1 – COD
2 – FN
3 – RSSI
4 – EIRD
17
www.lairdtech.com
Table 3.2: Field Descriptions for S Register 330
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT Command Set
Reference
Inquiry Response Format
The format of an inquiry result will be:
,,,,
= 12 digit, hexadecimal;
= six digit, hexadecimal;
= printable ASCII character, enclosed by ‘ “ ‘
= signed two digits decimal
= printable ASCII character whenever possible, otherwise a byte is displayed as ¬2 digit
hexadecimal with preceding ‘\’, enclosed by ‘ “ ‘
For example the data block 01 41 42 43 44 02 03 45 46 04 0A 0D will be presented as
“\01ABCD\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 S 330, for each disabled item
a comma is printed.
Example: S330 = 9 (ADDR enabled, COD and FN disabled, RSSI enabled)
Inquiry Response:
123456789012,,,-54
123456789014,,,-54
OK
2. AT+BTIV { Inquire }
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.
3. AT+BTIN
{ 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 { 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 { Inquire }
18
www.lairdtech.com
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=”” {Set Up Outgoing EIR Data}
This command sets up outgoing EIR (extended inquiry response) data.
Format: = 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
Specification Version 2.1 + EDR [1], vol3, Part C – Generic Access Profile, 8 Extended Inquiry Response
Data Format (page 1305 in the .pdf-file).
Response: OK
7. AT+BTE?
{Query Outgoing EIR Data}
This command prints the outgoing EIR data that is currently set up
Response:
OK
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 defined in the BT2.1+EDR specification [1], vol3, Generic Access Profile (Table 5.7).
There are 4 Levels providing different levels of security:
Security Level
Characteristics
Comment
Level 3
• MITM protection (MITM = “Man in the
Middle” attack)
• Encryption
• User interaction
High security
Level 2
• No MITM protection
• Encryption
Medium Security
Level 1
• No MITM protection
• (No) Encryption (1)
• Minimal user interaction
Low Security
Level 0
• No MITM protection
• No Encryption
• Minimal user interaction
Permitted only for service
discovery
(1) Although encryption is not necessary for security level 1, encryption will always be enabled
because this specification mandates encryption for all services other than SDP (service discovery).
Table 3.3: Security Levels
19
www.lairdtech.com
The security level is defined 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 profiles and services
of the module. For SDP (service discovery profile), security level 0 is always assigned internally.
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT Command Set
Reference
2. IO-Capability (S321)
S-Register 321 defines 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 sufficient for MITM
protection (if required). Table 3.4 lists possible values.
S321
IO-Capability
Comment
Display only
The device has the capability to display or communicate a
six digit decimal number.
Display yes no
The 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).
Keyboard only
The device has a numeric keyboard that can input
numbers ‘0’ through ‘9’ and a confirmation. 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).
No input no output
The 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.
Reject IO-Cap requests
IO-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 defined by S-Register 324. The timeout must be at least 60s to meet the BT
specification requirements [1]. This time is required to be sufficient 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 Command
Operation
Comment
AT+BTBY
Accept pairing request
Representing ‘yes’ input
AT+BTBN
Reject pairing request
Representing ‘no’ input
AT+BTB012345 Enter six digit passkey displayed by remote device Representing keyboard input
Table 3.5: SSP Input commands
20
www.lairdtech.com
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT Command Set
Reference
7. AT+BTW
{Initiate SSP}
This command initiates secure simple pairing (dedicated bonding) with a device whose Bluetooth
address is . The correct term for this command’s action with respect to the Bluetooth
specification 2.1+EDR [1] is “Dedicated Bonding”.
Dedicated bonding means the exchange of link keys (pairing) without creating a connection to a
particular profile 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 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.
Register
Default
Range
Comment
S320
1..3
Security Level: see [1], vol3, Generic Access Profile - Table 5.7
needs subsequent ‘AT&W’ and power cycle to take effect
value = 3 overwrites S322
S321
0..4
Set IO capability:
0 – display only
1 – display yes no
2 – keyboard only
3 – no input no output
4 – reject IO-cap requests
S322
0..1
Force man-in-the-middle-protection (MITM):
0 – disabled
1 – enabled
referenced only if security level (S320) < 3
S323
0..1
Disable legacy (pre-BT2.1) Pairing:
0 – legacy pairing enabled
1 – legacy pairing disabled
S324
90
1..255
Secure Simple Pairing timeout in s
This value must be at least 60 in order to meet the recommendation of BT2.1 specification
Table 3.6: S-Registers for Secure Simple Pairing (SSP)
21
www.lairdtech.com
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 insufficient for MITM protection. In that case the pairing will fail (PAIR 2
). Please refer Table 5.6 in BT2.1+EDR specification [1], vol3, Generic Access Profile for
sufficient combinations of IO-capabilities for MITM (=authenticated link key).
Message
Action / Comment
PAIR ? ,””,
Passkey compare request:
Example:
000002”,863611
Expecting 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” if passkey does not match.
PASSKEY ? ,””
Passkey request:
Example:
Expecting the user to enter the passkey
displayed by the remote device.
Use AT+BTB,
PAIR ? 0016A4000002,”Laird BTM
PASSKEY ? 0016A4000001,”Laird BTM 000001”
example: AT+BTB012345 *see(1) below
PAIR N ,””,
Example:
PASSKEY N 0016A4000002,”Laird BTM
000002”,164585
Passkey notification:
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.
PAIR 0
Successfully paired with device of .
(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.
PAIR 1
Pairing timeout
PAIR 2
Pairing failed
PAIR 3
Pairing failed (too many repeat attempts)
PAIR 4
Pairing rejected by remote device
PAIR 5
Pairing failed (unit keys not supported)
PAIR 6
Pairing failed (SSP not supported)
PAIR 7
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
10. Known SSP Issues
22
www.lairdtech.com
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) 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) 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 and reinitiate pairing
from the local device (AT+BTW).
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT Command Set
Reference
AT Commands for Legacy Pairing
1. AT+BTW
{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 .
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=””), asynchronous indications will be sent
to the host in the form PIN? where the address confirms 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 .
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: OK
2. AT+BTK=””
{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: OK
3. Legacy Pairing – Asynchronous Messages
23
www.lairdtech.com
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 pairing will proceed as normal.
PAIR n
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 is the address of the peer device if available.
PAIR 0 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.
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: 12346789012
12345678913
12345678914
OK
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: OK
Or
Response: ERROR
3. AT+BTD {Remove Trusted Device}
This command is used to remove the specified 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: OK
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 confirmation 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: OK
5. AT+BTW? {List Cached Trusted Device}
This command is used to list the cached trusted device.
Response: 12346789012
OK
If the cache is empty the response is as follows.
Response: OK
AT Commands for Serial Stream Oriented Profiles (SSO)
The Serial Port Profile (SSP) and the Dial-up 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 of managing data and control over UART is to configure local command mode with S531=3.
In this mode, incoming RF data is presented by the asynchronous message RX. Outgoing data is sent
by ATX or ATY.
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 profile while already
one SSO connected will result in Error 65.
Any incoming connection request to an SSO profile will be rejected if one SSO is already connected.
24
www.lairdtech.com
The following section describes AT- commands related to SSO-profiles.
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT Command Set
Reference
1. ATX”” {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 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: OK
Or
ERROR 05
(e.g. too long)
2. ATY”” {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 flushed out.
The parameter 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: OK
Or
ERROR 05
(e.g. 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 specified in the S2 register, so it can be changed. In addition, the escape sequence
guard time is specified 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 significant 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 specified to avoid confusion when the
module is providing access to a modem.
Response: OK
4. !!! {Enter Remote Command Mode}
25
www.lairdtech.com
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 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 5). For this command to be effective S Register 536 must be set to 1.
Response: OK
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:
CONNECT 123456789012,<
(if it was an incoming connection)
CONNECT 123456789012,>
(if it was an outgoing connection)
Or
Response: ERROR nn
6. Dropping SSO Connections
In a conventional telephony modem, a call is normally terminated by first 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 configurable 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).
To reiterate, the escape sequence is as follows:-
This means that even when a file transfer is occurring and it happens to be full of characters
then it is not going to drop into command mode because, when transferring, a file it is going to happen
as fast as possible and so the inter character gap is going to be significantly shorter than the .
The character can be changed via the S2 register and the interval can be
specified via the S12 register (Appendix, Table 4.1).
7. SSO - Asynchronous Messages
26
www.lairdtech.com
RX
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 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 profiles.
Register
Default
Range
Description
S2
94
32..126
Escape 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 ‘^’.
S12
100
40..5000
Escape sequence guard time in milliseconds, with a
granularity of 20ms. New values are rounded down to
the nearest 20ms multiple.
S507
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
^^^ 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.
S531
0..4
Specifies 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 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).
S536
0..1
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 >= 2, then reading this register will always
return 0 and writing 1 will result in ERROR 33.
Table 3.8: S Registers for SSO profiles
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 {Make Device Discoverable and Selectively Connectable}
27
www.lairdtech.com
Make the BTM device discoverable (for all devices) and connectable for the device with the Bluetooth
address only. Connection requests from any other devices will be rejected.
If 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
512 and AT+BTM
Response: OK
Laird Technologies
BTM510/511
Bluetooth® Multimedia Module
AT Command Set
Reference
2. AT+BTG {Make Device Selectively Connectable Only}
Make the BTM device connectable for the device with the Bluetooth address only.
Connection requests from any other devices will be rejected.
If the specified 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
Response: OK
3.
AT+BTM