25
www.lairdtech.com
Laird Technologies
BTM520/521
Bluetooth
®
Multimedia Plus Module
CONFIGURING
THE BTM520/521
2. AT+BTC<devclass> {Set Device Class Code}
This command is used to set the device class code which will be sent in subsequent inquiry responses.
It can be read back using the AT+BTC? Command, as described below.
<devclass> is a 6 digit hexadecimal number derived as per section “1.2 The Class of Device/Service
Field” of the Bluetooth specification “Bluetooth Assigned Numbers”.
The 24 bits are made of 4 fields briefly described as follows (bit 0 corresponds to the least significant bit):-
Laird Technologies devices do not map to any predefined Major Service Class or Major Device Class
and so the default devclass as shipped is 001F00, which means no Major Service Class and
“Unclassified” Major Device class.
Other examples of device class codes are follows:-
Response: <cr,lf>OK<cr,lf>
Or for an invalid <devclass> value (usually a value which is not 6 hexadecimal characters long).
Response: <cr,lf>ERROR 08<cr,lf>
3. AT+BTC? {Read Device Class Code}
This command is used to read the current device class code.
Response: <cr,lf>123456
<cr,lf>OK<cr,lf>
4. AT+BTD<bd_addr> {Remove Trusted Device}
This command is used to remove the specified device from the list of trusted devices in
the non-volatile database. If the device is not in the database then the response will still
be an OK.
Response: <cr,lf>OK<cr,lf>
5. AT+BTD* {Remove All Trusted Devices}
This command is used to remove all devices from the list of trusted devices in the non-volatile
database. No confirmation will be asked for. So beware!!!
WARNING: If you make an authenticated connection, the link key gets cached in the underlying
stack. So if you subsequently delete the key using AT+BTD* and immediately request an
authenticated connection to the same device, then the connection will be established. To ensure
this does not happen, either send ATZ after the AT+BTD* OR send AT+BTD<bd_addr> for each
item in the trusted device database.
Response: <cr,lf>OK<cr,lf>
6. AT+BTF=<string> {Set Friendly Name}
This sets the friendly name of this device as seen by other devices
Response: <cr,lf>OK<cr,lf>
Bits 0-1
Format Type. This field currently only has a value of 00 (i.e. format type 1)
Bits 2-7
These 6 bits define the Minor Device Class and the value is interpreted differently
based on the Major Device class stored in the next 5 bits.
Bits 8-12
These 5 bits define the Major Device Class as per Table 1.3 in
“Bluetooth Assigned Numbers”
Bits 13-23
This is an 11 bit field used as a mask to define the Major Service Class, as per Table 1.2 in
“Bluetooth Assigned Number”
CODE (HEXADECIMAL)
NAME
MAJOR SERVICE
MAJOR DEVICE
MINOR DEVICE
001F00
Unclassified
None
Unclassified
n/a
200404
Headset
Audio
Audio
Headset