Send AT commands while in PPPoS connection
Posted: Sat Apr 18, 2020 2:30 pm
I am working with a BG96 and using the PPPoS sample code (https://github.com/espressif/esp-idf/tr ... pos_client) which works fine.
However, I need to be able to send AT commands from time to time in order to check signal quality, incoming SMS, etc., but I want to keep the data connection open. For example, I want to keep the MQTT connection open for that short period of time while I send the AT commands.
There is a function in place to switch between PPP_MODE and COMMAND_MODE (esp_modem_dte_change_mode), but since the MQTT task is still running and the stack is not notified of the PPP_MODE "suspension", the serial port is still busy with PPPoS data and connections drop while I try to send AT commands (and fail).
I tried several "hacks" but failed.
Please don't suggest using the BG96 TCP/IP stack via AT commands, because the whole point of using PPPoS for me is to leverage all the high level libraries that ESP-IDF provides.
So, the question is: how do I switch to AT command mode for a few seconds while pausing the PPP data connection on the ESP?
I even have access to DTR pin on the BG96, so I can make a fast switch to AT command mode.
Thanks!
However, I need to be able to send AT commands from time to time in order to check signal quality, incoming SMS, etc., but I want to keep the data connection open. For example, I want to keep the MQTT connection open for that short period of time while I send the AT commands.
There is a function in place to switch between PPP_MODE and COMMAND_MODE (esp_modem_dte_change_mode), but since the MQTT task is still running and the stack is not notified of the PPP_MODE "suspension", the serial port is still busy with PPPoS data and connections drop while I try to send AT commands (and fail).
I tried several "hacks" but failed.
Please don't suggest using the BG96 TCP/IP stack via AT commands, because the whole point of using PPPoS for me is to leverage all the high level libraries that ESP-IDF provides.
So, the question is: how do I switch to AT command mode for a few seconds while pausing the PPP data connection on the ESP?
I even have access to DTR pin on the BG96, so I can make a fast switch to AT command mode.
Thanks!