Chengdu Ebyte Electronic Technology Co., Ltd
Copyright ©2012–2019
,
Chengdu Ebyte Electronic Technology Co., Ltd
10
4.2 Power mode
There are two modes
:
low power mode and wake-up mode.
4.2.1 Low power mode
The low power mode means that the BLE function continues to run after entering this mode, and the peripherals except the
wake-up pin are turned off. If you need lower power consumption, you can turn off the broadcast, scan, disconnect all connections, set
a longer broadcast gap, scan the gap, and connect the gap by AT command.
Enter low power mode
:
1.
AT command “AT+SLEEP”: enter low power mode
;
2.
AT command “AT+DISCSLEEP=1”: disconnect and enter low power mode
;
3.
AT command “AT+ONSLEEP=1” : enter low power mode once power on
;
4.
Via pin WKP rising edge
,
keep high level for 200ms and enter low power mode
;
To output “STA
:
sleep” via serial port after entering low power mode
(
LOGMSG output unclosed
)。
Note: In low power mode, when it is not disconnected, for example, when ble receives data over air, or when the connection
status changes, the module temporarily wakes up and outputs the corresponding data, and immediately goes to sleep after the data
output is completed. At this point, entering low power consumption, or waking up will not output status data.
4.2.2 Wake up mode
In this mode, the peripherals of ble modules works normally. Once it waked up, it outputs “STA
:
wakeup”.
Wake up mode
:
1.
Via pin WKP falling edge
,
keep low level for 200ms and enter wake up mode
;
2.
Pin RX wakes up, via falling edge of pin RX
,
keep low level for at least 50us and wake up immediately
。
4.3
Data transmission
mode
There are two transmission mode
:
transparent transmission and format transmission.
4.3.1
Transparent transmission
It refers to the data received by the serial port is sent to the other device through BLE without any processing, and the data
received by the BLE is sent through the serial port without any processing.
In slave mode, only data transparent transmission is available. The result of the command "AT+TRANMD" is invalid for the slave.
In master mode, data transparent transmission is sent to each connected slave module by advertising. Due to the use of broadcast
transmission, under extreme conditions, there is no guarantee that each slave will be able to receive data. The host is set to the
transparent transmission mode by the instruction "AT+TRANMD=1".
4.3.2
Format transmission
The data sent to the module through the serial port and the data transmitted through the serial port must be in accordance with the
defined format and transmitted. It should be noted that the format transmission of the module also supports the transmission of data in
a broadcast manner.