Open doragasu opened 5 days ago
esp_modem
doesn't support it ATM, but I find it quite helpful (also used it to perform OTA in the past).
I've put up a sketch PR: https://github.com/espressif/esp-protocols/pull/700, which allows you to pause a network connection and bring up the AT interface.
Thanks!
With that patch, invoking pause(true)
also switches to command mode, right? Or should I manually switch after the pause?
With that patch, invoking pause(true) also switches to command mode, right? Or should I manually switch after the pause?
It sends the corresponding AT commands, yes, but the mode stays the same.
To test it, you need to switch to the data mode first. Then:
modem_mode::DATA_MODE
).
(network data are discarded so it may happen that the connection get's dropped or disconnected in the meantime, e.g. if you're using TPC keepalive or MQTT pings...)I see, thanks.
About the discarded network data, I suppose data from the ESP host to the modem is discarded (but I could maybe workaround that with a lock), and data from the modem to the ESP will be buffered by the modem until I unpause (so when using TCP, no data loss should occur).
Answers checklist.
General issue report
I'm using a Quectel MC60 modem. In CMUX mode, I can get Internet connectivity and simultaneously send AT commands (I need to periodically get signal quality). The problem is that now I am optimizing power consumption, and the modem refuses to enter sleep mode if CMUX is active, so I am forced to use DATA mode.
While in DATA mode, sending commands to the modem does not work, and if I momentarily try switching to COMMAND mode, the connection is immediately dropped. When many years ago I made my own modem drivers, I was able to momentarily switch to command mode (using the "+++" escape sequence), send the AT command, and return to DATA mode without interrupting the connection. Is this possible in any way?
TL;DR: Is there a way to get the signal quality (or send any other AT command) when using DATA mode, without interrupting the connectivity?