Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How does modem wake up from light sleep mode. #832

Open
3 tasks done
EdwardRyu opened this issue May 13, 2024 · 3 comments
Open
3 tasks done

How does modem wake up from light sleep mode. #832

EdwardRyu opened this issue May 13, 2024 · 3 comments

Comments

@EdwardRyu
Copy link

Answers checklist.

  • I have read the documentation ESP-AT Programming Guide and the issue is not addressed there.
  • I have used the latest released firmware or have updated my ESP-AT branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

Hello,

Our product is using below version.

HW :
[ESP32-WROVER-E]

SW
IDF-v4.4.4
ADF-V2.5
AT-v2.4.0.0

I have a couple of questions about sleep mode as follows.

  1. Can device wake up from light sleep mode by receiving AT commands from application processor?
  2. Can device wake up from light sleep mode when receiving packets from any of Ethernet or Wi-Fi?

Thanks,
Edward

@ustccw
Copy link
Collaborator

ustccw commented May 17, 2024

@EdwardRyu

  1. No, this is the wakeup mode by uart. esp-at doesn't support it now. please refer to AT+SLEEPWKCFG for more details.
  2. Yes, device will auto wake up from light sleep, and do ESP-AT Message Reports, MCU can receive network data. please refer to Sleep AT Examples for more details.

@ustccw
Copy link
Collaborator

ustccw commented May 20, 2024

@EdwardRyu Of course, you can use any unused GPIO with input capability as the wakeup GPIO. maybe you can refer to your module datasheet for more details.

@EdwardRyu
Copy link
Author

EdwardRyu commented May 27, 2024

Hi,

I have issued following commands in order to put modem to light sleep mode.

  • AT+CWMODE=1
  • AT+CWJAP=,,,,,3
  • AT+SLEEP=2

Right after issuing those at commands, I could see some drops of current consumptions by modem from 120 mA to 48 mA.

In this sleep mode,

  • I am able to send and receive AT commands properly.
  • I could receive packets from internet as well.
  • Current consumption is still less than before entering light sleep mode, but it is fluctuating.

Questions are :

Q1) I am not sure whether if modem entered in light sleep mode or not. Could you guide how to check if modem is in light sleep mode or not?
As you can see, below log snippets below, I couldn't see any sleep specific AT response from modem after AT+SLEEP=2.
https://cdn-shop.adafruit.com/product-files/3384/esp32-wrover_datasheet_en.pdf
image

Q2) After it enters this mode, I mean the state where the modem consumes around 48 mA, sometimes the current consumption is varying from 48 to 80 mA, sometimes it keep lower values around 50mA.
I wonder what makes the current consumption jumping/fluctuating.

Q3) What is the range of current consumption by modem in light sleep mode?
When I look into data sheet from below link it mentioned between 0.8 mA.
But the gap between our measure and the data in data sheet is far different.
Could you tell me more about this?

Q4) In this mode, when I send AT command from MCU to modem, I could get response from modem as usual.
I wonder if modem will be getting into sleep mode again automatically or not after getting AT response from modem.
Or do we have to issue any AT+SLEEP command to modem again?

Q5) Regarding GPIO wakeup configuration, regardless of any GPIO number.
Do you have any specific requirement for selecting GPIO for wakeup signal?

I (416114) UART_TASK: at_port_write_data - len 22, data - at+SLEEPWKCFG=2,28,0

I (416115) UART_TASK: at_port_write_data - len 9, data -
ERROR

I (569871) UART_TASK: at_port_write_data - len 22, data - at+SLEEPWKCFG=2,12,0
E (569872) gpio: gpio_install_isr_service(449): GPIO isr service already installed
I (569873) UART_TASK: at_port_write_data - len 9, data -
ERROR

[2024-05-24 16:33:28.735] [0] [ATT][MODM] AT+CWMODE=1
[2024-05-24 16:33:28.735]
[2024-05-24 16:33:28.766] [2] [ATR][19,0x200004fc]
[2024-05-24 16:33:28.766] AT+CWMODE=1
[2024-05-24 16:33:28.766]
[2024-05-24 16:33:28.766] OK

[2024-05-24 16:33:34.032] [2] [ATT][MODM] AT+CWJAP=,,,,,3
[2024-05-24 16:33:34.032]
[2024-05-24 16:33:34.079] [4] [ATR][55,0x200004fc]
[2024-05-24 16:33:34.079] AT+CWJAP=,,,,,3
[2024-05-24 16:33:34.079] WIFI DISCONNECT
[2024-05-24 16:33:34.079] +MQTTDISCONNECTED:0

[2024-05-24 16:33:34.110] [8] [ATR][16,0x200004fc]
[2024-05-24 16:33:34.110] WIFI CONNECTED
[2024-05-24 16:33:35.128] [7] [ATR][19,0x200004fc]
[2024-05-24 16:33:35.128]
[2024-05-24 16:33:35.128] OK
[2024-05-24 16:33:35.128] WIFI GOT IP

[2024-05-24 16:35:35.220] [0] [ATT][MODM] AT+SLEEP=2
[2024-05-24 16:35:35.220] [2] [ATR][18,0x200004fc]
[2024-05-24 16:35:35.236] AT+SLEEP=2
[2024-05-24 16:35:35.236]
[2024-05-24 16:35:35.236] OK

--> after this, we can issue any AT command and modem responds back as normal.
--> I wonder if the modem goes into light sleep mode again automatically or not after receiving response from modem.
--> The current consumption is still same.

Thanks,
Edward

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants