AT Command Reference

Applicable for Firmware version 4.5X, 4.6X, 6.5X, 6.1X

Revision Date Name Description
v1.0 21-07-2009 Kanwal Initial Draft version
v1.1 24-09-2009 Kanwal New AT command added
v1.2 15-06-2010 Kanwal Applicable to firmware v4.53, v4.61
v1.3 22-03-2011 Sumeet Updates for firmware v6.51
v1.4 10-06-2011 Kanwal Commands added for v6.17 firmware, new sections added.
Richard Imported the command reference into our wiki, the revision history is now managed by the wiki system itself.

Introduction

This document describes the configuration commands to control the operation of following LM Bluetooth devices:

  1. LM400 module
  2. LM780 module
  3. LM072 module
  4. LM071 Module
  5. LM048 adapter
  6. LM058 adapter
  7. LM048SPA adapter
  8. LM048v2 adapter
  9. LM058v2 adapter

AT Command Set

History

The AT command set was developed by Hayes to control the operation of telephony modems. The command set has been extended to control bluetooth device primary operation such as inquiry, connection setup/ disconnection etc. Other AT commands are also available to control the serial port setup and other user friendly features.
The Bluetooth device powers up in unconnected state and can be configured using UART interface similar to telephony modems. The device will act as Bluetooth slave by default and can be inquired/connect from other Bluetooth master device in neighborhood. The AT commands can be used to change the default behavior and settings for the current as well as future power up cycles.

Terminology

Symbol Description ASCII value (Hex)
Carriage Return 0x0D
Line Feed 0x0A
<cr,lf> Carriage return and line feed 0x0D, 0x0A
XXXXXXXXXXXX 12 hexadecimal BD address sequence

Command format

All the AT commands except the “AT” test command use the below command structure:

< parameters>

– Each command will start with “AT+” character sequence except “AT” test command.
– Command name as shown in below table listing all the available commands.
– The parameters are required for most of the commands. The parameter may be character, integer and character sequence (BD address, Pin code, Name etc) depending on the command operation.
– This character terminates the command packet and signals the device to proceed with command execution.

Command Response

The AT commands will have the response in the below format:
<parameter,value> <parameter,value> – This sequence will be part of response to the commands sent in query format. e.g. STOP1 where STOP is the parameter related to serial port stop bits and 1 is the parameter value.
– The command response can be any one of following types:

  • <cr,lf>OK<cr,lf> – If the command has been sent to Bluetooth device in correct format and is applicable in current device operating mode.
  • <cr,lf>ERROR<cr,lf> – If the command has been sent in wrong format/command is invalid/ command is not applicable in current device operating mode.
  • <cr,lf> – If the command response has been disabled.

Host Events

Host device connected to Bluetooth device will receive an event sequence on occurrence of Bluetooth related events. Refer to section 2.9 Host Events Description for details.

Operation Mode

The device will always be in one of the below operating modes:

Online Data Mode Data transfer mode when device is in connected state.
Command Mode Accepts AT command for device configuration.
Online Command Mode Accepts almost all AT commands for device configuration in connected state.

Command Types

Command Type Parameter Command
Device Information Test AT
Firmware Version AT+VER
Settings AT+ENQ
Reset Restore Factory Settings AT+RESET
Serial Port Baud Rate AT+BAUD
Stop Bits AT+STOP
Parity bits AT+PAR
Flow Control AT+FLOW
Character Echo AT+ECHO
Command Response AT+RESP
Modem Signals AT+RICD
Bluetooth Type Device Role AT+ROLE
Information BD Address AT+ADDR
Inquire devices AT+FIND
RSSI AT+RSSI
Settings Device Name AT+NAME
Discoverability AT+DCOV
Security Fixed Pin Code2 AT+PIN
Dynamic Pin Code 1 AT+DPIN
Connection Connect device AT+CONN
Drop connection AT+DROP
Bonding AT+BOND
Auto Connect AT+ACON
BT2.1 Security 1 Device Type 1 AT+IOTYPE
MITM protection 1 AT+MITM
Passkey Confirmation 1 AT+PASSCFM
Passkeys Input 1 AT+PASSKEY
Misc Escape Sequence +++
Escape Sequence handling AT+ESC
Mode switch AT+AUTO
Remote Configuration AT+RCFG
Low power Mode AT+SLEEP

1 Commands only available in v6.17 firmware version running on LM780/LM400/LM072 module hardware.
2 Command with additional parameter in v6.17 firmware version running on LM780/LM400/LM072 module hardware.

Command Description

AT


