Data Sheet

!
3. Basic AT Commands
3.2.10. AT+SLEEP—Configures the Sleep Modes
3.2.11. AT+WAKEUPGPIO—Configures a GPIO to Wake ESP8266 up from Light-sleep Mode
Command
Query Command:
AT+SLEEP?
Set Command:
AT+SLEEP=<sleep󰐇mode>
Response
+SLEEP:<sleep󰐇mode>
OK
OK
or
ERROR
Parameter
<sleep󰐇mode>:
0: disables sleep mode
1: Light-sleep mode
2: Modem-sleep mode
Notes
This command can only be used in Station mode. Modem-sleep is the default sleep mode.
Example
AT+SLEEP=0
Command
AT+WAKEUPGPIO=<enable>,<trigger_GPIO>,<trigger_level>[,<awake_GPIO>,<awake_level>]
Response
OK
Parameter
<enable>
0: ESP8266 can NOT be woken up from light-sleep by GPIO.
1: ESP8266 can be woken up from light-sleep by GPIO.
<trigger_GPIO>
Sets the GPIO to wake ESP8266 up; range of value: [0, 15].
<trigger_level>
0: The GPIO wakes up ESP8266 on low level.
1: The GPIO wakes up ESP8266 on high level.
[<awake_GPIO>]
Optional; this parameter is used to set a GPIO as a flag of ESP8266’s being awoken form
Light-sleep; range of value: [0, 15].
[<awake_level>]
Optional;
0: The GPIO is set to be low level after the wakeup process.
1: The GPIO is set to be high level after the wakeup process.
Notes
The value of <trigger_GPIO> and <awake_GPIO> in the command should not be the same.
After being woken up by <trigger_GPIO> from Light-sleep, when the ESP8266 attempts to
sleep again, it will check the status of the <trigger_GPIO>:
if it is still in the wakeup status, the EP8266 will enter Modem-sleep mode instead;
if it is NOT in the wakeup status, the ESP8266 will enter Light-sleep mode.
Espressif
! /5813
2017.05