u blox Malmo 090202S Serial Port Adapter User Manual Part 2

u-blox Malmo AB Serial Port Adapter Users Manual Part 2

Contents

Users Manual Part 2

INDUSTRIAL BLUETOOTH™
Serial Port Adapter™
Version 2 and 3
AT Commands
Serial Port Adapter
Version 2 and 3
AT Commands
iii
Copyright © 2003 connectBlue AB.
The contents of this document can be changed by connectBlue AB without prior
notice and do not constitute any binding undertakings from connectBlue AB. con-
nectBlue AB is not responsible under any circumstances for direct, indirect, unex-
pected damage or consequent damage that is caused by this document.
All rights reserved.
Release: 0510
Document version: 3.2
Document number: cBProject-0501-11 (8)
Printed in Sweden.
Trademarks
The BLUETOOTH trademarks are owned by their proprietor and used by con-
nectBlue under license.
Third party brands and names are the property of their respective owners.
4
Contents
1. Introduction 8
1.1 Related Documents ...........................................................................8
2. Data Mode and AT Mode 9
3. Baud Rate 10
4. Configuration and Operation 11
4.1 LED Indication .................................................................................11
4.2 Bluetooth Settings............................................................................11
4.3 Searching for Other Bluetooth Devices ...........................................12
4.4 Searching for Services.....................................................................12
4.5 Creating Serial Connections and Sending Data..............................12
How to Select What Profile to Use ..............................................12
Client or Server............................................................................12
Wireless Multidrop™ ...................................................................12
Connection Establishment – Server ............................................13
Connection Establishment – Client..............................................13
4.6 Master/Slave Handling.....................................................................13
4.7 Bluetooth Security............................................................................14
Security Modes............................................................................14
Bonding and Pairing ....................................................................15
5. Power Save Modes 16
5.1 How to Use the Stop Mode Feature ................................................16
6. Restoring Default Configuration 17
6.1 Serial Settings..................................................................................17
6.2 Factory Settings...............................................................................17
7. AT Commands Over Bluetooth 18
8. Optimization 19
9. Version 3 vs. Version 2 20
10. Syntax 21
10.1 Command Line Format....................................................................21
10.2 Data Types ......................................................................................21
String 22
Integer 22
Enumerator..................................................................................22
Bd_Addr.......................................................................................22
Introduction
5
11. AT Commands Reference 23
11.1 Standard AT Commands.................................................................23
Command “AT”............................................................................ 23
Command “AT*”........................................................................... 23
Command “ATZ”.......................................................................... 23
Command “AT&F” ....................................................................... 24
Command “ATS2”........................................................................ 24
Command “ATE”.......................................................................... 24
11.2 GAP Commands.............................................................................. 25
Read_Discoverability_Mode (AT*AGDM?) ................................. 25
Write_Discoverability_Mode (AT*AGDM=) ................................. 25
Read_Connectability_Mode (AT*AGCM?).................................. 26
Write_Connectability_Mode (AT*AGCM=).................................. 26
Read_Pairing_Mode (AT*AGPM?).............................................. 27
Write_Pairing_Mode (AT*AGPM=).............................................. 27
Read_Security_Mode (AT*AGSM?)............................................ 28
Write_Security_Mode (AT*AGSM=)............................................ 28
Name_Discovery (AT*AGND=)...................................................28
Device_Discovery (AT*AGDD=).................................................. 29
Inquiry (AT*AGI=)........................................................................ 30
Bond (AT*AGB=)......................................................................... 31
Un_Bond (AT*AGUB=)................................................................ 31
Read_Bonded_Devices (AT*AGBD?)......................................... 32
Read_Fixed_PIN (AT*AGFP?).................................................... 32
Write_Fixed_PIN (AT*AGFP=).................................................... 33
Read_Local_Name (AT*AGLN?) ................................................ 33
Write_Local_Name (AT*AGLN=) ................................................ 33
Read_Local_COD (AT*AGLC?).................................................. 34
Write_Local_COD (AT*AGLC=) .................................................. 35
Get_MasterSlaveRole (AT*AGGMSR=)...................................... 36
Change_MasterSlaveRole (AT*AGCMSR=)............................... 36
Read_MasterSlaveRole_Policy (AT*AGMSP?) .......................... 37
Write_MasterSlaveRole_Policy (AT*AGMSP=) .......................... 37
Get_RSSI (AT*AGRSS=) ............................................................ 38
11.3 Service Search Commands............................................................. 39
Service_Search (AT*ARSS=)...................................................... 39
11.4 Data Mode Commands.................................................................... 40
Data_Mode (AT*ADDM).............................................................. 40
Connect_To_Serial_Service_Data_Mode (AT*ADCP=) ............. 41
Close_Serial_Connection_Data_Mode (AT*ADCC=) ................. 42
Read_Default_Client_Profile (AT*ADDCP?)............................... 42
Write_Default_Client_Profile (AT*ADDCP=)............................... 42
Read_Default_Server_Profile (AT*ADDSP?).............................. 43
Write_Default_Server_Profile (AT*ADDSP=).............................. 43
Read_Max_No_Of_Remote_Peers (AT*ADMRP?).................... 44
Read_No_Of_Remote_Peers (AT*ADNRP?) ............................. 45
Write_No_Of_Remote_Peers (AT*ADNRP=) ............................. 45
Read_Default_Remote_Peer (AT*ADRDRP=) ........................... 45
Write_Default_Remote_Peer (AT*ADWDRP=)........................... 46
Read_Inactivity_Tick (AT*ADIT?)................................................ 47
Write_Inactivity_Tick (AT*ADIT=)................................................ 48
Read_Wireless_Multidrop_Configuration (AT*ADWM?)............. 48
Write_Wireless_Multidrop_Configuration (AT*ADWM=)............. 49
11.5 Informational Commands ................................................................ 50
Read_Local_BD_ADDR (AT*AILBA?) ........................................ 50
Read_Local_Version_Information (AT*AILVI?)........................... 50
11.6 Miscellaneous Commands .............................................................. 51
Read_RS232_Settings (AT*AMRS?).......................................... 51
Contents
6
Write_RS232_Settings (AT*AMRS=) ..........................................52
Read_Serial_Interface_Type (AT*AMSIT?) ................................52
Write_Serial_Interface_Type (AT*AMSIT=) ................................53
Read_Favorites (AT*ACF?).........................................................53
Add_Change_Favorite (AT*ACACF=).........................................54
Delete_Favorite (AT*ACDF=)......................................................54
Read_Allow_Configuration_Over_Bluetooth (AT*ACCB?) .........55
Write_Allow_Configuration_Over_Bluetooth (AT*ACCB=) .........55
Read_Controller_Power_Save_Mode (AT*AMPM?)...................56
Write_Controller_Power_Save_Mode (AT*AMPM=)...................56
Read_Max_Output_Power (AT*AMMP?)....................................57
Write_Max_Output_Power (AT*AMMP=)....................................57
Read_Esc_Sequence_Timing (AT*AMET?) ...............................58
Write_Esc_Sequence_Timing (AT*AMET=)................................59
Read_Button_Operation_Mode (AT*AMBOR=)..........................59
Write_Button_Operation_Mode (AT*AMBO=).............................60
Read_LED_Operation_Mode (AT*AMLO?) ................................60
Write_LED_Operation_Mode (AT*AMLO=).................................61
Store_Factory_Settings (AT*AMSF)............................................61
Read_Watchdog_Settings (AT*AMWS?)....................................62
Write_Watchdog_Settings (AT*AMWS=) ....................................63
Read_DTR_DSR_Settings (AT*AMDS?) ....................................63
Write_DTR_DSR_Settings (AT*AMDS=) ....................................64
Read_Link_Policy (AT*AMLP?)...................................................65
Write_Link_Policy (AT*AMLP=)...................................................65
11.7 Events 67
Serial_Connection_Data_Mode_Closed (*ADCCO) ...................67
12. Model Compatibility 68
Introduction
7
Chapter 1: Introduction 1.1: Related Documents
8
Chapter 1
Introduction
1.1 Related Documents
The Serial Port Adapter AT Commands document, this document, con-
tains a description of the AT commands supported in the Serial Port
Adapter. It also contains information on how to use the AT commands to
create Bluetooth applications.
The OEM Serial Port Adapter Electrical & Mechanical Datasheet con-
tains important information about the OEM Serial Port Adapter. Read this
document if you are using the OEM Serial Port Adapter.
1.1: Related Documents Chapter 2: Data Mode and AT Mode
9
Chapter 2
Data Mode and AT Mode
The Serial Port Adapter can be in two different modes AT mode and data mode1.
The Serial Port Adapter starts up in data mode and can be requested to move to
AT mode by sending an escape sequence. The default escape sequence consists of
three consecutive forward slash characters /. The escape sequence character can
be changed using the ATS2 command. Pressing the restore-button on the Serial
Port Adapter, when it is powered up, restores the default escape character.
The following criteria must be met for the Serial Port Adapter to interpret the se-
quence as a valid escape sequence:
Before the escape sequence there must be silence for 1 second. This time can
be changed using the AT*AMET command.
After the escape sequence there must be silence for 1 second. This time can be
changed using the AT*AMET command.
The entire escape sequence must be sent within 200 ms.
To move from AT mode to data mode, use the AT*ADDM command.
Transparent
data mode
AT mode
AT escape
sequence
AT*ADDM
1 Some serial port adapter models also support the ECI mode, which is not covered in this document.
1.1: Related Documents Chapter 3: Baud Rate
10
Chapter 3
Baud Rate
The Serial Port Adapter does not support auto baud rate. The baud rate is set using
the Write_RS232_Settings command.
The default RS232 settings are 57600 bits/s, 8 data bits, no parity, 1 stop bit, and
hardware flow control. Pressing the restore-button on the Serial Port Adapter,
when it is powered up, restores the default serial settings.
Chapter 4: Configuration and Operation 4.1: LED Indication
11
Chapter 4
Configuration and Operation
This chapter gives some guidelines on how to perform basic configuration and op-
eration.
There are several request packets that can be used to configure the Serial Port
Adapter. Many of these request packets take a boolean parameter called
<store_in_startup_database>. If this parameter is set to 1 the setting will be ap-
plied immediately and also when the Serial Port Adapter starts up in the next
power cycle. If this parameter is set to 0 the setting will be applied immediately but
it will not be applied when the Serial Port Adapter starts up in the next power cy-
cle.
Note that for some of the version 3 modules there is a constraint on some AT
commands, which means that the module must be restarted for the command to
take affect. For those commands the <store_in_startup_database> parameter must
always be 1.
Note that for applications that always configure the serial port adapter at startup,
it is not necessary to store settings in the startup database. It is intended for appli-
cations where the serial port adapter is configured once before installation.
4.1 LED Indication
The LED indicates what mode is currently active and what activity that is currently
in progress.
The following color indications are used.
Green
: The current mode is data mode and no connection attempt is in pro-
gress.
Orange
: The current mode is AT mode.
Purple
: A connection attempt is in progress.
Blue
: A connection is currently active.
Blue Blinking
: A connection is active and data is transmitted or received over
air.
Red Blinking
: Buffer overflow, parity or framing error detected on the UART.
4.2 Bluetooth Settings
A Bluetooth device can be in several different operation modes. The operation
mode determines whether or not a device can be connected to and whether or
not other devices performing searches can discover a device. Use the
Write_Discoverability_Mode and Write_Connectability_Mode commands to
set the operation mode.
All Bluetooth devices have a user-friendly name. Use the Write_Local_Name
command to set the local device name.
4.3: Searching for Other Bluetooth Devices Chapter 4: Configuration and Operation
12
All Bluetooth devices have a class-of-device indicator that can be discovered by
other devices when they are performing searches. Use the Write_Local_COD
command to set the class-of-device.
4.3 Searching for Other Bluetooth Devices
Two commands are available to search for other devices:
The Inquiry command returns the Bluetooth device address and the
class of device of all the devices in the vicinity that are in discoverable
mode.
The Device Discovery command returns the Bluetooth device address,
the class of device and the name of all the devices in the vicinity that are in
discoverable mode.
The Inquiry command is faster than the Device_Discovery command. A De-
vice_Discovery is an Inquiry followed by a Name_Discovery on each found
device.
4.4 Searching for Services
It is possible to search for services on remote devices. A service search is performed
using the Service_Search command.
4.5 Creating Serial Connections and Send-
ing Data
Serial connections are Bluetooth connections based on the Serial Port Profile, the
Dial-up Networking Profile and the LAN Access Profile2.
How to Select What Profile to Use
It is important that the same profile is used on both devices wanting to communi-
cate. If the remote device is not a Serial Port Adapter, refer to the documentation
of that device to determine what profile it uses or to find out how to select what
profile to use.
Client or Server
First decide if your device is supposed to act as a client (initiator of connections), a
server (acceptor of connections) or both.
Wireless Multidrop
The Wireless Multidrop feature allows the Serial Port Adapter to simultaneously
communicate with several devices even when it is in data mode. If Wireless Mul-
tidrop is used all data sent to the Serial Port Adapter via the serial interface will
be forwarded to all connected devices. All data received from any of the con-
nected devices will be forwarded on the serial interface in the order that the data
was received.
The Wireless Multidrop feature can be used if the Serial Port Adapter has been
configured as a server as well as if it has been configured as a client. When config-
ured as a server several devices are able to connect to your Serial Port Adapter and
2 Only supported in version 2 of the serial port adapter models.
4.6: Master/Slave Handling Chapter 4: Configuration and Operation
13
join the wireless multidrop network. If configured as a client you must tell the Se-
rial Port Adapter which devices to connect to.
Exactly how to configure for Wireless Multidrop see Connection Establishment
Server and Connection Establishment Client.
Connection Establishment Server
In AT mode, use the Write_Default_Server_Profile command to select what pro-
file to use when acting as a server.
If you want to use the Wireless Multidrop feature and allow several devices to
simultaneously connect to your device you must enable Wireless Multidrop using
the Write_Wireless_Multidrop_Configuration command. In addition, the Serial
Port Adapter must be configured to perform a master/slave switch every time a de-
vice connects to it. This is done using the Write_MasterSlaveRole_Policy com-
mand.
After configuring the Serial Port Adapter for server operation, move to data mode.
Connection Establishment Client
For clients there are two methods that can be used to create connections to a re-
mote device:
1. Establish the connection in AT mode using the Con-
nect_To_Serial_Service_Data_Mode command. Then move to data mode and
utilize the connection as a transparent data mode connection. It is possible to
utilize the Wireless Multidrop feature and connect to several devices. Note
that Wireless Multidrop must be enabled to be able to connect to more than
one device.
2. Configure the Serial Port Adapter in AT mode then move to data mode.
a. Select the number of devices to connect to using the
Write_No_Of_Remote_Peers command. Select 1 for point-to-point
operation and more than 1 for Wireless Multidrop operation. Note
that Wireless Multidrop must be enabled to be able to use a value
higher than 1. The maximum number of remote peers can be deter-
mined by calling the Read_Max_No_Of_Remote_Peers command.
b. Select what device(s) to communicate with using the
Write_Default_Remote_Peer command.
c. Then use the Write_Default_Client_Profile command to select what
profile to use when connecting to the selected default remote peer.
d. Finally move to data mode and send data. The Serial Port Adapter will
connect to the selected remote peer(s) using the selected profile ac-
cording to the connect scheme setting (connect on data, always con-
nected or connect on external signal).
Specify zero number of remote peers using the Write_No_Of_Remote_Peers
command if you do not want to act as a client.
4.6 Master/Slave Handling
When a device communicates with several other devices it is called the master. The
other devices are called slaves.
4.7: Bluetooth Security Chapter 4: Configuration and Operation
14
M SM
S
SS
A master can:
Setup a connection to another device.
Perform searches.
Accept connections from other devices.
A slave cannot:
Connect to another device.
Perform searches.
Accept connections from other devices.
There are a few settings and parameters that affect how the roles master and slave
are assigned to the devices communicating.
First, it is possible for a device to request to become the master when another de-
vice connects to it. This setting is called the master/slave role policy. Use the
Write_MasterSlaveRole_Policy command to set the policy to either:
0, the device will request to become the master every time another device
tries to connect.
1, the device will become the slave every time another device tries to con-
nect.
Second, when connecting to another device using the Con-
nect_To_Serial_Service command the parameter <must_be_master> indicates
whether or not the connecting device allows the server to become the master of
the connection.
NOTE: If <must_be_master> is 1 and the server has set master/slave role policy to 0
(become master) the connection will
not
be established.
If you do not specifically need to become the master the <must_be_master> pa-
rameter should be set to 0 to allow the server to select which role to take.
4.7 Bluetooth Security
Bluetooth has support for security. The Bluetooth security is based on authentica-
tion during connection establishment and encryption of sent and received data.
Security Modes
A Bluetooth device can be in two different security modes, security enabled (au-
thentication and encryption turned on) and security disabled (authentication and
encryption turned off). If at least one of the two devices wanting to communicate
has security enabled, security will be used. Use the Write_Security_Mode com-
mand to set the security mode for the device.
Only the highest security level, security level 3 (link level security) and not security
level 2 (service level), is supported.
4.7: Bluetooth Security Chapter 4: Configuration and Operation
15
Bonding and Pairing
To be able to communicate if security has been enabled, bonding has to be per-
formed. The bonding procedure creates a link key, valid between two devices,
which is used during the authentication procedure. Once bonded the two devices
can establish connections with each other using security enabled.
During bonding both devices must be in pairable mode (able to accept bonding).
Use the Write_Pairing_Mode command to set the device(s) in pairable mode.
During bonding a pin code is used. Use the Write_Fixed_PIN command to set
the PIN code to use.
To perform bonding use one of the following methods:
Create a connection. If authentication or encryption is turned on, on ei-
ther device, bonding will be performed automatically.
On one device use the Bond command. Not supported in all versions of
the serial port adapter.
It is possible for the Serial Port Adapter to store link keys for several devices at the
same time. Use the Read_Bonded_Devices command to get a list of the cur-
rently bonded devices.
It is also possible to remove a device from the list of bonded devices. To do this,
use the Un_Bond command.
5.1: How to Use the Stop Mode Feature Chapter 5: Power Save Modes
16
Chapter 5
Power Save Modes
The Serial Port Adapter is optimized to consume as little power as possible.
However, the deepest power save mode, called stop mode, is not turned on by de-
fault. Instead an AT command (AT*AMPM) is available to allow the host system to
turn on the stop mode feature.
When the Serial Port Adapter is in stop mode:
It can accept incoming connections over Bluetooth.
The host system cannot send data to the Serial Port Adapter.
The Serial Port Adapter will only enter stop mode if:
The stop mode feature has been turned on using the AT*AMPM AT
command
The DSR pin on the Serial Port Adapter is not active.
If there is no Bluetooth connection.
If the "Always connected" feature has not been turned on.
The Serial Port Adapter will exit mode if:
A Bluetooth connection is established from a remote device.
The host system moves the DSR pin from non-active to active.
Note: The Serial Port Adapter needs 10 ms to leave stop mode. As a con-
sequence the host system must not send data to the Serial Port Adapter
until 10 ms after the host system has activated the DSR pin.
5.1 How to Use the Stop Mode Feature
If your device only acts as a server (accepts incoming connections), the stop mode
feature can be used without the host having to toggle the DSR pin before sending
data to the Serial Port Adapter. The reason for this is that while in stop mode, the
Serial Port Adapter can accept incoming connections. In addition, when the Blue-
tooth connection is established the Serial Port Adapter automatically leaves stop
mode and only returns to stop mode after the Bluetooth connection has been dis-
connected. However, in this scenario, it is important that the host system keeps
the DSR pin in the non-active state at all times. Otherwise the Serial Port Adapter
will not enter stop mode at all.
If your device acts as a client (establishes connections) or client and server, the stop
mode feature cannot be used without the use of the DSR pin. The reason for this is
that once in stop mode, the Serial Port Adapter has to be told to leave stop mode
before the host system can send data to the Serial Port Adapter. When the host
system has nothing to send to the Serial Port Adapter, it may set the DSR pin to
the non-active state to tell the Serial Port Adapter that it may enter stop mode if it
is able to.
6.1: Serial Settings Chapter 6: Restoring Default Configuration
17
Chapter 6
Restoring Default Configuration
6.1 Serial Settings
In some situations it is necessary to restore some settings to their default values.
The following settings can be restored using the procedure described below:
Serial settings: 57600 baud, 8 data bits, no parity, 1 stop bit, hardware flow
control.
Serial interface type: RS232.
AT escape sequence: ///.
Escape sequence timing: 1000 ms of no data transmission required before
and after the escape sequence for the escape sequence to be valid.
Procedure:
1. Remove power from the Serial Port Adapter.
2. Press and hold the default settings button on the Serial Port Adapter.
3. Apply power to the Serial Port Adapter.
When powered up the default settings will be stored in the Serial Port Adapter.
6.2 Factory Settings
The factory setting is the configuration of the serial port adapter when it is pro-
duced. For some modules it may be possible to set a new factory setting configura-
tion by using the Store_Factory_Settings command.
To restore the factory setting configuration use the AT&F command or perform
the following procedure. The latter only applies to version 3 Serial Port Adapters.
1. Remove power from the OEM Serial Port Adapter.
2. Press and hold both the Default settings and Function buttons on the OEM Se-
rial Port Adapter.
4. Apply power to the OEM Serial Port Adapter.
Note that this command should not be used at every startup to restore the factory
settings. Instead it is better not to write to the startup database at all.
6.2: Factory Settings Chapter 7: AT Commands Over Bluetooth
18
Chapter 7
AT Commands Over Bluetooth
It is possible to configure and control a remote Serial Port Adapter via Bluetooth
using AT commands.
Criteria for using AT commands over Bluetooth:
A Bluetooth connection to the remote device (the device to configure) must ex-
ist. The Bluetooth connection can e.g. be established using another Serial Port
Adapter, a device with a PC-card/compact flash or a device with embedded
Bluetooth support.
The remote Serial Port Adapter must have turned on the support for configura-
tion over Bluetooth, for more information see the
Write_Allow_Configuration_Over_Bluetooth command.
Once the connection has been established, the escape sequence must be sent
over the Bluetooth connection to the remote Serial Port Adapter to move it
into AT mode.
oThe same escape sequence rules apply to AT over Bluetooth as for AT
over cable, for more information see the section about Data Mode and
AT Mode.
oNote that the same escape sequence is used for cable and Bluetooth.
Therefore, if you are using two Serial Port Adapters one of the Serial
Port Adapters must have its escape sequence changed using the ATS2
command. This is to keep the first Serial Port Adapter to enter AT
mode instead of the remote Serial Port Adapter.
6.2: Factory Settings Chapter 8: Optimization
19
Chapter 8
Optimization
On some versions of the serial port adapter there are some limited optimization
support regarding throughput, response time and power consumption.
Typically consider the following settings for the Write_Link_Policy command:
High throughput
: Link policy 1 and 2 depending on which side is transmit-
ting and receiving. Note that this will only be useful to improve perform-
ance in one direction.
Short Response times
: Link policy 3. Note that this will increase power
consumption. Link policy 4 may also be an option.
Low Power Consumption
: Link policy 6-8. A longer sniff period will de-
crease power consumption more but provide longer response times. To
get even better results combine link policy 6-8 with stop mode.
Note that there is no guarantee that the configuration will improve performance
for a specific case. There may, for example, be some negotiation with the remote
device that forces some other parameters than the selected ones.
For best interoperability it is recommended to use the default link policy. For other
configurations make sure to test the specific application.
6.2: Factory Settings Chapter 9: Version 3 vs. Version 2
20
Chapter 9
Version 3 vs. Version 2
If you are migrating from using the version 2 (second generation) of Serial Port
Adapters from connectBlue to version 3 there are some AT commands/events that
have been changed, added or removed. Each AT command description will include
a table to clarify what the differences are (if any) between different models.
Specifically some version 3 models (cB-OEMSPA311, cB-OEMSPA331, cB-
OEMSPA312, cB-OEMSPA332) do not support multipoint connections. Hence wire-
less multidrop is not supported.
10.1: Command Line Format Chapter 10: Syntax
21
Chapter 10
Syntax
10.1 Command Line Format
Each command line sent from the DTE to the DCE is made up of a prefix, body and
terminator. As prefix for the Serial Port Adapter AT commands, only AT (ASCII
065, 084) and at (ASCII 097, 116) can be used. There is no distinction between
upper and lower case characters. The body is a string of characters in the range
ASCII 032-255. Control characters other than <CR> (carriage return; ASCII 013)
and <BS> (back space; ASCII 008) in a command line are ignored. The terminator
is <CR>.
Commands denoted with a * character are extended AT commands, i.e. Serial
Port Adapter specific AT commands.
S-registers are not used and not supported, except for the S2 register.
Multiple commands in the same command line are not supported. Each command
has to be terminated by a <CR> before a new command can be sent. A command
must not be larger than 300 characters.
A command can either be:
Read commands without parameters:
AT<command>?<CR>
Write commands without parameters:
AT<command><CR>
Read and write commands with parameters:
AT<command>=<parameter1>, parameter2>, <parameterN><CR>
Responses are sent back to the host and can be any of the following:
Successful final message:
<CR><LF>OK<CR><LF>
Successful intermediate/final message with parameters follows an OK message
in some commands. In these cases the OK message works as a confirm mes-
sage only.
<CR><LF><result_response>:<parameter1>, parameter2>, <parameterN>
Error message:
<CR><LF>ERROR<CR><LF>
10.2 Data Types
The definition of each command specifies the data types used for values associated
with the command.
There are four data types:
String
Integer
Enumerator
Bluetooth Device Address
10.2: Data Types Chapter 10: Syntax
22
String
A string shall consist of a sequence of displayable characters from the ISO 8859-1
(8-bit ASCII) character set, except for characters \ and " and characters below
32 (space). A string constant shall be delimited by two double-qoute (") charac-
ters, e.g. Donald Duck. If the double-quote character (") is to be used within
a string, e.g. "My friend "Bono" is a singer", they have to be represented as
\22. If the back-slash character (\) is to be used within a string constant, it has
to be represented as \5C. An empty string is represented by two adjacent delim-
iters, "".
Integer
An integer value consists of a sequence of characters all in the range {0..9}.
Numeric constants are expressed in decimal format only.
Enumerator
An enumerator value is actually an integer, where all its possible values are speci-
fied in each case. Only the defined values are accepted for the command in ques-
tion.
Bd_Addr
This type is used to represent the Bluetooth Device Address. The type is composed
of six fields, each representing a hexadecimal value using two characters. For ex-
ample, the Bluetooth Device Address 0x112233AABBCC is represented as
112233AABBCC or 112233aabbcc. Note that the Bluetooth Device Address is not
delimited with by two double-qoute (") characters.
11.1: Standard AT Commands Chapter 11: AT Commands Reference
23
Chapter 11
AT Commands Reference
11.1 Standard AT Commands
Command AT
AT Command Description
AT<CR> Attention command determining the presence of a DCE, i.e. the
Serial Port Adapter.
Responses Description
<CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Command AT*
AT Command Description
AT*<CR> Lists the supported AT commands.
Responses Description
<CR><LF><command> This response is sent to the host for every sup-
ported command.
<CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Command ATZ
AT Command Description
ATZ<CR> Does nothing.
Responses Description
<CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Model Constraint
cB
-
OEMSPA311
Not supported.
11.1: Standard AT Commands Chapter 11: AT Commands Reference
24
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Command AT&F
AT Command Description
AT&F<CR> If the command Store_Factory_Settings has been used to fill the
factory settings database then this command will restore all the
settings to the factory settings.
If the command Store_Factory_Settings has not been used to fill
the factory settings database then this command will do nothing.
Note that this command should not be used at every startup to
restore the factory settings. Instead it is better not to write to the
startup database at all.
Responses Description
<CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
The Store_Factory_Settings are not available. Instead, the
command will restore production settings. After the AT&F com-
mand has been sent, the module must be reset for the restored
settings to take affect.
Command ATS2
AT Command Description
ATS2=<esc_char><CR> Changes the escape character to esc_char.
Command Pa-
rameters Type Description
esc_char integer esc_char is the ASCII value of the new escape
character. E.g. 47 equals ‘/’. The default value is
‘/’.
Note that the escape sequence will be “///”.
Hence, the character is used three times.
Responses Description
<CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Command ATE
AT Command Description
ATE<echo><CR>
Set whether or not the Serial Port Adapter shall echo incoming
11.2: GAP Commands Chapter 11: AT Commands Reference
25
characters.
Command Pa-
rameters Type Description
echo integer 0: Incoming characters will not be echoed.
1: Incoming characters will be echoed.
Responses Description
<CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
11.2 GAP Commands
Read_Discoverability_Mode (AT*AGDM?)
AT Command Description
AT*AGDM?<CR> This command reads the current GAP discoverability mode.
Responses Description
<CR><LF>*AGDM:<discoverability_mode
><CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Response Pa-
rameters Type Value
discoverability_mode enumerator 1: GAP non-discoverable mode
2: GAP limited discoverable mode
3: GAP general discoverable mode
(default value)
Write_Discoverability_Mode (AT*AGDM=)
AT Command Description
AT*AGDM=<discoverability_mode>,
<store_in_startup_database><CR> This command writes the current GAP discoverability
mode.
Command Pa-
rameters Type Value
discoverability_mode enumerator 1: GAP non-discoverable mode
2: GAP limited discoverable mode
3: GAP general discoverable mode
(default value)
11.2: GAP Commands Chapter 11: AT Commands Reference
26
store_in_startup_database enumerator 0: The setting will only be valid for the
current power cycle.
1: The Serial Port Adapter will remember
the setting between power cycles. The
settings database in the Serial Port
Adapter will be updated.
Responses Description
<CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Limited discoverability mode not supported.
Read_Connectability_Mode (AT*AGCM?)
AT Command Description
AT*AGCM?<CR> This command reads the current GAP connectability
mode.
Responses Description
<CR><LF>*AGCM:<connectability_mode><CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Result Pa-
rameters Type Value
connectablilty_mode enumerator 1: GAP non-connectable mode
2: GAP connectable mode (default value)
Write_Connectability_Mode (AT*AGCM=)
AT Command Description
AT*AGCM=<connectability_mode>,
<store_in_startup_database><CR> Writes the GAP connectability mode.
Command Pa-
rameters Type Value
connectablilty_mode enumerator 1: GAP non-connectable mode
2: GAP connectable mode (default value)
11.2: GAP Commands Chapter 11: AT Commands Reference
27
store_in_startup_database enumerator 0: The setting will only be valid for the current
power cycle.
1: The Serial Port Adapter will remember the
setting between power cycles. The settings
database in the Serial Port Adapter will be
updated.
Responses Description
<CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Read_Pairing_Mode (AT*AGPM?)
AT Command Description
AT*AGPM?<CR> Reads the pairing mode.
Responses Description
<CR><LF>*AGPM:<pairing_mode><CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Result Pa-
rameters Type Value
pairing_mode enumerator 1: GAP non-pairing mode
2: GAP pairing mode (default value)
Write_Pairing_Mode (AT*AGPM=)
AT Command Description
AT*AGPM=<pairing_mode>,<store_in_startup_database><CR> Writes the GAP pairing
mode.
Command Pa-
rameters Type Value
pairing_mode enumerator 1: GAP non-pairable mode.
2: GAP pairable mode (default value).
store_in_startup_database enumerator 0: The setting will only be valid for the current
power cycle.
1: The Serial Port Adapter will remember the
setting between power cycles. The settings
database in the Serial Port Adapter will be
updated.
Responses Description
<CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
11.2: GAP Commands Chapter 11: AT Commands Reference
28
Read_Security_Mode (AT*AGSM?)
AT Command Description
AT*AGSM?<CR> Reads the GAP security mode.
Responses Description
<CR><LF>*AGSM:<security_mode><CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Result Pa-
rameters Type Value
security_mode enumerator 1: Link level authentication and encryption dis-
abled (GAP security mode 1 with encryption
disabled). (Default value)
2: Link level authentication and encryption en-
abled (GAP security mode 3 with encryption
enabled).
Write_Security_Mode (AT*AGSM=)
AT Command Description
AT*AGSM=<security_mode>,<store_in_startup_database><CR> Writes the GAP security
mode.
Command
Parameters Type Value
security_mode enumerator 1: Link level authentication and encryption dis-
abled (GAP security mode 1 with encryption
disabled). (Default value)
2: Link level authentication and encryption en-
abled (GAP security mode 3 with encryption
enabled).
store_in_startup_database enumerator 0: The setting will only be valid for the current
power cycle.
1: The Serial Port Adapter will remember the
setting between power cycles. The settings
database in the Serial Port Adapter will be up-
dated.
Responses Description
<CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Name_Discovery (AT*AGND=)
AT Command Description
AT*AGND=<bd_addr><CR>
Retrieves the device name of a remote device given its
11.2: GAP Commands Chapter 11: AT Commands Reference
29
Bluetooth device address.
Command
Parameters Type Value
bd_addr Bd_Addr Bluetooth device address of the device from which
to retrieve the name.
Responses Description
<CR><LF>*AGND:<device_name><CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Response
Parameters Type Value
device_name string Null terminated string of maximum 240 characters
(8-bit ASCII).
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Device names longer than 31 bytes will be truncated.
Device_Discovery (AT*AGDD=)
AT Command Description
AT*AGDD=<inquiry_Type>,<inquiry_length><CR> Performs device discovery.
Command
Parameters Type Description
inquiry_type enumerator 1: Limited inquiry
2: General inquiry
inquiry_length integer Maximum amount of time specified before the
inquiry is halted.
Range: 8-48
Time = inquiry_length*1.28 seconds
Range in seconds: 10.24-61.44
Responses Description
<CR><LF>*AGDD: <no_of_devices><CR><LF>OK<CR><LF> Successful response
*AGDDE:<bd_addr>, <cod>, <device_name_valid>, <de-
vice_name><CR><LF> This response is sent for
every found device.
<CR><LF>ERROR<CR><LF> Error message.
11.2: GAP Commands Chapter 11: AT Commands Reference
30
Response
Parameters Type Value
no_of_devices integer Value in range {0..255}.
Number of devices discovered during the inquiry
procedure.
bd_addr Bd_Addr Bluetooth device address of a discovered device.
cod integer See Read_Local_COD command.
device_name_valid enumerator 1: device_Name parameter valid.
0: Device was discovered, but its name could not
be retrieved. device_name is parameter invalid and
should be ignored.
device_name string Name of discovered device. ASCII represented
string of maximum 240 bytes.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Not supported. Instead use the Inquiry and Name_Discovery
commands.
Inquiry (AT*AGI=)
AT Command Description
AT*AGI=<inquiry_Type>,<inquiry_length>,
<max_no_of_devices_to_find><CR> Performs an inquiry procedure to find
any discoverable devices in the vicin-
ity.
Command Pa-
rameters Type Description
inquiry_type enumerator 1: Limited inquiry
2: General inquiry
inquiry_length integer Maximum amount of time specified before the
inquiry is halted.
Range: 1-48
Time = inquiry_length*1.28 seconds
Range in seconds: 1.28-61.44
max_no_of_devices_to_find integer 0: No limitation on the number of devices to find.
1-255: Maximum number of devices to find.
Responses Description
<CR><LF>*AGI:<bd_addr>,<cod> This response is sent for every found device.
<CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error message.
Response
Parameters Type Value
Bd_addr Bd_Addr Bluetooth device address of a found device.
cod integer See Read_Local_COD command.
11.2: GAP Commands Chapter 11: AT Commands Reference
31
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
If more than 20 devices are found, then devices may be listed
several times.
Bond (AT*AGB=)
AT Command Description
AT*AGB=<bd_addr><CR> Performs a GAP bond procedure with another Blue-
tooth device.
During the bonding procedure the fixed PIN code is
used, see the Write_Fixed_PIN and Read_Fixed_PIN
commands. Note that to be able to perform bonding
the remote device must be in pairable mode.
Command
Parameters Type Value
bd_addr Bd_Addr Bluetooth device address of the device to bond
with.
Responses Description
<CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Not supported. Bonding is automatic when connecting if either of
the sides enforces security. The link keys are stored in a FIFO of
size five.
Un_Bond (AT*AGUB=)
AT Command Description
AT*AGUB=<bd_addr><CR> This command un-bonds a previously bonded device.
Command
Parameters Type Value
bd_addr Bd_Addr Bluetooth device address of the device subject to
un-bond.
Responses Description
11.2: GAP Commands Chapter 11: AT Commands Reference
32
<CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Read_Bonded_Devices (AT*AGBD?)
AT Command Description
AT*AGBD?<CR> Read the bonded devices.
Responses Description
<CR><LF>*AGBD:<no_of_devices><CR><LF>OK<CR><LF> Successful response
*AGBDE:<bd_addr>,<device_name_valid>,<device_name>
<CR><LF> This response is sent for
every found device.
<CR><LF>ERROR<CR><LF> Error message.
Response
Parameters Type Value
no_of_bonded_devices integer Number of bonded devices.
bd_addr Bd_Addr Bluetooth device address of the device from which
to retrieve the name.
device_name_valid enumerator 0: device_Name parameter valid.
1: Device is bonded but its name is not available.
Device_Name is parameter invalid.
device_name string Name of discovered device. Null terminated ASCII
represented string.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
The command will always return an empty string as device name
with the device_name_valid parameter always set to 1.
Read_Fixed_PIN (AT*AGFP?)
AT Command Description
AT*AGFP?<CR> Read the fixed PIN code used by the Serial Port
Adapter during bond and pairing.
Responses Description
<CR><LF>*AGFP:<pin_code><CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Response
Parameters Type Value
11.2: GAP Commands Chapter 11: AT Commands Reference
33
pin_code string The PIN code is a string of one to sixteen al-
phanumerical characters.
It is recommended to use a pin code of at least
eight characters of mixed type, e.g. “12w35tg7”.
The default value is “0”.
Write_Fixed_PIN (AT*AGFP=)
AT Command Description
AT*AGFP=<pin_code>,
<store_in_startup_database><CR> Writes the fixed PIN code used by the Serial Port
Adapter during bond.
Command
Parameters Type Value
pin_code string The PIN code is a string of one to sixteen alpha-
numerical characters.
It is recommended to use a pin code of at least
eight characters of mixed type, e.g. “12w35tg7”.
The default value is “0”.
store_in_startup_database enumerator 0: The setting will only be valid for the current
power cycle.
1: The Serial Port Adapter will remember the
setting between power cycles. The settings
database in the Serial Port Adapter will be up-
dated.
Responses Description
<CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Read_Local_Name (AT*AGLN?)
AT Command Description
AT*AGLN?<CR> Reads the local Bluetooth device name.
Responses Description
<CR><LF>*AGLN:<device_name><CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Response
Parameters Type Value
device_name string Max 240 characters.
The default name is “Bluetooth Device”.
Write_Local_Name (AT*AGLN=)
AT Command Description
AT*AGLN=<device_name>, <store_in_startup_database><CR> Wri
tes
t
h
e
l
oca
l Bl
uetoot
h
11.2: GAP Commands Chapter 11: AT Commands Reference
34
device name.
Command Pa-
rameters Type Value
device_name string Max 240 characters.
The default name is “Bluetooth Device”.
store_in_startup_database enumerator 0: The setting will only be valid for the current
power cycle.
1: The Serial Port Adapter will remember the
setting between power cycles. The settings
database in the Serial Port Adapter will be
updated.
Responses Description
<CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
The name is limited to a maximum of 31 characters.
Read_Local_COD (AT*AGLC?)
AT Command Description
AT*AGLC?<CR> Reads the Local Class Of Device code.
Responses Description
<CR><LF>*AGLC:<cod><CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Response
Parameters Type Value
11.2: GAP Commands Chapter 11: AT Commands Reference
35
cod integer Valid values for this parameter are specified in
the Bluetooth Assigned Numbers Document,
www.bluetooth.com. The parameter has been
divided into three segments, a service class
segment, a major device class segment and a
minor device class segment (bits 2-7).
Extract from the Bluetooth Assigned Numbers
Document:
Service class (bit mask, bits 13-23):
Bit 16: Positioning (Location identification)
Bit 17: Networking (LAN, Ad hoc, etc)
Bit 18: Rendering (Printing, Speaker, etc)
Bit 19: Capturing (Scanner, Microphone, etc)
Bit 20: Object Transfer (v-Inbox, v-Folder, etc)
Bit 21: Audio (Speaker, Microphone, Headset
service, etc)
Bit 22: Telephony (Cordless telephony, Modem,
Headset service)
Bit 23: Information (WEB-server, WAP-server,
etc)
Major device class (number, bits 12-8):
00000: Miscellaneous
00001: Computer (desktop, notebook, PDA, etc)
00010: Phone (cellular, cordless, modem, etc)
00011: LAN/Network Access point
00100: Audio/Video (headset, speaker, stereo,
video display, VCR)
00101: Peripheral (mouse, joystick, keyboards)
00110: Imaging (printing, scanner, camera, etc)
11111: Uncategorized, specific device code not
specified
For the minor device class field please refer to
[1].
The default value is 0.
Write_Local_COD (AT*AGLC=)
AT Command Description
AT*AGLC=<cod>, <store_in_startup_database><CR> Writes the Local Class Of Device
code.
Command
Parameters Type Value
cod integer See Read_Local_COD command.
store_in_startup_database enumerator 0: The setting will only be valid for the current
power cycle.
1: The Serial Port Adapter will remember the
setting between power cycles. The settings
database in the Serial Port Adapter will be
updated.
Responses Description
<CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
11.2: GAP Commands Chapter 11: AT Commands Reference
36
Get_MasterSlaveRole (AT*AGGMSR=)
AT Command Description
AT*AGGMSR=<bd_addr><CR> Read the local master-slave role.
Returns the role of the Serial Port Adapter, master or
slave, for the connection between the Serial Port
Adapter and the remote device identified by the
‘bd_addr’ parameter.
Command
Parameters Type Value
bd_addr Bd_Addr Identifies a device that the Serial Port Adapter is
currently communicating with.
Responses Description
<CR><LF>*AGGMSR:<role><CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Response
Parameters Type Value
role enumerator 0: Slave
1: Master
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Not supported. The module always allows a master slave switch
if requested by the remote side.
Change_MasterSlaveRole (AT*AGCMSR=)
AT Command Description
AT*AGCMSR=<bd_addr>,<role><CR> Changes the master-slave role.
Changes the role of the Serial Port Adapter, master or
slave, for the connection between the Serial Port
Adapter and the remote device identified by the
‘bd_addr’ parameter.
Note that the remote device does not have to accept
the master/slave switch.
Command
Parameters Type Value
bd_addr Bd_Addr Identifies a device that the Serial Port
Adapter is currently communicating with.
The role will be changed on the connec-
tion to this device.
role enumerator 0: Slave
1: Master
11.2: GAP Commands Chapter 11: AT Commands Reference
37
Responses Description
<CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Not supported. The module always allows a master slave switch
if requested by the remote side.
Read_MasterSlaveRole_Policy (AT*AGMSP?)
AT Command Description
AT*AGMSP?<CR> Reads the role policy of the device.
Responses Description
<CR><LF>*AGMSP:<role_policy><CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Response
Parameters Type Value
role_policy enumerator 0: Always attempt to become master on incoming
connections.
1: Always let the connecting device select mas-
ter/slave role on incoming connections (default
value).
Write_MasterSlaveRole_Policy (AT*AGMSP=)
AT Command Description
AT*AGMSP=<role_policy>,<store_in_startup_database><CR> Writes the role policy of the
device.
Command Pa-
rameters Type Value
role_policy enumerator 0: Always attempt to become master on incom-
ing connections.
1: Always let the connecting device select
master/slave role on incoming connections
(default value).
store_in_startup_database enumerator 0: The setting will only be valid for the current
power cycle.
1: The Serial Port Adapter will remember the
setting between power cycles. The settings
database in the Serial Port Adapter will be
updated.
11.2: GAP Commands Chapter 11: AT Commands Reference
38
Responses Description
<CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Not supported. The module always allows a master slave switch
if requested by the remote side.
Get_RSSI (AT*AGRSS=)
AT Command Description
AT*AGRSS=<bd_addr><CR> This request returns the current received signal
strength, RSSI, for the connection between the ECI
Controller and the remote device identified by the
‘bd_addr’ parameter.
Note that this command can only be used on an exist-
ing connection that has been established using the
Connect_To_Serial_Service_Data_Mode command
and only while still in AT mode.
Command
Parameters Type Value
bd_addr Bd_Addr Identifies a device that the Serial Port Adapter is
currently communicating with.
Responses Description
<CR><LF>*AGRSS:<rssi><CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Response
Parameters Type Value
rssi integer < 128: The received signal strength is
128-RSSI dB below the optimal signal
range.
128: The received signal strength is
within the optimal signal range.
>128: The received signal strength is
RSSI-128 dB above the optimal signal
range.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB
-
OEMSPA312
Not supported.
11.3: Service Search Commands Chapter 11: AT Commands Reference
39
cB-OEMSPA332
11.3 Service Search Commands
Service_Search (AT*ARSS=)
AT Command Description
AT*ARSS=<bd_addr>,<role_and_profile>,
<max_nbr_of_results><CR> Search for services on a remote device.
Command
Parameters Type Value
bd_addr Bd_Addr Bluetooth device address of the device on
which to search for services.
role_and_profile enumerator 0: DevB role, Serial Port Profile
1: Gateway role, Dial-Up Networking Profile
2: LAN Access Point role, LAN Access Profile
max_nbr_of_results integer The maximum number of services to be
collected.
Responses Description
<CR><LF>*ARSS:<matching_service_records><CR
><LF>OK<LR><CR> Successful response
*ARSRSP:<bd_addr>, <rfcomm_server_chan>, <
service_name_valid >, <service_name><CR><LF> This response is the result of a device B
serial port profile service search.
*ARSRDUN:<bd_addr>, <rfcomm_server_chan>,
<service_name_valid >, <service_name>, <au-
dio_feedback_support_valid>, <au-
dio_feedback_support><CR><LF>
This response is the result of a GW dial-
up networking profile service search.
*ARSRLAN:<bd_addr>, <rfcomm_server_chan>, <
service_name_valid>, <service_name>, <ser-
vice_description_valid>, <service_description>,
<service_availability_valid> <service_availability>,
<ip_subnet_valid>, <ip_subnet><CR><LF>
This response is the result of a LAP LAN
access profile service search.
<CR><LF>ERROR<CR><LF> Error message.
Response Pa-
rameters Type Value
bd_addr Bd_Addr Bluetooth device address of the device on
which to search for services.
matching_service_records integer The number of matching service records.
Range 0 to 255.
rfcomm_server_chan integer RFCOMM server channel number on
which this service can be found. It is used
when connecting to a profile. Range 1 to
30.
service_name_valid enumerator 0: The service_name parameter could not
be retrieved from the remote device and
the value is not valid.
1: The service_name parameter could be
retrieved from the remote device and the
value is valid.
11.4: Data Mode Commands Chapter 11: AT Commands Reference
40
service_name string Service name.
audio_feedback_support_valid enumerator 0: The audio_feedback_support parame-
ter could not be retrieved from the remote
device and the value is not valid.
1: The audio_feedback_support parame-
ter could be retrieved from the remote
device and the value is valid.
audio_feedback_support enumerator 0: No, device does not support audio
feedback.
1: Yes, device supports audio feedback.
service_description_valid enumerator 0: The service_description parameter
could not be retrieved from the remote
device and the value is not valid.
1: The service_description parameter
could be retrieved from the remote device
and the value is valid.
service_description string Manufacturer description of the services a
product can provide.
service_ availability_valid enumerator 0: The service_availability parameter
could not be retrieved from the remote
device and the value is not valid.
1: The service_availability parameter
could be retrieved from the remote device
and the value is valid.
service_availability integer The service availability parameter avail-
able in the LAN Access Profile service
record.
Ip_subnet_valid enumerator 0: The Ip_subnet parameter could not be
retrieved from the remote device and the
value is not valid.
1: The Ip_subnet parameter could be
retrieved from the remote device and the
value is valid.
Ip_subnet string IP subnet mask to reach the device on the
LAN.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Only supports serial port and dial-up networking profiles and not
LAN access profile.
11.4 Data Mode Commands
Data_Mode (AT*ADDM)
AT Command Description
AT*ADDM<CR> Request the Serial Port Adapter to move to data mode. After a
successful response the Serial Port Adapter will leave AT-mode
and enter data mode.
Responses Description
<CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
11.4: Data Mode Commands Chapter 11: AT Commands Reference
41
Connect_To_Serial_Service_Data_Mode (AT*ADCP=)
AT Command Description
AT*ADCP=<bd_addr>, <role_and_profile>,
<rfcomm_server_channel>,
<must_be_master><CR>
Connect to a serial service enabled on a
remote device. This request is used to
connect to profiles based on the Serial
Port Profile.
The connection shall be used in data
mode.
When the host connects to a service on a
remote device it implicitly registers to
receive the Se-
rial_Connection_Data_Mode_Closed
event.
Command
Parameters Type Value
bd_addr Bd_Addr Bluetooth device address of the device to
connect to.
role_and_profile enumerator 0: DevB role, Serial Port Profile
1: Gateway role, Dial-Up Networking Profile
2: LAN Access Point role, LAN Access Profile
rfcomm_server_chan enumerator RFCOMM server channel number on which this
service can be found.
0: Service search will be performed
automatically and the first available
<role_and_profile> will be connected.
1-30: RFCOMM server channel number.
This server channel number can be retrieved
using a service search operation.
31-255: Invalid values.
must_be_master enumerator 0: The remote device may choose to become
master or slave.
1: This device must be master of the new
connection.
Responses Description
<CR><LF>*ADCP:<connection_handle><CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Response
Parameters Type Value
connection_handle integer The connection handle identifies the connection.
The connection handle is used when closing the
connection.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Only supports serial port and dial-up networking profiles and not
LAN access profile.
11.4: Data Mode Commands Chapter 11: AT Commands Reference
42
Close_Serial_Connection_Data_Mode (AT*ADCC=)
AT Command Description
AT*ADCC=<connection_handle><CR> Close an existing data mode connection.
Command
Parameters Type Value
connection_handle integer The connection handle identifies the connection.
Responses Description
<CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Read_Default_Client_Profile (AT*ADDCP?)
AT Command Description
AT*ADDCP?<CR> This command reads the default client profile. The default client
profile is the profile that the Serial Port Adapter uses when it
establishes a connection, in data mode, to the default remote
peer(s).
Responses Description
<CR><LF>*ADDCP:<role_and_profile><CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Response
Parameters Type Value
role_and_profile enumerator 0: DevB role, Serial Port Profile
1: Gateway role, Dial-Up Networking Profile
2: LAN Access Point role, LAN Access Profile
255: No profile (default value)
Write_Default_Client_Profile (AT*ADDCP=)
AT Command Description
AT*ADDCP=<role_and_profile>,
<store_in_startup_database><CR> This command reads the default client profile. The de-
fault client profile is the profile that the Serial Port
Adapter uses when it establishes a connection, in data
mode, to the default remote peer(s).
Command Pa-
rameters Type Value
role_and_profile enumerator 0: DevB role, Serial Port Profile
1: Gateway role, Dial-Up Networking Profile
2: LAN Access Point role, LAN Access Profile
255: No profile (default value)
11.4: Data Mode Commands Chapter 11: AT Commands Reference
43
store_in_startup_database enumerator 0: The setting will only be valid for the current
power cycle.
1: The Serial Port Adapter will remember the
setting between power cycles. The settings
database in the Serial Port Adapter will be
updated.
Responses Description
<CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
The LAN access profile is not supported.
Read_Default_Server_Profile (AT*ADDSP?)
AT Command Description
AT*ADDSP?<CR> This command reads the default server profile. The default server
profile is the profile that other devices can connect to when the
Serial Port Adapter is in data mode. The default server profile is
activated when the Serial Port Adapter is moved to data mode if
no connection exists. The default server profile is deactivated
when the Serial Port Adapter is moved from data mode to AT
mode.
Responses Description
<CR><LF>*ADDSP:<role_and_profile><CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Response
Parameters Type Value
role_and_profile enumerator 0: DevB role, Serial Port Profile (default value)
1: Gateway role, Dial-Up Networking Profile
2: LAN Access Point role, LAN Access Profile
255: No profile
Write_Default_Server_Profile (AT*ADDSP=)
AT Command Description
AT*ADDSP=<role_and_profile>,
<store_in_startup_database><CR> This command writes the default server profile. The
default server profile is the profile that other devices
can connect to when the Serial Port Adapter is in data
mode. The default server profile is activated when the
Serial Port Adapter is moved to data mode if no con-
nection exists. The default server profile is deactivated
when the Serial Port Adapter is moved from data mode
to packet mode.
11.4: Data Mode Commands Chapter 11: AT Commands Reference
44
Command
Parameters Type Value
role_and_profile enumerator 0: DevB role, Serial Port Profile (default value)
1: Gateway role, Dial-Up Networking Profile
2: LAN Access Point role, LAN Access Profile
255: No profile.
store_in_startup_database enumerator 0: The setting will only be valid for the current
power cycle.
1: The Serial Port Adapter will remember the
setting between power cycles. The settings
database in the Serial Port Adapter will be
updated.
Responses Description
<CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
The LAN access profile is not supported.
If the current default server profile is “255: No profile”, the “store
in startup database” parameter must be 1 and the module must
be restarted for the command to take affect.
Read_Max_No_Of_Remote_Peers (AT*ADMRP?)
AT Command Description
AT*ADMRP?<CR> For some Serial Port Adapters it is possible to have more
than one remote peer defined. This command reads the
maximum number of allowed remote peers.
Responses Description
<CR><LF>*ADMRP:<max_no_of_remote_peers>
<CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Response Pa-
rameters Type Value
max_no_of_remote_peers integer The maximum number of allowed re-
mote peers.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Not supported. The parameter always has the value of one.
11.4: Data Mode Commands Chapter 11: AT Commands Reference
45
Read_No_Of_Remote_Peers (AT*ADNRP?)
AT Command Description
AT*ADNRP?<CR> For some Serial Port Adapters it is possible
to have more than one remote peer defined.
This command reads the number of remote
peers defined.
Responses Description
<CR><LF>*ADNRP:<no_of_remote_peers>
<CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Response Pa-
rameters Type Value
no_of_remote_peers integer The number of remote peers currently defined.
The default value is 0.
Write_No_Of_Remote_Peers (AT*ADNRP=)
AT Command Description
AT*ADNRP=<no_of_remote_peers>,
<store_in_startup_database><CR> This command writes the number of remote
peers defined. The number of remote peers may
not be greater than the number returned by the
Read_Max_No_Of_Remote_Peers command.
After writing the number of remote peers the
host must use the Write_Default_Remote_Peer
command to write all the remote peers to the
Serial Port Adapter.
For more information see
Read_No_Of_Remote_Peers.
Command Pa-
rameters Type Value
no_of_remote_peers integer The number of remote peers.
The default value is 0.
store_in_startup_database enumerator 0: The setting will only be valid for the current
power cycle.
1: The Serial Port Adapter will remember the
setting between power cycles. The settings
database in the Serial Port Adapter will be up-
dated.
Responses Description
<CR><LF >OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Read_Default_Remote_Peer (AT*ADRDRP=)
AT Command Description
11.4: Data Mode Commands Chapter 11: AT Commands Reference
46
AT*ADRDRP=< peer_id ><CR>
This command reads the Bluetooth device address and
device name of the selected default remote peer (peer id).
Command
Parameters Type Value
peer_id integer The peer ID can be between 0 and the value
written by the Write_No_Of_Peers command –1
or read by the Read_No_Of_Peers command –1.
Responses Description
<CR><LF>*ADRDRP:<bd_addr>,<connect_scheme>,
<update_remote_peer_on_incoming>, <de-
vice_name><CR><LF>OK<CR><LF>
Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Response Pa-
rameters Type Value
bd_addr Bd_Addr Bluetooth device address of the default remote
peer.
connect_scheme integer This parameter is a bit field. Bit 0 is the least
significant bit. Each bit is defined as follows:
Bit 0: Try to connect to default remote peer on
data traffic.
Bit 1: Always try to be connected to the default
remote peer when in data mode.
Bit 2: Try to connect to default remote peer on
external signal. The external signal is imple-
mentation specific, e.g. some Serial Port Adapt-
ers might have a button.
Bit 3: On reset, try to connect to a device with
the name given by the <device_name> parame-
ter. The <device_name> may specify a part of,
or the full name of the remote device. The SPA
will at reset perform an inquiry followed by
name requests on devices found during inquiry
until a matching device is found. If no matching
device is found the SPA will stop this procedure
and operate as normal. If a matching device is
found, the SPA will try to connect to this device.
If no matching device is found, this is seen as
an LED error indication.
Bit 4-7: Reserved for future use.
up-
date_remote_peer_on_inco
ming
enumerator 1: Every time a remote device connects to the
selected DefaultServerProfile, update the re-
mote peer device address to the device address
of the connecting device. The new remote peer
device address will be stored in the startup
database. Only one of all the remote peers can
use this feature.
0: Do not update the remote peer device ad-
dress on incoming connections.
device_name string Maximum 240 characters.
Write_Default_Remote_Peer (AT*ADWDRP=)
AT Command Description
AT
*
ADWDRP
=<
peer id
>
,
<
bd addr
>
,
uetooth device a
d
-
11.4: Data Mode Commands Chapter 11: AT Commands Reference
47
<connect_scheme>, <up-
date_remote_peer_on_incoming>, <de-
vice_name>,
<store_in_startup_database><CR>
dress, connect scheme and device name of the
currently selected default remote peer.
Command Pa-
rameters Type Value
peer_id integer The peer ID can be between 0 and the
value written by the Write_No_Of_Peers
command –1 or read by the
Read_No_Of_Peers command –1.
bd_addr Bd_Addr Bluetooth device address of the default
remote peer.
connect_scheme integer See Read_Default_Remote_Peer.
update_remote_peer_on_incoming enumerator See Read_Default_Remote_Peer.
device_name string See Read_Default_Remote_Peer.
store_in_startup_database enumerator 0: The setting will only be valid for the
current power cycle.
1: The Serial Port Adapter will remember
the setting between power cycles. The
settings database in the Serial Port
Adapter will be updated.
Responses Description
<CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
The parameter <device_name> is only used when bit 3 in the
connect scheme is set. Max length is 32 characters.
cB-OEMSPA13
cB-OEMSPA33 Connect to name functionality is not supported. This means that
bit 3 in the connect scheme parameter is ignored.
Read_Inactivity_Tick (AT*ADIT?)
AT Command Description
AT*ADIT?<CR> This command reads the current inactivity tick setting. If there is
no data activity between two consecutive ticks the Serial Port
Adapter will automatically disconnect the current data mode
connection(s).
Responses Description
<CR><LF>*ADIT:<inactivity_tick><CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Response
Parameters Type Value
11.4: Data Mode Commands Chapter 11: AT Commands Reference
48
inactivety_tick integer 0: no inactivity tick (default value).
1-255: the period (in minutes) of the inactivity
timer.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Not supported.
Write_Inactivity_Tick (AT*ADIT=)
AT Command Description
AT*ADIT=<inactivety_tick>,
<store_in_startup_database>
<CR>
This command writes a new inactivity tick setting. If there is no
data activity between two consecutive ticks the Serial Port
Adapter will automatically disconnect the current connection(s).
Command
Parameters Type Value
inactivity_tick integer 0: no inactivity tick (default value).
1-255: the period (in minutes) of the inactivity
timer.
store_in_startup_database enumerator 0: The setting will only be valid for the current
power cycle.
1: The Serial Port Adapter will remember the
setting between power cycles. The settings
database in the Serial Port Adapter will be
updated.
Responses Description
<CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Not supported.
Read_Wireless_Multidrop_Configuration
(AT*ADWM?)
AT Com-
mand Description
AT*ADWM?<CR> This request returns whether or not the Wireless Multidrop™ fea-
ture has been enabled.
When the Wireless Multidrop™ has been enabled; all data sent to
the Serial Port Adapter in data mode will be forwarded to all con-
nected devices. Data received from a remote device will be for-
warded to the host. If the Auto_Forward parameter is set to TRUE
is will also forward all received data to all the other connected
devices.
11.4: Data Mode Commands Chapter 11: AT Commands Reference
49
Connections to remote devices can be established using three
methods:
Let the Serial Port Adapter connect to the desired de-
vices when it is in data mode. The host uses the request
Write_No_Of_Remote_Peers and
Write_Default_Remote_Peer to tell the Serial Port
Adapter how many devices to connect to, which devices
to connect to and when to connect to the defined de-
vices.
A server has been enabled using the request
Write_Default_Server_Profile and one or several devices
connect to this server.
One or several connections are established in packet
mode using the request Con-
nect_To_Serial_Service_Data_Mode. After all desired
connection have been setup by the host it moves to data
mode.
When the Wireless Multidrop™ has been disabled; only one con-
nection at a time can be established. A maximum of one remote
peer can be defined.
Responses Description
<CR><LF>*ADWM:<enabled>,
<auto_forward><CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Response
Parameters Type Value
enabled enumerator 0: Wireless Multidrop™ disabled (default value).
1: Wireless Multidrop™ enabled.
auto_forward enumerator 0: Data received from a connected device will
only be forwarded to the host (default value).
1: Reserved for future use.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Not supported.
Write_Wireless_Multidrop_Configuration
(AT*ADWM=)
AT Command Description
AT*ADWM=<enable>, <auto_forward>,
<store_in_startup_database><CR> See
Read_Wireless_Multidrop_Configuration.
Command
Parameters Type Value
enabled enumerator See Read_Wireless_Multidrop_Configuration.
auto_forward enumerator See Read_Wireless_Multidrop_Configuration.
11.5: Informational Commands Chapter 11: AT Commands Reference
50
store_in_startup_database enumerator 0: The setting will only be valid for the current
power cycle.
1: The Serial Port Adapter will remember the
setting between power cycles. The settings
database in the Serial Port Adapter will be
updated.
Responses Description
<CR><LF>OK<CR><LF> Successful response.
<CR><LF>ERROR<CR><LF> Error response.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Not supported.
11.5 Informational Commands
Read_Local_BD_ADDR (AT*AILBA?)
AT Command Description
AT*AILBA?<CR> Reads the Bluetooth Device Address of the local
device.
Responses Description
<CR><LF>*AILBA:<bd_addr>,<CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Response
Parameters Type Value
bd_addr Bd_Addr Local Bluetooth device address.
Read_Local_Version_Information (AT*AILVI?)
AT Command Description
AT*AILVI?<CR> This command reads the local version information to
the Serial Port Adapter.
Responses Description
<CR><LF>*AILVI:<manufacturer>, < sw_ver>,
<host_stack_sw_ver>, <link_manager_sw_ver>, <blue-
tooth_hardware_manufacturer><CR><LF>OK<CR><LF>
Successful response
<CR><LF>ERROR<CR><LF> Error message.
11.6: Miscellaneous Commands Chapter 11: AT Commands Reference
51
Response Parame-
ters Type Value
manufacturer string Serial Port Adapter manufacturer.
sw_ver string Serial Port Adapter software
version.
host_stack sw_ver string Bluetooth host stack version.
link_manager_sw_ver string Bluetooth link manager version.
bluetooth_hardware_manufacturer string Bluetooth hardware manufacturer.
11.6 Miscellaneous Commands
Read_RS232_Settings (AT*AMRS?)
AT Command Description
AT*AMRS?<CR> This command reads current RS232 settings from the
Serial Port Adapter.
Responses Description
<CR><LF>*AMRS:<baud_rate>, <data_bits>, <stop_bits>,
<parity>, <flow_control><CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Response
Parameters Type Value
baud_rate enumerator Standard baud rates:
1: 300
2: 1200
3: 2400
4: 4800
5: 9600
6: 19200
7: 38400
8: 57600 (default value)
9: 115200
10: 230400
11: 460800
12: 921600
Non standard baud rates:
17: 7200
18: 31250
19: 75000
20: 93750
21: 136000
22: 187500
23: 230000
24: 125000
25: 312500
26: 625000
data_bits enumerator 1: 8 data bits (default value)
2: 7 data bits
3: 6 data bits
4: 5 data bits
stop_bits enumerator 1: 1 stop bit (default value)
2: 2 stop bits
11.6: Miscellaneous Commands Chapter 11: AT Commands Reference
52
parity enumerator 1: no parity (default value)
2: odd parity
3: even parity
flow_control enumerator 1: CTS/RTS used for flow control (default value)
2: CTS/RTS not used.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
For the non-standard baud rates the 312500 and 625000 has an
accuracy of 1.5% and 2.5 %. For all other baud rates the accu-
racy is no worse than 0.5 %.
Write_RS232_Settings (AT*AMRS=)
AT Command Description
AT* AMRS=<baud_rate>, <data_bits>, <stop_bits>,
<parity>, <flow_control>, <change_after_confirm>,
<store_in_startup_database><CR>
This command applies new RS232
settings to the Serial Port Adapter. If 5,
6 or 7 data bits are selected the Serial
Port Adapter will not change its RS232
settings until the next power cycle
Command
Parameters Type Value
baud_rate enumerator See Read_RS232_Settings.
data_bits enumerator See Read_RS232_Settings.
stop_bits enumerator See Read_RS232_Settings.
parity enumerator See Read_RS232_Settings.
flow_control enumerator See Read_RS232_Settings.
change_after_confirm enumerator 0: The Serial Port Adapter will not change
RS232 settings until after the next power cycle.
1: The Serial Port Adapter will change RS232
settings after it has sent the OK to the ECI
Host.
store_in_startup_database enumerator 0: The setting will only be valid for the current
power cycle.
1: The Serial Port Adapter will remember the
setting between power cycles. The settings
database in the Serial Port Adapter will be
updated.
Responses Description
<CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Read_Serial_Interface_Type (AT*AMSIT?)
AT Command Description
AT*AMSIT?<CR> This command reads the serial interface type currently used.
11.6: Miscellaneous Commands Chapter 11: AT Commands Reference
53
Responses Description
<CR><LF>*AMSIT:<serial_interface_type>
<CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Response
Parameters Type Value
serial_interface_type enumerator 1: RS232 (default value)
2: RS422
3: RS485
4-255: Reserved for future use.
Write_Serial_Interface_Type (AT*AMSIT=)
AT Command Description
AT*AMSIT=<serial_interface_type>,
<store_in_startup_database><CR> This command writes the serial interface type cur-
rently used.
Note that the Serial Port Adapter does not change
serial interface type until the next time it is restarted.
Command
Parameters Type Value
serial_interface_type enumerator See Read_Serial_Interface_Type.
store_in_startup_database enumerator 0: The setting will only be valid for the current
power cycle.
1: The Serial Port Adapter will remember the
setting between power cycles. The settings
database in the Serial Port Adapter will be up-
dated.
Responses Description
<CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Read_Favorites (AT*ACF?)
AT Command Description
AT*ACF?<CR> Read the stored favorites.
Responses Description
<CR><LF>*ACF:<no_of_stored_favorites>
<CR><LF>OK<CR><LF> Successful response
*ACFD:<bd_addr>,<favorite_name><CR><LF> This response is sent for every
found favorite device.
<CR><LF>ERROR<CR><LF> Error message.
11.6: Miscellaneous Commands Chapter 11: AT Commands Reference
54
Response
Parameters Type Value
no_of_stored_favorites integer Number of stored favorite devices.
bd_addr string Bluetooth device address of the stored favorite.
favorite_name string Name of favorite.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Not supported.
Add_Change_Favorite (AT*ACACF=)
AT Command Description
AT*ACACF=<bd_addr>,<favorite_name><CR> Add or change a favorite. If the favorite,
identified by its Bluetooth device address
does not exist, it will be created.
Command
Parameters Type Value
bd_addr Bd_Addr Bluetooth device address of the favorite.
favorite_name string Maximum 240 characters (8-bit ASCII).
Responses Description
<CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Not supported.
Delete_Favorite (AT*ACDF=)
AT Command Description
AT*ACDF=<bd_addr><CR> Deletes a stored favorite.
Command
Parameters Type Value
bd_addr Bd_Addr Bluetooth device address of the stored favorite.
11.6: Miscellaneous Commands Chapter 11: AT Commands Reference
55
Responses Description
<CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Not supported.
Read_Allow_Configuration_Over_Bluetooth
(AT*ACCB?)
AT Command Description
AT*ACCB?<CR> Determine whether or not configuration over Bluetooth
is allowed. Configuration can either be performed
using AT commands or using the ECI protocol.
Responses Description
<CR><LF>*ACCB:<allow_configuration_over_bluetooth>
<CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Response Parame-
ters Type Value
allow_configuration_over_bluetooth enumerator 0: Configuration over Bluetooth is not
allowed (default value).
1: Configuration over Bluetooth is
allowed.
Write_Allow_Configuration_Over_Bluetooth
(AT*ACCB=)
AT Command Description
AT*ACCB= <al-
low_configuration_over_bluetooth>,
<store_in_startup_database><CR>
See the
Read_Allow_Configuration_Over_Bluetooth
command.
Command Parame-
ters Type Value
allow_configuration_over_Bluetooth enumerator See the
Read_Allow_Configuration_Over_Blu
etooth command.
11.6: Miscellaneous Commands Chapter 11: AT Commands Reference
56
store_in_startup_database enumerator 0: The setting will only be valid for
the current power cycle.
1: The Serial Port Adapter will re-
member the setting between power
cycles. The settings database in the
Serial Port Adapter will be updated.
Responses Description
<CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Read_Controller_Power_Save_Mode (AT*AMPM?)
AT Command Description
AT*AMPM?<CR> This command reads the current power save mode
setting.
Please study the Serial Port Adapter manual for details
on how to utilize the power save modes.
Responses Description
<CR><LF>*AMPM:<mode> <CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Response Parame-
ters Type Value
mode enumerator 1: Allow only online mode. The Serial
Port Adapter will never enter sleep or
stop mode to save power.
2: Allow sleep mode (default value).
The Serial Port Adapter will enter sleep
mode when possible to save power.
3: Allow sleep mode and stop mode.
The Serial Port Adapter will enter sleep
or stop mode when possible to save
power.
4: As online mode except that the
internal clock will always be 32 MHz.
5 – 255: Power modes reserved for
future use.
Write_Controller_Power_Save_Mode (AT*AMPM=)
AT Command Description
AT*AMPM=<mode>,
<store_in_startup_database><CR> This command writes a new power save mode
setting to the Serial Port Adapter.
Please study the Serial Port Adapter manual for
details on how to utilize the power save modes.
Command Pa-
rameters Type Value
mode enumerator See Read_Controller_Power_Save_Mode.
11.6: Miscellaneous Commands Chapter 11: AT Commands Reference
57
store_in_startup_database enumerator 0: The setting will only be valid for the current
power cycle.
1: The Serial Port Adapter will remember the
setting between power cycles. The settings
database in the Serial Port Adapter will be
updated.
Responses Description
<CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Online 32 MHz mode (4) is not supported.
Stop mode cannot be configured if the DSR mode is 2 (see
AT*AMDS).
Read_Max_Output_Power (AT*AMMP?)
AT Command Description
AT*AMMP?<CR> Read the maximum output power used by the Serial
Port Adapter when communicating. Note that not all
Serial Port Adapter models support output power
control.
Responses Description
<CR><LF>*AMMP:<max_output_power>
<CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Response Parame-
ters Type Value
max_output_power integer 255: Use the highest output power
supported by the Serial Port Adapter as
the maximum output power (default).
128-m: -m dBm (m<30)
128: 0 dBm
128+n: n dBm (n<30)
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Not supported.
Write_Max_Output_Power (AT*AMMP=)
AT Command Description
11.6: Miscellaneous Commands Chapter 11: AT Commands Reference
58
AT*AMMP=<max_output_power>,
<store_in_startup_database><CR> Set the maximum output power to be used by
the Serial Port Adapter when communicating.
Note that not all Serial Port Adapter models
support output power control.
Command Pa-
rameters Type Value
max_output_power integer See Read_Max_Output_Power.
store_in_startup_database enumerator 0: The setting will only be valid for the current
power cycle.
1: The Serial Port Adapter will remember the
setting between power cycles. The settings
database in the Serial Port Adapter will be
updated.
Responses Description
<CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Not supported.
Read_Esc_Sequence_Timing (AT*AMET?)
AT Command Description
AT*AMET?<CR> For an escape sequence to be valid, a period of no
data activity is required before and after the escape
sequence. This command reads the minimum time of
no data activity required before and after the escape
sequence.
Responses Description
<CR><LF>*AMET:<min_before_time>, <min_after_time>
<CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Response Parame-
ters Type Value
min_before_time integer 50-5000 ms.
The default value is 1000.
min_after_time integer 50-5000 ms.
The default value is 1000.
11.6: Miscellaneous Commands Chapter 11: AT Commands Reference
59
Write_Esc_Sequence_Timing (AT*AMET=)
AT Command Description
AT*AMET=<min_before_time>,
<min_after_time>,
<store_in_startup_database><CR>
For an escape sequence to be valid, a period of
no data activity is required before and after the
escape sequence. This command sets the
minimum time of no data activity required before
and after the escape sequence.
Command Pa-
rameters Type Value
min_before_time integer See Read_Esc_Sequence_Timing.
min_after_time integer See Read_Esc_Sequence_Timing.
store_in_startup_database enumerator 0: The setting will only be valid for the current
power cycle.
1: The Serial Port Adapter will remember the
setting between power cycles. The settings
database in the Serial Port Adapter will be
updated.
Responses Description
<CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Read_Button_Operation_Mode (AT*AMBOR=)
AT Command Description
AT*AMBOR=<button_id><CR> For some Serial Port Adapters it is possible to select
the operation that shall be associated with a specific
button.
Command Pa-
rameters Type Value
button_id integer Identifies the button to control.
Responses Description
<CR><LF>*AMBOR:<operation_mode>, <gen-
eral_parameter> <CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Response Parame-
ters Type Value
operation_mode integer The button operation mode (1=default).
general_parameter integer The meaning of this parameter de-
pends on the value of the opera-
tion_mode parameter.
11.6: Miscellaneous Commands Chapter 11: AT Commands Reference
60
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Not supported.
Write_Button_Operation_Mode (AT*AMBO=)
AT Command Description
AT*AMBO=<button_id>, <operation_mode>,
<general_parameter>,
<store_in_startup_database><CR>
For some Serial Port Adapters it is possible to
select the operation that shall be associated with
a specific button.
Command Pa-
rameters Type Value
button_id integer See Read_Button_Operation_Mode.
operation_mode integer See Read_Button_Operation_Mode.
general_parameter integer See Read_Button_Operation_Mode.
store_in_startup_database enumerator 0: The setting will only be valid for the current
power cycle.
1: The Serial Port Adapter will remember the
setting between power cycles. The settings
database in the Serial Port Adapter will be
updated.
Responses Description
<CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Not supported.
Read_LED_Operation_Mode (AT*AMLO?)
AT Command Description
AT*AMLO?<CR> For some Serial Port Adapters it is possible to select
an alternate operation mode for control of LEDs.
Responses Description
<CR><LF>*AMLO: <operation_mode>, <gen-
eral_parameter><CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
11.6: Miscellaneous Commands Chapter 11: AT Commands Reference
61
Response Parame-
ters Type Value
operation_mode integer The new LED operation mode
(1=default).
general_parameter integer The meaning of this parameter de-
pends on the value of the opera-
tion_mode parameter.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Not supported.
Write_LED_Operation_Mode (AT*AMLO=)
AT Command Description
AT*AMLO=<operation_mode>, <gen-
eral_parameter>,
<store_in_startup_database><CR>
For some Serial Port Adapters it is possible to
select an alternate operation mode for control of
LEDs.
Command Pa-
rameters Type Value
operation_mode integer See Read_LED_Operation_Mode.
general_parameter integer See Read_LED_Operation_Mode.
store_in_startup_database enumerator 0: The setting will only be valid for the current
power cycle.
1: The Serial Port Adapter will remember the
setting between power cycles. The settings
database in the Serial Port Adapter will be
updated.
Responses Description
<CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Not supported.
Store_Factory_Settings (AT*AMSF)
AT Command Description
AT*AMSF<CR> Store all the current settings in the factory set-
tings database. The factory settings can be
restored using the AT&F command.
11.6: Miscellaneous Commands Chapter 11: AT Commands Reference
62
Responses Description
<CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Only available in production.
Read_Watchdog_Settings (AT*AMWS?)
AT Command Description
AT*AMWS?<CR> Read current watchdog settings.
Watchdog settings are only active in data mode and
not AT or ECI mode.
Responses Description
<CR><LF>*AMWS: <bt_write_timeout>,
<bt_inactivity_timeout>, <bt_connect_timeout>,
<bt_disconnect_reset>, <reset><CR><LF>OK<CR><LF>
Successful response
<CR><LF>ERROR<CR><LF> Error message.
Response Parame-
ters Type Value
bt_write_timeout integer Time in seconds before SPA discon-
nects if out of credits.
0: Disabled (default value)
> 0: Timeout in seconds
bt_inactivity_timeout integer Time in seconds before SPA discon-
nects if no activity.
0: Disabled (default value)
> 0: Timeout in seconds
bt_connect_timeout integer Max connection time in seconds before
a connection is terminated.
0: Disabled (default value)
> 0: Timeout in seconds
bt_disconnect_reset integer 0: Disabled (default value)
1: An SPA enabled, as a server will
reset on a terminated connection.
reset integer Will always read a value of 0.
If written, 1 means reset of module.
Other parameters are then ignored.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Not supported
11.6: Miscellaneous Commands Chapter 11: AT Commands Reference
63
Write_Watchdog_Settings (AT*AMWS=)
AT Command Description
AT*AMWS=<bt_write_timeout>,
<bt_inactivity_timeout>,
<bt_connect_timeout>,
<bt_disconnect_reset>, <reset>,
<store_in_startup_database><CR>
Write watchdog parameters. The watchdog
functionality is only active in data mode and not
AT or ECI mode. Furthermore, the power mode
must also be set to online (see AT*AMPM).
Command Pa-
rameters Type Value
bt_write_timeout integer Time in seconds before SPA disconnects if out
of credits.
0: Disabled (default value)
> 0: Timeout in seconds
bt_inactivity_timeout integer Time in seconds before SPA disconnects if no
activity.
0: Disabled (default value)
> 0: Timeout in seconds
bt_connect_timeout integer Max connection time in seconds before a
connection is terminated.
0: Disabled (default value)
> 0: Timeout in seconds
bt_disconnect_reset integer 0: Disabled (default value)
1: An SPA enabled, as a server will reset on a
terminated connection.
reset integer If set to 1 the SPA will reset immediately. All
other parameters will be ignored.
store_in_startup_database enumerator 0: The setting will only be valid for the current
power cycle.
1: The Serial Port Adapter will remember the
setting between power cycles. The settings
database in the Serial Port Adapter will be
updated.
Responses Description
<CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
Only implemented to reset the module. All other parameters are
ignored.
Read_DTR_DSR_Settings (AT*AMDS?)
AT Command Description
AT*AMDS?<CR> Read current DTR/DSR configuration.
11.6: Miscellaneous Commands Chapter 11: AT Commands Reference
64
Responses Description
<CR><LF>*AMDS: <dtr_cfg>,
<dsr_cfg><CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Response Parame-
ters Type Value
dtr_cfg integer Configuration of module behavior on
the UART DTR pin.
1: DTR is activated when module is
started. (default value)
2: DTR is active if there is a Bluetooth
connection. If there is no connection,
DTR is inactive.
dsr_cfg integer Configuration of module behavior on
the UART DSR pin.
1: DSR is ignored. (default value)
2: If DSR goes from inactive to active,
the module will try to connect to a
remote peer if a remote peer is config-
ured. If DSR goes from active to inac-
tive, the module will disconnect. For the
remote peer, the external connect
scheme must be set.
See Write_Default_Remote_Peer
command.
Model Constraint
cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
DSR mode 2 cannot be configured if module is configured for
stop mode (see AT*AMPM).
cB-OEMSPA13
cB-OEMSPA33 Not supported.
Write_DTR_DSR_Settings (AT*AMDS=)
AT Command Description
AT*AMDS=<dtr_cfg>, <dsr_cfg>,
<store_in_startup_database><CR> Write DTR/DSR configuration.
Command Pa-
rameters Type Value
dtr_cfg integer See Read_DTR_DSR_Settings.
dsr_cfg integer See Read_DTR_DSR_Settings.
store_in_startup_database enumerator 0: The setting will only be valid for the current
power cycle.
1: The Serial Port Adapter will remember the
setting between power cycles. The settings
database in the Serial Port Adapter will be
updated.
11.6: Miscellaneous Commands Chapter 11: AT Commands Reference
65
Responses Description
<CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Model Constraint
cB-OEMSPA13
cB-OEMSPA33 Not supported.
Read_Link_Policy (AT*AMLP?)
AT Command Description
AT*AMLP?<CR> Read current Link Policy.
Responses Description
<CR><LF>*AMLP: <link_policy>, <parame-
ter><CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Response Parame-
ters Type Value
link_policy integer See Write_Link_Policy command.
parameter integer See Write_Link_Policy command.
Model Constraint
cB-OEMSPA13
cB-OEMSPA33 Not supported.
Write_Link_Policy (AT*AMLP=)
AT Command Description
AT*AMLP=<link_policy>, <parameter>,
<store_in_startup_database><CR> Write link policy.
The link policy can be chosen to optimize the
link for a specific application. The link policy can
be chosen to reduce power consumption, get
faster response times or to optimize the SPA as
either sender or receiver.
Note!
Using other link policies than the default
may lead to interoperability problems. Verify
that the chosen link policy works with other
devices your application is intended to inter-
operate with. If not, use the default link pol-
icy.
Link policy 3 or 4 gives the shortest response
times.
Link policy 8 combined with stop mode (AMPM:
3) gives the lowest power consumption.
11.6: Miscellaneous Commands Chapter 11: AT Commands Reference
66
When using a baud rate of 460 kbps or more on
the serial interface, a combination of link policy 1
on the sender and link policy 2 on the receiver
gives the highest throughput. When using a
slower baud rate, then the default link policy
gives equally high throughput.
If the remote device rejects the link policy re-
quested by the SPA, then the red LED gives an
error indication. If the remote device rejects the
link policy, then the default link policy is used.
Command Pa-
rameters Type Value
link_policy integer Link policy configuration.
0: Default, No sniff, All packet sizes.
1: Sender, No sniff, 5 slot packets
2: Receiver, No sniff, 1 slot packets
3: QoS, No sniff, All packet sizes, Short poll
interval
4: Sniff, interval 10ms, 1 slot packets
5: Sniff, interval 50ms, 1 slot packets
6: Sniff, interval 100ms, 1 slot packets
7: Sniff, interval 200ms, 1 slot packets
8: Sniff, interval 500ms, 1 slot packets
The link policies with sniff may be used to get
a link with a specific response time or to de-
crease the power consumption.
parameter integer Bit 0: Exit sniff on data activity. Only used
when link policy supports sniff.
If set the SPA will try to temporarily exit sniff
when receiving data on the serial interface.
When no data has been received on the serial
interface for 1s, then the link will be put back
into sniff mode. If not set, then the link will
always be in sniff.
Using exit sniff on data activity may be useful
when using longer sniff intervals since these
links have a low throughput.
store_in_startup_database enumerator 0: The setting will only be valid for the current
power cycle.
1: The Serial Port Adapter will remember the
setting between power cycles. The settings
database in the Serial Port Adapter will be
updated.
Responses Description
<CR><LF>OK<CR><LF> Successful response
<CR><LF>ERROR<CR><LF> Error message.
Model Constraint
cB-OEMSPA13
cB-OEMSPA33 Not supported.
11.7: Events Chapter 11: AT Commands Reference
67
11.7 Events
Serial_Connection_Data_Mode_Closed (*ADCCO)
Event Description
*ADCCO:<connection_handle>,<reason><CR><LF> A connection to a remote device has
been disconnected.
Event Pa-
rameters Type Value
connection_handle integer Identifies the connection.
reason enumerator 0: Disconnected by command
1: Disconnected by link loss
255: Reason unknown
Chapter 12: Model Compatibility 11.7: Events
Chapter 12
Model Compatibility
The following table describes what AT commands different serial port adapter
models supports.
AT Command cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
cB-OEMSPA13 cB-OEMSPA33
AT Yes Yes Yes
AT* Yes Yes Yes
ATZ No Yes Yes
AT&F Yes Yes Yes
ATS2 Yes Yes Yes
ATE Yes Yes Yes
AT*AGDM Yes* Yes Yes
AT*AGCM Yes Yes Yes
AT*AGPM Yes Yes Yes
AT*AGSM Yes Yes Yes
AT*AGND Yes* Yes Yes
AT*AGDD No Yes Yes
AT*AGI Yes Yes Yes
AT*AGB No Yes Yes
AT*AGUB Yes Yes Yes
AT*AGBD Yes Yes Yes
AT*AGFP Yes Yes Yes
AT*AGLN Yes* Yes Yes
AT*AGLC Yes Yes Yes
AT*AGGMSR No Yes Yes
AT*AGCMSR No Yes Yes
AT*AGMSP Yes Yes Yes
AT*AGRSS No Yes Yes
AT*ARSS Yes* Yes Yes
11.7: Events Chapter 12: Model Compatibility
69
AT Command cB-OEMSPA311
cB-OEMSPA331
cB-OEMSPA312
cB-OEMSPA332
cB-OEMSPA13 cB-OEMSPA33
AT*ADDM Yes Yes Yes
AT*ADCP Yes* Yes Yes
AT*ADCC Yes Yes Yes
AT*ADDCP Yes Yes Yes
AT*ADDCP Yes* Yes Yes
AT*ADDSP Yes* Yes Yes
AT*ADMRP No Yes Yes
AT*ADNRP Yes Yes Yes
AT*ADRDRP Yes Yes Yes
AT*ADWDRP Yes* Yes Yes
AT*ADIT No Yes Yes
AT*ADWM No Yes Yes
AT*AILBA Yes Yes Yes
AT*AILVI Yes Yes Yes
AT*AMRS Yes Yes Yes
AT*AMSIT Yes Yes Yes
AT*ACF No Yes Yes
AT*ACACF No Yes Yes
AT*ACDF No Yes Yes
AT*ACCB Yes Yes Yes
AT*AMPM Yes* Yes Yes
AT*AMMP No No Yes
AT*AMET Yes Yes Yes
AT*AMBOR No Yes Yes
AT*AMBO No Yes Yes
AT*AMLO No Yes Yes
AT*AMSF No* Yes Yes
AT*AMWS No* Yes Yes
AT*AMDS Yes No No
AT*AMLP Yes No No
*ADCCO Yes Yes Yes
*) There is some constraint regarding the AT command. See details for each AT
command. Typically this means that some parameter value is not permitted such as
e.g. LAN profile is not supported and device names are limited to 31 characters.

Navigation menu