This command allows the connected host device to check the availability of the Bluetooth device. The connected host device must have same serial port settings as configured for the Bluetooth device.

Syntax

AT

Response

AT+VER


Returns the device firmware version.

Syntax

AT+VER

Response

<cr,lf> F/W VERSION: vX.YZ

X: Major release of device firmware
YZ: Minor release/updates of device firmware
e.g. FW VERSION: v4.50

AT+ENQ


List all the device information and all the settings along with their brief description. The settings include serial port, Bluetooth related and other misc settings.

Syntax

AT+ENQ

Response

Start:
For Each Parameter: <cr,lf> <cr,lf>

e.g. device role setting will be listed as “<cr,lf>ROLEM, MASTER ROLE <cr,lf>”. All other settings and other device information is listed in similar manner.

AT+RESET


This command is used to restore the default factory settings and perform device reboot. The default factory settings are listed in section Default Factory Settings.

Syntax

AT+RESET

Response

AT+BAUD


The command allows setting the baud rate for the serial UART port. The current baud rate setting can also be retrieved by sending this command in query format.

Baud Rate Table

where b – varies from 10 to 20 for different baud rates. The baud rate varies from 1200bps to 921 Kbps. e.g. To set 19200 as UART baud rate, the command is AT+BAUD14

b

Baud rate (bps)

10 1200
11 2400
12 4800
13 9600
14 19200
15 38400
16 57600
17 115200
18 230400
19 460800
20 921600

AT+BAUDb

Syntax

AT+BAUD b

Response

AT+BAUD?

Syntax

AT+BAUD?

Response

<cr,lf> BAUD b

e.g on default setup, the response will be <cr,lf>BAUD14

Note: In firmware v4.5x series running on serial adapters (LM048, LM058, and LM048SPA), the maximum baud rate support is 230400 bps.

AT+STOP


The command is used to specify one or two stop bits for serial port communication. The current setting can also be retrieved sending this command in query format.

Stop Bit Table

n

Number of Stop bits

1 1
2 2

AT+STOPn

Syntax

AT+STOP n

Response

AT+STOP?

Syntax

AT+STOP?

Response

<cr,lf> STOP n

e.g on default setup, the response will be <cr,lf>STOP1

AT+PAR


The command is used to specify the parity type of the serial port. The current setting can also be retrieved by sending this command in query format.

Parity Bit Table

N

Parity Type

0 No Parity
1 Odd Parity
2 Even Parity

AT+PARn

Syntax

AT+PAR n

Response

AT+PAR?

Syntax

AT+PAR?

Response

<cr,lf> PAR n

e.g on default setup, the response will be <cr,lf>PAR0

AT+FLOW


The command is used to enable/disable the RTS/CTS flow control for the serial port. The current setting can also be retrieved by sending this command in query format.

Where parameter c is a character used to enable/disable the flow control.

RS232 Flow Control Table

c

Flow Control

‘+’ Flow Control Enabled
‘-‘ Flow Control Disabled

AT+FLOWc

Note: This command will cause the device to reboot.

Syntax

AT+FLOW c

Response

AT+FLOW?

Syntax

AT+FLOW?

Response

<cr,lf> FLOW c

e.g on default setup, the response will be <cr,lf>FLOW+

Note:

  1. In LM048SPA adapter with firmware series v4.6x, AT+FLOW refers to DTR/DSR flow control and no RTS/CTS handling is supported. For all other products, AT+FLOW refers to RTS/CTS flow control.
  2. In LM048v2 and LM058v2 adapters running v6.5x firmware, this setting can be used in conjunction with AT+MODEM command to choose different configurations of RS232 lines. See Modem Signal Meaning.

AT+ECHO


The command is used to enable/disable the echo-back of command characters from the Bluetooth device. The current setting can also be retrieved by sending this command in query format.

Command Echo Table

Where parameter c is a character used to enable/disable the echo back feature.

c

Command Echo Mode

‘+’ Command Echo Enabled
‘-‘ Command Echo Disabled

AT+ECHOc

Syntax

AT+ECHO c

Response

AT+ECHO?

Syntax

AT+ECHO?

Response

<cr,lf> ECHO c

e.g on default setup, the response will be <cr,lf>ECHO+

AT+RESP


The command is used to enable/disable the command response from the Bluetooth device. Different types of command response may be received by Host device and are listed in Command Response. The current setting can also be retrieved by sending this command in query format.

AT+RESPc

Where parameter c is a character used to enable/disable the command response.

c Command Response
‘+’ Enable
‘-‘ Disable
Response

AT+RESP?

Response

