BTM410/411
Bluetooth
®
AT Data Module
18
www.lairdtech.com
Laird Technologies
AT COMMAND SET
REFERENCE
7.
AT&W
{Write S Registers to Non-volatile Memory}
Writes current S Register values to non-volatile memory so that they are retained over a power
cycle.
Response:
<cr,lf>OK<cr,lf>
Or
Response:
<cr,lf>ERROR nn<cr,lf>
General S Registers
Please refer to the
(Table 4-1) for a list of supported S Registers.
The main purpose of S Registers is to make the device configuration persistent. All S Registers can be
saved to non-volatile memory by AT&W.
In some cases, an AT command and an S register exist for one and the same setting. In the majority of
those cases the AT command’s setting will be lost on next power cycle whereas the S register can be
saved and is still available after power cycle. This rule applies to many but not to all of those cases.
AT Commands for Inquiry
1.
AT+BTI <devclass>
{Inquire}
This will make the device perform an inquiry for delay seconds and max number of unique
responses, where delay is defined by S register 517 and max is specified by S register 518.
The <devclass> is an optional parameter where the value specifies either a 6 digit device class code
or a 2 digit major device class. If it is not specified, the value is taken from S register 516.
When <devclass> is 6 hexadecimal characters long, it specifies an AND mask which is used to filter
inquiry responses. When <devclass> is 2 hexadecimal characters long, it forces the inquiry to filter
responses to devices that match their major device class code to this value – which can only be in
the range 00 to 1F.
The response format to AT+BTI is defined by S Register 330 by bitmask. This is device address,
device class, friendly name, receiver strength indicator and extended inquiry data. Please refer to
Table 3-8 and Table 3-9.
For S330=1:
Response:
<cr,lf>12346789012
<cr,lf>12345678914
<cr,lf>OK<cr,lf>
A Bluetooth inquiry process is such that for a single inquiry request a device could respond many
times. To ensure that an address is sent to the host only once for a particular AT+BTI, an array of
addresses is created at the start of each AT+BTI and is filled as responses come in. This array of
addresses is stored in dynamic memory and as such if the memory allocation fails then the inquiry
procedure is aborted and in that case an error response is sent to the host. To clarify, a single
AT+BTI will never return the same Bluetooth address more than once, but as long as the responding
device is active, all AT+BTI commands will always return it.
As the inquiry process is driven by randomness, it is not guaranteed that each discoverable device is
always found on the first attempt. Sometimes more than one inquiry processes might be necessary
to find a particular device. The probability also depends on the inquiry scanning intervals of the
device being searched for.
Содержание BTM410
Страница 1: ...1 Version 3 0 ...