This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SLM bug / Modem lib issue

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

Parents
  • Hi,

    You will have to design the application around this limitation, and dedicate a preemptive thread to periodically read from the networking sockets. It is a know issue\limitation and there is no workaround for the time being. 

    Regards,
    Jonathan

  • Thank you for the timely response, so the idea is that the modem will have to send notifications to the host microcontroller with data as it arrives, instead of having the master request the data?

    Can you tell me whether its on your radar to fix this or if its just an accepted limitation at this point?

  • Thomas said:
    Can you tell me whether its on your radar to fix this or if its just an accepted limitation at this point?

    It is an issue we are looking in to solving, but i can provide any details or promises to when this will be done. So for now its a accepted limitation. 

    The application needs to be designed so that it will read the received data from shared memory, so downloading large files is not recommended without reading received data. 

    Regards,
    Jonathan

Reply
  • Thomas said:
    Can you tell me whether its on your radar to fix this or if its just an accepted limitation at this point?

    It is an issue we are looking in to solving, but i can provide any details or promises to when this will be done. So for now its a accepted limitation. 

    The application needs to be designed so that it will read the received data from shared memory, so downloading large files is not recommended without reading received data. 

    Regards,
    Jonathan

Children
No Data
Related