<cr,lf>RESPc if the command is successful. Here, c- current command response setting. E.g on default setup, the response will be <cr,lf>RESP+

AT+MODEM

This command is available only for v6.5x firmware running on serial adapters (LM048v2 and LM058v2). This command is used in conjunction with AT+FLOW command to enable/disable various RS232/Modem signal handling. The current setting can also be retrieved by sending this command in query format.

AT+MODEMc

Where parameter c is used to disable or configure Local Loopback or Remote Transfer settings on the adapter

C Modem Signals
‘-‘ Disable
‘L’ Local Loopback
‘R’ Remote Transfer
Response

The meaning of the modems signals is described in section 2.8.11.3

AT+MODEM?

Response

<cr,lf>MODEMc if the command is successful. Here, c- current modem signal setting. E.g on default setup, the response will be <cr,lf>MODEM-

Modem Signal Meaning

The modem signal setting is used in conjunction with AT+FLOW Settings to enable/disable RS232 modem control signals as per the table below.

FLOW CONTROL (AT+FLOW) MODEM SIGNAL (AT+MODEM) RS232 SIGNALS
USED
Description
FLOW- MODEM- Tx, Rx, GND 3 wire configuration.
FLOW+ MODEM- Tx, Rx, GND, RTS, CTS RTS/CTS signals are used for data flow control between host and local Bluetooth device, and NOT transferred to remote Bluetooth device wirelessly.
FLOW- MODEML Tx, Rx, GND, RTS<>CTS, DTR<>DSR RTS looped back to CTS, DTR looped back to DSR. No RS232 control signal transferred to remote Bluetooth device wirelessly.
FLOW+ MODEML Tx, Rx, GND, RTS, CTS, DTR<->DSR RTS/CTS signals used for data flow control between host and local Bluetooth device, andNOT transferred to remote Bluetooth device wirelessly. DTR looped back to DSR. Thisconfiguration is equivalent to LM048 adapter running v4.5x firmware.
FLOW- MODEMR Tx, Rx, GND, RTS(R), CTS(R), DTR(R), DSR(R) All 7 signals used. All RS232 control signals (DTR, DSR, RTS and CTS) transferred wirelessly to remote Bluetooth device.
FLOW+ MODEMR Tx, Rx, GND, RTS, CTS, DTR(R), DSR(R) All 7 lines used. Only DTR, DSR signals transferred wirelessly to remote Bluetooth device. If RTS, CTS signals are not used, then this configuration is equivalent to LM048SPA Adapter running v4.6X firmware.

AT+ROLE

The command is used to set the local device as Bluetooth Master/Slave. The current setting can also be retrieved by sending this command in query format.

AT+ROLEc

Where parameter c is a character used to configure the local device type.

c Device Type
‘M’ Master
‘S’ Slave


Note: This command will cause the device to reboot.

Response

AT+ROLE?

Response

<cr,lf>ROLEc< command_response> if the command is successful. Here, c- current device type setting. E.g on default setup, the response will be <cr,lf>ROLES< command_response>

AT+ADDR

This command is used to display the Bluetooth address of the local device.

AT+ADDR?

Response

<cr,lf>< command_response> if the command is successful. Here, XXXX-XX-XXXX is the Bluetooth address of local device.

AT+FIND

This command is used to search for any Bluetooth device in the neighborhood within one minute. If any device is found, its name and address will be listed. Maximum limit of devices searched is 8. The search ends with a message “Inquiry ends. xx device(s) found.” This command is available only when the adaptor is in the manual master role.

AT+FIND?

Response

<cr,lf>Inquiry Results:<cr,lf>
<cr,lf> for every device found. Here, XXXX-XX-XXXX is the Bluetooth address of local device. e.g. “1 Serial Adapter 001E-3A-2CDAB7”

AT+FIND-

This command will cancel the ongoing search operation. If the search is finished (1 minute timeout / max devices found), then the command will return error.

Response

<cr,lf> Inquiry cancelled

AT+RSSI

Inquire RSSI value for current bluetooth connection. This command is available in online command mode when the device is in connected state.

AT+RSSI

Response

<cr,lf>
– can be STRONG/AVERAGE/WEAK depending on the received radio signal strength.

AT+NAME

This command is used to specify a name for the adaptor. You can specify a friendly name using 0 to 9, A to Z, a to z, space and –, which are all valid characters. Note that “first space or -, last space or – isn’t permitted”. The default name is “Serial Adapter”. The current device name can be retrieved by sending this command in query format.

AT+NAME=XXXX

Where the parameter “XXXX” is a character string with a maximal length of 16 bytes.

Response

AT+NAME?

Response

