Xinyuan-LilyGO / LilyGo-T-SIM7080G

42 stars 22 forks source link

Wake up esp from modem after exiting PSM #18

Closed 4ib3r closed 1 year ago

4ib3r commented 1 year ago

Hello, I try to use PSM mode and wake-up esp using RI pin (gpio 03 in esp). Unfortunately signal from a modem come randomly. Modem wakes up from PSM and status led turn on regulary. How to properly wake up the esp from the modem after exiting PSM mode? My modem configuration:

AT+CFGRI=1
AT+CURCCFG="QUALCOMM",1
AT+CURCCFG="SMS",1
AT+CURCCFG="SYS",1
AT+CURCCFG="TCPIP",0
AT+CURCCFG="NETWORK",0
AT+CPSMSTATUS=1
AT+CPSMS=1,,,"10100010","00000011"
lewisxhe commented 1 year ago

PSM mode The wake-up time needs to be confirmed with the operator

4ib3r commented 1 year ago

PSM mode and timers are working, modem wake-up in time and status led turn on after this event, when esp is not in depth sleep mode, RI pin change state regularly, but when I turn on depth sleep in esp and set esp_sleep_enable_ext0_wakeup(GPIO_NUM_3, 0); to this pin it not working, and pin don't change state.

lewisxhe commented 1 year ago

Use esp_sleep_enable_ext1_wakeup(GPIO_NUM_3,LOW)

4ib3r commented 1 year ago

I found the problem. The transitor based level converter for the RI pin gets 1.8V from the vdd_ext modem pin and this voltage is missing when the modem goes into PSM mode. When the modem wakes up the RI and vdd_ext drop to 1.8V at the same time but nothing changes in this case for esp32 on GPIO 3.