User's Manual

3.3.2.2 A,<hex16>,<hex16>
Command “A” is only available to device that operates as peripheral or broadcacster
role. Command “A” is used to start advertisement.
When the device acts as broadcaster role, enabled by command “N”, the
advertisement is undirected, un-connectable manufacture specific broadcast
message. The payload of the message is set by command “N”.
When the device acts as peripheral role, and it is not bonded, the advertisement is
undirected connectable, which means all BTLE central device could find it. When the
device is bonded, the advertisement is directed if no_direct_adv bit is cleared with
command SR; otherwise the advertisement is undirected if no_direct_adv bit is set.
When direct advertisement is used, it is directed to the bonded device so that other
BTLE devices could not be heard.
When command “A” is issued without parameter, the advertisement interval is
default to be 100ms and advertise indefinitely. Command “A” could be followed by
two 16bit hex parameters, which indicates advertisement interval in millisecond
and total advertisement time in millisecond. The second parameter must be larger
than the first parameter.
Default: 100 (millisecond)
Example: A,0050,07D0 // Start advertisement with
// interval of 80 millisecond for 2 seconds
3.3.2.3 B,<0,1>
Command “B” is used to secure the connection and bond two connected devices.
Command “B” is only effective if two devices are already connected. Bonding could
be issued from either central or peripheral device.
If no input parameter is provided or the input parameter is 1, the connection will be
secured and the peer device remembered. In this situation, we call the two devices
are bonded. If the input parameter is 0, the connection is secured but peer device is
not saved into NVM. In this situation, the connection is not bonded.
Once bonded, security materials will be saved in both end of connection if
do_not_save_bonding setting is cleared by command “SR”. Therefore reconnection
between bonded devices does not require authentication, so reconnection could be
done in a very short time. For bonded peripheral devices, the advertisement could
only be directed. As the result, bonded peripheral devices are not available for
inquiry or connection.