<cr,lf> if the command is successful. Here, is the device name . E.g. on default setup, the response will be <cr,lf>Serial Adapter

AT+PIN

This command is used to specify a fixed PIN code for a secured bluetooth connection. The default PIN is “1234”. Paired Bluetooth devices should have a same PIN code. The current pin code setting can be retrieved by sending this command in query format.
In firmware v6.1x series running on LM780/LM400/LM072 modules, the fixed pin code will only be used for connection with remote Bluetooth 2.0 complaint device. Automatic pairing (also known as Just Works) takes place on connection with remote Bluetooth 2.1 complaint device. Extra commands related to Bluetooth 2.1 security and use of dynamic pin codes have been added in v6.17 firmware running on LM780/LM400/LM072 modules. Refer to section 2.8.27, 2.8.28, 2.8.29, 2.8.30, 2.8.31 for details.

AT+PIN=XXXX

Where the parameter “XXXX” is a 4-8 digit string.

Response

AT+PIN-

This command will cancel the pin code security for Bluetooth connections. The remote Bluetooth device must also cancel pin code security in order to connect successfully with local Bluetooth device. Some devices e.g. Mobile phone do not allow connection without pin code security so disabling pin code security will prohibit successful connection with these devices.
In firmware v6.1x series running on LM780/LM400/LM072 modules, disabling pin code use will have no effect during connection with remote Bluetooth 2.1 complaint device. Refer to section 2.8.17AT+PIN and section for details. In firmware v6.17, this command will also erase all pairing information related to previous connected devices.

Response

AT+PIN?

Response

<cr,lf> if the command is successful. Here, is the pin code in use . E.g on default setup, the response will be <cr,lf>1234 .Incase, the pin code security is disabled the response will be <cr,lf>NULL

AT+PIN+

This command will enable fixed pin code security for Bluetooth connections with remote Bluetooth 2.0 device. The remote device must enable pin code security in order to connect successfully with local Bluetooth device.
In firmware v6.1x series running on LM780/LM400/LM072 modules, fixed pin code use will have no effect during connection with remote Bluetooth 2.1 complaint device. Refer to section2.8.17, 2.8.27, 2.8.28, 2.8.29, 2.8.30, 2.8.31 for details.

Response

AT+DCOV

It is used to specify whether the adaptor can be discovered or connected by remote devices. The current setting can also be retrieved by sending this command in query format.

AT+DCOVc

Where parameter c is a character used to enable/disable the discoverability status.

C Status
‘+’ Discoverable
‘-‘ Non-discoverable


Note: This command will cause the device to reboot.

Response

AT+DCOV?

Response

<cr,lf>DCOVc if the command is successful. Here, c- current discoverability status setting. E.g on default setup, the response will be <cr,lf>DCOV+

AT+CONN

This command is used to establish a connection. It is available only when the local Bluetooth device is in the manual master role.

AT+CONN

Connect the local bluetooth device to specified bonded bluetooth device. It is available only when “AT+BOND=xxxxxxxxxxxx” is already executed to set remote bonded device.

Response

where will be connection related event and depends on the connection attempt result.

AT+CONN= XXXXXXXXXXXX

Connect the local bluetooth device to the bluetooth device address specified by “XXXXXXXXXXXX”.

Response

where will be connection related event and depends on the connection attempt result.

AT+CONNn

Where parameter n is list index of the remote device found through AT+FIND? command.
n- varies from 1 to 8.

Response

where will be connection related event depending on the connection attempt result.

AT+DROP

This command is used to drop active connection from master or slave device. It is only allowed in online command mode when the device is in connected state.

AT+DROP

Drop current connection when the device in online command mode.

Response

where will be disconnection event.

AT+BOND

For security purpose, this command is used to specify a unique remote Bluetooth device to be connected. In the master role, the local device pairs and connects with the designated remote slave address. In the slave mode, this command is a filter condition to accept the connection request from the master device. The current bonded device address can be retrieved by sending this command in query format.

AT+BOND=XXXXXXXXXXXX

Response

AT+BOND-

Restore the status in which the local Bluetooth device can connect with any remote device. There is no device bonded with local device.

Response

AT+BOND?

Response

<cr,lf> if the command is successful. Here, XXXX-XX-XXXX is the Bluetooth address of bonded device. E.g. on default setup, there will be no bonded device, hence the response will be <cr,lf>0000-00-0000<cr,lf>

AT+ACON

This command is used to enable/disable auto-connection feature in the master role. The current setting can also be retrieved by sending this command in query format.

AT+ACONc

Where parameter c is a character used to enable/disable the auto connection feature.

