esp_wifi_set_ps(WIFI_PS_MODEM), BLE, and light sleep?
esp_wifi_set_ps(WIFI_PS_MODEM), BLE, and light sleep?
Hi all,
In an effort to save power, I am investigating various sleep modes and power saving modes. I've done some testing where I've determined that esp_wifi_set_ps(WIFI_PS_MODEM) does seem to decrease power usage by about 41mA but having BLE enabled keeps it from working. In addition, I've noticed in the documentation that light sleep mode is not compatible with BLE or WiFi, at the moment. So, a few questions:
1. Am I right that esp_wifi_set_ps(WIFI_PS_MODEM) is disabled by using BLE, and is there a way around this?
2. I saw in the documentation (https://esp-idf.readthedocs.io/en/lates ... leep-modes) that light sleep is compatible with WiFi, but that the current API does not support this. Is this still true, and is there a timeline for when light sleep will work with WiFi? Or is there an alternative API that can be used?
3. Is there any documentation for esp_wifi_set_ps(WIFI_PS_MODEM)? Specifically, I am curious if anything else needs to be enabled / disabled, or if there are any consequences to using this?
4. I have noticed that if I am using WiFi and BLE, and I enable "Support for power management" in menuconfig, I get trash on the monitor console. If I add "Enable dynamic frequency scaling" this goes away. Is this potentially a bug, or is there something that I need to be aware of when enabling this feature?
Thanks,
Jason
In an effort to save power, I am investigating various sleep modes and power saving modes. I've done some testing where I've determined that esp_wifi_set_ps(WIFI_PS_MODEM) does seem to decrease power usage by about 41mA but having BLE enabled keeps it from working. In addition, I've noticed in the documentation that light sleep mode is not compatible with BLE or WiFi, at the moment. So, a few questions:
1. Am I right that esp_wifi_set_ps(WIFI_PS_MODEM) is disabled by using BLE, and is there a way around this?
2. I saw in the documentation (https://esp-idf.readthedocs.io/en/lates ... leep-modes) that light sleep is compatible with WiFi, but that the current API does not support this. Is this still true, and is there a timeline for when light sleep will work with WiFi? Or is there an alternative API that can be used?
3. Is there any documentation for esp_wifi_set_ps(WIFI_PS_MODEM)? Specifically, I am curious if anything else needs to be enabled / disabled, or if there are any consequences to using this?
4. I have noticed that if I am using WiFi and BLE, and I enable "Support for power management" in menuconfig, I get trash on the monitor console. If I add "Enable dynamic frequency scaling" this goes away. Is this potentially a bug, or is there something that I need to be aware of when enabling this feature?
Thanks,
Jason
Re: esp_wifi_set_ps(WIFI_PS_MODEM), BLE, and light sleep?
1. Correct, Bluetooth is not compatible with modem or light sleep and there is now way around this, at the moment.
2. Yes, still true, light sleep + WiFi is expected to be supported in 3.1, however we don't have the implementation ready yet.
3. WiFi modem sleep is only possible in station mode. AP or sniffer or Bluetooth will prevent it from working.
4. Sounds like a bug, could you please report it on GitHub, along with steps to reproduce?
2. Yes, still true, light sleep + WiFi is expected to be supported in 3.1, however we don't have the implementation ready yet.
3. WiFi modem sleep is only possible in station mode. AP or sniffer or Bluetooth will prevent it from working.
4. Sounds like a bug, could you please report it on GitHub, along with steps to reproduce?
Re: esp_wifi_set_ps(WIFI_PS_MODEM), BLE, and light sleep?
Thank you for the response ESP_igrr, much appreciated! I will narrow down the bug in #4 and file an issue.ESP_igrr wrote:1. Correct, Bluetooth is not compatible with modem or light sleep and there is now way around this, at the moment.
2. Yes, still true, light sleep + WiFi is expected to be supported in 3.1, however we don't have the implementation ready yet.
3. WiFi modem sleep is only possible in station mode. AP or sniffer or Bluetooth will prevent it from working.
4. Sounds like a bug, could you please report it on GitHub, along with steps to reproduce?
Thanks,
Jason
Re: esp_wifi_set_ps(WIFI_PS_MODEM), BLE, and light sleep?
Hi @ESP_igrr, do you know an approximate timeframe for #2? I saw a post somewhere saying February at one point. Is that still likely?ESP_igrr wrote:1. Correct, Bluetooth is not compatible with modem or light sleep and there is now way around this, at the moment.
2. Yes, still true, light sleep + WiFi is expected to be supported in 3.1, however we don't have the implementation ready yet.
3. WiFi modem sleep is only possible in station mode. AP or sniffer or Bluetooth will prevent it from working.
4. Sounds like a bug, could you please report it on GitHub, along with steps to reproduce?
Thanks,
Jason
Re: esp_wifi_set_ps(WIFI_PS_MODEM), BLE, and light sleep?
We're aiming to have the feature freeze by mid February (before spring festival). This means that it is likely that this particular feature will trickle down to the master branch by then. If we miss that date for some reason, then end of February is likely.
Re: esp_wifi_set_ps(WIFI_PS_MODEM), BLE, and light sleep?
Thank you @ESP_igrr, I really appreciate your fast and helpful responses!ESP_igrr wrote:We're aiming to have the feature freeze by mid February (before spring festival). This means that it is likely that this particular feature will trickle down to the master branch by then. If we miss that date for some reason, then end of February is likely.
Thanks,
Jason
Re: esp_wifi_set_ps(WIFI_PS_MODEM), BLE, and light sleep?
What about BLE light sleep when it will be avaliable?ESP_igrr wrote:We're aiming to have the feature freeze by mid February (before spring festival). This means that it is likely that this particular feature will trickle down to the master branch by then. If we miss that date for some reason, then end of February is likely.
Re: esp_wifi_set_ps(WIFI_PS_MODEM), BLE, and light sleep?
Hi,vonnieda wrote:Thank you for the response ESP_igrr, much appreciated! I will narrow down the bug in #4 and file an issue.ESP_igrr wrote:4. Sounds like a bug, could you please report it on GitHub, along with steps to reproduce?
Thanks,
Jason
have you created an issue for this? I have same situation...
Re: esp_wifi_set_ps(WIFI_PS_MODEM), BLE, and light sleep?
wondering if team can confirm if WiFi light sleep implementation will be supported in 3.1?
Re: esp_wifi_set_ps(WIFI_PS_MODEM), BLE, and light sleep?
Is there any progress on solving this issue ?vonnieda wrote:...
4. I have noticed that if I am using WiFi and BLE, and I enable "Support for power management" in menuconfig, I get trash on the monitor console. If I add "Enable dynamic frequency scaling" this goes away. Is this potentially a bug, or is there something that I need to be aware of when enabling this feature?
Edit:
This only happens if → Component config → ESP32-specific → CPU frequency is set to 240 MHz.
Possible workaround is to set the the CPU frequency to 160 MHz at the application start, then set it back to 250 MHz:
Code: Select all
#if defined(CONFIG_PM_ENABLE) && !defined(CONFIG_PM_DFS_INIT_AUTO) && defined(CONFIG_ESP32_DEFAULT_CPU_FREQ_240)
esp_pm_config_esp32_t pm_config;
pm_config.max_cpu_freq = RTC_CPU_FREQ_160M;
pm_config.min_cpu_freq = RTC_CPU_FREQ_80M; // or RTC_CPU_FREQ_XTAL
pm_config.light_sleep_enable = false;
esp_pm_configure(&pm_config);
vTaskDelay(2);
pm_config.max_cpu_freq = RTC_CPU_FREQ_240M;
esp_pm_configure(&pm_config);
#endif
Who is online
Users browsing this forum: Baldhead and 92 guests