Sleep AT Examples

This document briefly introduces and demonstrates setting sleep modes using AT commands.

Introduction

Combo-AT currently supports two power modes: 1. Light sleep: only available in BLE peripheral mode; you can choose to enter light sleep on power-up or not; BLE advertising continues during sleep. 2. Deep sleep: supports timer wake-up and GPIO wake-up; BLE and Wi-Fi stop after entering sleep.

Measurement Method

To avoid interference during power consumption testing, test a single module.

Set light sleep mode while BLE is connected

#.初始化为角色为蓝牙从机。

Command:

AT+BLEMODE=1

Response:

OK

#.开始广播。(默认开启)

Command:

AT+BLEADVEN=1

Response:

OK

#.更新蓝牙连接参数。设置蓝牙连接间隔为10ms。

Command:

AT+BLECONINTV=8,8,99,400

Response:

OK

#.设置休眠模式为浅休眠模式。

Command:

AT+SLEEP=0

Response:

OK

#.等待连接。

If the connection is established successfully, AT will prompt:

+EVENT:BLE_CONNECTED //蓝牙连接成功


OK

Set deep sleep mode

  1. Set sleep mode to deep sleep with GPIO wake-up.

    Command:

    AT+SLEEP=2,2,7,0
    
    OK
    

    Response:

    OK
    

    Note:

    • Ai-WB2 series supports wake-up on IO7 only, i.e., automatic wake-up when serial data is received.

  2. Set sleep mode to deep sleep with 5-second timer wake-up.

    Command:

    AT+SLEEP=2,0,5000
    
    OK
    

    Response:

    OK