c Connect Type
‘+’ Auto Connect
‘-‘ Manual


Note: This command will cause the device to reboot. In Manual connect type, the local device (if master type) will need to use AT+FIND? command to find Bluetooth devices in neighborhood and then use AT+CONNn to connect to specific device.

Response

AT+ACON?

Response

<cr,lf>ACONc if the command is successful. Here, c- current connect type setting. E.g on default setup, the response will be <cr,lf>ACON+

AT+ESC

This command Disable/Enable the handling of escape sequence “+++”. Note: The escape sequence must be sent with guard time of 1000 msec. The current setting can also be retrieved by sending this command in query format.

AT+ESCc

Where parameter c is a character used to enable/disable the escape sequence handling.

C Status
‘+’ Enable
‘-‘ Disable

Note: When the local device is in data mode (connected state), it can be forced into online Command mode during active connection to the remote device. The “+++” escape sequence must be sent with guard time of 800-1000msec. The next AT command must be sent after waiting for the response “<cr,lf>OK<cr,lf>” to indicate successful switch from data mode to online command mode.

Response

AT+ESC?

Response

<cr,lf>ESCc if the command is successful. Here, c- current status. E.g on default setup, the response will be <cr,lf>ESC+

AT+AUTO

The command directs the device to switch from online command mode to online data mode. This command is only allowed in connected state.

AT+AUTO

Response

<cr,lf>OK<cr,lf>

AT+RCFG

This command enables or disables local device configuration from the remote device by executing the remote access hand shaking protocol. Please ask for separate document for remote configuration details. The current setting can also be retrieved by sending this command in query format.

AT+RCFGc

Where parameter c is a character used to enable/disable the remote configuration.

C Status
‘+’ Enable
‘-‘ Disable
Response

AT+RCFG?

Response

<cr,lf>RCFGc if the command is successful. Here, c- current setting. E.g on default setup, the response will be <cr,lf>RCFG+

AT+SLEEP

This command is used to enable/disable auto-power saving feature of RS232 driver as well as low power modes of Bluetooth device. The current setting can also be retrieved by sending this command in query format.

AT+SLEEPc

Where parameter c is a character used to enable/disable the auto power saving feature.

c Status
‘+’ Enable
‘-‘ Disable
Response

AT+SLEEP?

Response

<cr,lf>SLEEPc if the command is successful. Here, c- current setting. E.g. on default setup, the response will be <cr,lf>SLEEP-

AT+DPIN

This command is only available in v6.17 firmware running on LM780/LM400/LM072 modules. The dynamic pin code will only be used for connection with remote Bluetooth 2.0 complaint device. Automatic pairing (also known as Just Works) takes place on connection with remote Bluetooth 2.1 complaint device. The current setting can be retrieved by sending this command in query format.
Extra commands related to Bluetooth 2.1 security have been added in v6.17 firmware running on LM780/LM400/LM072 modules.

AT+DPIN= XXXXXXXXXXXX,dddd

This command is used to specify dynamic PIN code for secured connection with specified remote Bluetooth 2.0 device. Here, the parameter “dddd” is a 4-8 digit pin code string and “XXXXXXXXXXXX” is address of remote Bluetooth 2.0 device. This command must be sent by host on receiving the PINCODE REQ “XXXX-XX-XXXXXX” event from the module. Refer to section 2.9.2 for details.

Response

AT+DPIN?

Response

<cr,lf> if the command is successful. Here, c- current setting. E.g on default setup, the response will be <cr,lf>DPIN.

AT+DPIN+

This command will enable use of dynamic pin code instead of fixed pin code for secured connections with remote Bluetooth 2.0 device. The remote device as well as local device must enable pin code security in order to connect successfully with local device. The dynamic pin code will only be used if pin code security has been enabled. Refer to section 2.8.17.4 AT+PIN+ for details.
In firmware v6.17 running on LM780/LM400/LM072 modules, dynamic pin code use will have no effect during connection with remote Bluetooth 2.1 complaint device. Refer to section 2.8.17, 2.9.2 for details.

Response

AT+DPIN-

This command is used to disable use of dynamic pin code for connections with remote Bluetooth 2.0 devices. The local Bluetooth device will use fixed pin code during connections if pin code security has been enabled.

Response

AT+IOTYPE

This command is only available in v6.17 firmware running on LM780/LM400/LM072 modules. This command configures input output device type required for connection with remote Bluetooth 2.1 device. By default, IOTYPE is 3 which mean “No Display No Keyboard”. The current setting can be retrieved by sending this command in query format.

AT+IOTYPEn

