Description
Basic Infos
Hardware
NodeMCU v1.0
Description
The ESP8266 only wakes up when you use GPIO_PIN_INTR_LOLEVEL / GPIO_PIN_INTR_HILEVEL,
So for GPIO_PIN_INTR_LOLEVEL you would need to Pull the voltage down to 0V then to 3.3V up again.
I have an SIM808 Module. It has a ring indicator, which is normally HIGH and goes LOW when a call is comming in. It goes up again, when the call is rejected/accepted.
See: https://www.dfrobot.com/wiki/index.php/SIM808_with_Leonardo_mainboard_SKU:DFR0355#About_JP2
The power usage of the NodeMCU in Sleep Mode is around 17mA. When the Ring is LOW, it rises to 86mA. It seems the ESP8266 woke up. But the codeflow on the ESP8266 is only continued if I reject the call and Ring is HIGH again.
The solution would be a using GPIO_PIN_INTR_ANYEDGE or GPIO_PIN_INTR_NEGEDGE. But If I use this, nothing happens (current stays at around 17ma). So maybe something is broken? Or is the ESP8266 firmware itself missing the implementation of that options?
I tried D6/D5/D3
Sketch
wifi_fpm_set_sleep_type(LIGHT_SLEEP_T); // set sleep type, the above posters wifi_set_sleep_type() didnt seem to work for me although it did let me compile and upload with no errors
gpio_pin_wakeup_enable(CONFIG_GSM_RING_PIN, GPIO_PIN_INTR_LOLEVEL); // GPIO_ID_PIN(2) corresponds to GPIO2 on ESP8266-01 , GPIO_PIN_INTR_LOLEVEL for a logic low, can also do other interrupts, see gpio.h above
wifi_fpm_open(); // Enables force sleep
wifi_fpm_do_sleep(0xFFFFFFF); // Sleep for longest possible time