Download RN4020 Bluetooth Low Energy Module User's Guide

Transcript
RN4020 Command Interface
2.2
GAP ROLE SWITCHING
In the previous firmware version (1.10.09), the RN4020 module is configured to operate
as either the Peripheral or central Generic Access Profile (GAP) role at boot time. The
module’s role is determined by bit 31 (0x80000000) in the “SR” command.
While in Peripheral mode, the RN4020 module is permitted to broadcast advertising
packets and be connectable. Similarly in Central mode, the RN4020 module can scan
for advertisements and connect to a peripheral. Changing the mode requires setting or
clearing bit 31 with the “SR” command, and rebooting the RN4020 module.
Beginning in Firmware Version 1.20, the GAP roles are determined by Action
commands or events.
Note:
Bit 31, or the “SR,80000000” command to set Peripheral or Central mode,
is ignored in Firmware Version 1.20.
Table 2-2 summarizes the commands that switch the GAP roles.
TABLE 2-2:
ROLE SWITCH COMMANDS
Event/Action Command
Gap Roles
Boot up
None
A – Start advertising
Peripheral
F – Start scanning
Central
E – Connect command
Central
J,1 – Enter Observer
Observer
J,0 – Exit Observer
Peripheral
N – Enter Broadcaster
Broadcaster
 2014 Microchip Technology Inc.
DS70005191B-page 19