where n – varies from 0 to 4 depending on device type used.

N Device Type/capability
0 Display Only
1 Display with Yes or No
2 Keyboard Only
3 No Display No Keyboard
4 Reject connection with remote Bluetooth 2.1 devices
Response

AT+IOTYPE?

Response

<cr,lf>IOTYPEn if the command is successful. Here, n- device type. E.g. on default setup, the response will be <cr,lf>IOTYPE3

AT+MITM

This command is only available in v6.17 firmware running on LM780/LM400/LM072 modules. This command enables/disables the MITM (man in the middle) protection used for connection security with remote Bluetooth 2.1 device. By default, MITM is disabled which results in Automatic pairing (also known as Just Works) on connection with remote Bluetooth 2.1 complaint device if remote devices allows connection with no MITM protection. The current setting can be retrieved by sending this command in query format.

AT+MITMc

Where parameter c is a character used to enable/disable the MITM security feature.

c MITM security
‘+’ Enabled
‘-‘ Disabled
Response

AT+MITM?

Response

<cr,lf>MITMc if the command is successful. Here, c- MITM security setting. E.g. on default setup, the response will be <cr,lf>MITM-

AT+PASSCFM

This command is only available in v6.17 firmware running on LM780/LM400/LM072 modules. It must be used during passkey security exchange before connection with remote Bluetooth 2.1 devices if local device “IOTYPE” has been configured as “Display with Yes or No” and MITM protection has been enabled.

AT+PASSCFM= XXXXXXXXXXXX,c

This command is used to send passkey confirmation during passkey security exchange before connection with remote Bluetooth 2.1 devices. Here, the parameter c” is a either ‘Y’ or ‘N’ and “XXXXXXXXXXXX” is address of remote Bluetooth 2.1 device. This command must be sent by host on receiving the PASSKEY CFM”XXXX-XX-XXXXXX”,dddddd event from the module. Refer to section 2.9.3, 2.10 for details.

Response

AT+PASSKEY

This command is only available in v6.17 firmware running on LM780/LM400/LM072 modules. It must be used during passkey security exchange before connection with remote Bluetooth 2.1 devices if local device “IOTYPE” has been configured as “Keyboard only” and MITM protection has been enabled.

AT+PASSKEY= XXXXXXXXXXXX,dddddd

This command is used to send passkey confirmation during passkey security exchange before connection with remote Bluetooth 2.1 devices. Here, the parameter “dddddd” is 6 digit passkey and “XXXXXXXXXXXX” is address of remote Bluetooth 2.1 device. This command must be sent by host on receiving the PASSKEY REQ “XXXX-XX-XXXXXX” event from the module. Refer to section 2.9.3, 2.10 for details.

Response

AT+RTS

This command relates to the state of the RTS line.

AT+RTS?

Query the current state of the line.

Response

<cr,if>RTSc Where ‘c’ is ‘+’ or ‘-‘.

AT+RTSc

c Line state
‘+’ High
‘-‘ Low

AT+CTS

This command relates to the CTS line.

AT+CTS

Query the state of the line.

Response

<cr,if>CTSc Where ‘c’ is ‘+’ or ‘-‘; high and low respectively.

Host Events Description

Connection Events

Different connection related are:

  • <cr,lf>CONNECT “XXXXXXXXXXXX”<cr,lf> – The event sequence will be received on a successful connection attempt either by local device or from a remote bluetooth device.
  • <cr,lf>CONNECT Attempt Fail<cr,lf> – When the attempted connection attempt from the local Bluetooth device fails for some reason. The reason for connection failure will not be listed.
  • <cr,lf>DISCONNECT “XXXXXXXXXXXX”<cr,lf> – On the disconnection of the current active connection, the sequence will be received.
  • <cr,lf>Inquiry Cancelled<cr,lf> – When the inquiry operation from the local Bluetooth device is pre terminated using the AT command, the event will be sent to host device.

Dynamic Pin Code Event

Note: This section is only applicable for v6.17 firmware version running on LM780/LM400/LM072 module hardware. If applicable, refer to section 2.8.17, 2.8.27 for more details.

PinCode Req

This event is sent by local Bluetooth device to the connected host on authentication request from remote Bluetooth 2.0 device if dynamic pin code (“AT+DPIN+”) and pin code authentication (“AT+PIN”) have been enabled.

Syntax

<cr,lf>PINCODE REQ”XXXXXXXXXXXX”<cr,lf>
where”XXXXXXXXXXXX” is address of remote Bluetooth 2.0 device. The host should send (“AT+DPIN“) command with the 4-8 digit pin code for authentication process.

