Hi,
We have been designing a more robust version of the SLM application and in our testing we noticed a problem that we couldn't work around.
If the modem library's RX buffer is filled with IP messages, then a call to send AT command hangs until some of the IP messages are cleared (either by closing the socket, or reading the data).
On the modem's multithreaded zephyr system this works okay as you can avoid calling AT commands on threads that use IP sockets and so even though a thread may be stuck waiting for the AT command, it will eventually continue on when the IP thread reads the messages or closes the socket.
If you do try and send an AT command on a thread that manages an IP socket though, you can freeze your application...
Likewise, if you use SLM and treat it like a normal modem, sending commands in sequence, waiting for each response before continuing, the modem firmware goes unresponsive if you send any "standard" AT command when the modem's RX buffer is full.
You can repeat this by downloading a large file without reading it out of the buffer, then attempting to send an AT command. Note that this doesn't seem to occur if you trace the modem.
Currently the RX buffer in the modem library is shared between AT, IP and GNSS. Would it not have made more sense to have them split into three RX buffers so you don't have this kind of concurrency issue?
Kind regards,
Thomas