Bluetooth 2.1 Security events

Note: This section is only applicable for v6.17 firmware version running on LM780/LM400/LM072 module hardware. If applicable, refer to section 2.10 for more details.
The connected host will receive one event message during authentication with remote Bluetooth 2.1 device. The event message received will depend on the local device type configuration (“AT+IOTYPE”) as well as MITM protection setting.

Passkey Cfm

This event is sent by local Bluetooth device to connected host on authentication request from remote Bluetooth 2.1 device if MITM protection has been enabled on local Bluetooth device and local device type configuration is (“AT+IOTYPE1”) which means “Display with Yes or No”.

Syntax

<cr,lf>PASSKEY CFM”XXXXXXXXXXXX”,dddddd<cr,lf>
where”XXXXXXXXXXXX” is address of remote Bluetooth 2.1 device and”dddddd” is 6 digit passkey to be confirmed by host and remote device user. The host must display passkey(6 digit) and prompt local user to confirm if displayed passkey is same as displayed on remote BT2.1 device(“Display Yes or No”) or same passkey entered by remote person on remote BT2.1 device(“Keyboard only”). The host should send (“AT+PASSCFM“) command for this confirmation.

Passkey Dsp

This event is sent by local Bluetooth device to connected host on authentication request from remote Bluetooth 2.1 device if MITM protection has been enabled on local Bluetooth device and local device type configuration is (“AT+IOTYPE0”) which means “Display Only”.

Syntax

<cr,lf>PASSKEY DSP”XXXXXXXXXXXX”,dddddd<cr,lf>
where”XXXXXXXXXXXX” is address of remote Bluetooth 2.1 device and “dddddd” is 6 digit passkey for display purposes only. The host must display passkey (6 digit) and remote device user should confirm if displayed pass key is same as displayed on remote BT2.1 device (“Display Yes or No”) or same passkey entered by remote user on remote BT2.1 device (“Keyboard only”).

Passkey Req

This event is sent by local Bluetooth device to connected host on authentication request from remote Bluetooth 2.1 device if MITM protection has been enabled on local Bluetooth device and local device type configuration is (“AT+IOTYPE2”) which means “Keyboard Only”.

Syntax

<cr,lf>PASSKEY REQ”XXXXXXXXXXXX”<cr,lf>
where”XXXXXXXXXXXX” is address of remote Bluetooth 2.1 device. . The host will prompt local user to enter same passkey as displayed on remote BT2.1 device(“Display  Yes or No” or “Display only”) or same passkey entered by remote person on remote BT2.1 device(“Keyboard only”).  The host should send (“AT+PASSKEY“) command for this confirmation.

Bluetooth Security Changes

Note: This section is only applicable for v6.17 firmware version running on LM780/LM400/LM072 module hardware.
Bluetooth security had significant changes and improvements in BTv2.1 specification. The most noticeable change was introduction of Secure Simple Pairing during authentication (also known as pairing) of Bluetooth connection between two Bluetooth v2.1 complaint devices.
The authentication (also known as pairing) between Bluetooth 2.1 and Bluetooth 2.0 device will use 4-8 digit pin code (also known as legacy pairing). However, different security methods are supported during authentication between two Bluetooth 2.1 devices. The security method used will depend on the type of devices involved in authentication.

Bluetooth 2.1 Security Methods

There are basically 3 security methods supported in Bluetooth 2.1 authentication process:

Just works

This method is used by devices with limited input or output capabilities such as Bluetooth headset with no display no keyboard interface. The two Bluetooth 2.1 devices create authentication keys without any input/confirmation/interaction from the user. However, few Bluetooth devices may prompt the user to confirm the pairing process. This mode is more secure than the fixed PIN mechanism which is typically used for legacy pairing (Bluetooth 2.0 pin code pairing) by this set of limited devices. This method provides no man in the middle (MITM) protection.

Numeric comparison

This method is used in a scenario where both Bluetooth 2.1 devices have a display and at least one can accept a binary Yes/No user input. This method displays a 6-digit numeric code on each device. The user should compare the numbers to ensure they are identical. If the comparison succeeds, the user(s) should confirm pairing on the device(s) that can accept an input. This method provides MITM protection, assuming the user confirms on both devices and actually performs the comparison properly.

Passkey Entry

This method may be used between a device with a display and a device with numeric keypad entry (such as a keyboard), or two devices with numeric keypad entry. In the first case, the display is used to show a 6-digit numeric code to the user, who then enters the code on the keypad. In the second case, the user of each device enters the same 6-digit number. Both cases provide MITM protection.

Security Options

The security options include configuration of local device input and output capabilities as well as MITM protection requirements. These security options are exchanged between the local Bluetooth 2.1 device and remote Bluetooth 2.1 device to select appropriate security method for authentication process. The local device capabilities can be configured in 4 ways:

Display Only

Host event “Passkey Dsp” with 6 digit passkey will be sent to host on serial interface if local device or remote BT2.1 device has enabled MITM protection. The host must display passkey (6 digit) and remote device user should confirm if displayed pass key is same as displayed on remote BT2.1 device (“Display Yes or No”) or same passkey entered by remote user on remote BT2.1 device (“Keyboard only”). If remote BT2.1 device is “No Display no keypad” or “Display only”, pairing will be rejected and no message will be sent to host.  
If MITM protection is disabled in local as well as remote BT2.1 device, automatic pairing (Just Works) takes place irrespective of remote BT2.1 device type.
For example: On pairing request from mobile phone, the host will receive 6 digit passkey for display purpose only. The mobile phone (“Display Yes or No”) user will confirm if passkey displayed on mobile is same as displayed on host. MITM protection must be enabled to display passkey on host as well as prompt mobile phone user for confirmation.

Display with Yes or No

Message “Passkey Cfm” with 6 digit passkey will be sent to host if local or remote BT2.1 device has enabled MITM protection. The host must display passkey(6 digit) and prompt local user to confirm if displayed passkey is same as displayed on remote BT2.1 device(“Display Yes or No”) or same passkey entered by remote person on remote BT2.1 device(“Keyboard only”). The host should send “AT+PASSCFM” command for this confirmation.  If remote BT2.1 device is “No Display no keypad” or “Display only”, pairing will be rejected and no message will be sent to host.
If MITM protection is disabled in local as well as remote BT2.1 device, automatic pairing (Just Works) takes place irrespective of remote BT2.1 device type.
For example: On pairing request from mobile phone, the host will receive 6 digit passkey for display and local user will require to confirm if passkey displayed is same as displayed on mobile(“Display Yes or No”). Both host and mobile phone user will confirm the passkey displayed on both sides. MITM protection must be enabled to display and confirm passkey by both host as well as mobile phone user.

Keyboard Only

Message “Passkey Req” will be sent to host to request 6 digit passkey if local device or remote BT2.1 device has enabled MITM protection. The host will prompt local user to enter same passkey as displayed on remote BT2.1 device(“Display  Yes or No” or “Display only”) or same passkey entered by remote person on remote BT2.1 device(“Keyboard only”).  The host should send “AT+PASSKEY” command for this confirmation. If remote BT2.1 device is “No Display no keypad”, pairing will be rejected and no message will be sent to host.
If MITM protection is disabled in local as well as remote BT2.1 device, automatic pairing (Just Works) takes place irrespective of remote BT2.1 device type.
For example: On pairing request from mobile phone, the host must prompt local user to enter same passkey which is displayed on mobile (“Display Yes or No”). The mobile phone user will display the passkey entered by local user and prompt mobile phone user to confirm the passkey. MITM protection must be enabled to request passkey from the host as well as prompt mobile phone user for confirmation.

No Display No keyboard

No message will be sent to host and all paring requests will be rejected from any remote BT2.1 device if local host or remote device has enabled MITM protection.
If MITM protection is disabled in local as well as remote BT2.1 device, automatic pairing (Just Works) takes place irrespective of remote BT2.1 device type.
For example: On pairing request from mobile phone, automatic pairing takes place if MITM protection is disabled. The mobile phone user will be prompted to confirm automatic pairing with the local device.

Default Factory Settings

Parameter Default Value (v4.xx firmware) Default Value (v6.5x firmware) Default Value (v6.1x firmware) Description
BAUD 14 14 14 19200 bps
STOP 1 1 1 1 stop bit
PAR 0 0 0 None
FLOW + + +: Hardware, – : Disabled
ECHO + + + Enabled
RESP + + + Enabled
MODEM Not supported Disabled
ROLE S + + Slave device
NAME Serial Adapter SerialAdapterXX SerialAdapter Device name. XX is last 2 digits of Bluetooth Address
PIN 1234 1234 1234 Enabled
DCOV + + + Discoverable
BOND 0000-00-000000 0000-00-000000 0000-00-000000 No Bonding
ACON + + + Auto-Connect
ESC + + + Enabled
RCFG + + + Enabled
SLEEP Disabled
DPIN1 Disabled
IOTYPE1 3 No Display
no keyboard
MITM1 Disabled


1 Parameters only used in firmware v6.17 running on LM780/LM400/LM072 modules.