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

error on lte_lc_helpers: Could not init AT params list, error: -12

Hello,

I have developed firmware which communicates to an AWS IoT Core erver.  To make sure the device is robust I decided to transmit data every 30s to the server.  The network stays up, but I open and close a socket each transmission.  I'm also testing in a lower signal strength area so I can handle non-optimal conditions.  I'm using ncs v1.7.1.

After running the device for about an hour or so I've sometimes encountered this problem:

[00:49:04.473,236] [1;31m<err> lte_lc_helpers: Could not init AT params list, error: -12[0m
[00:49:04.473,236] [1;31m<err> lte_lc: Failed to parse notification (error -12): +CEREG: 1,"2711","0BBD6010",7,,,"11100000","1~[0m

Once this occurs the lte handler for lte_lc_connect_async no longer works in printing registration messages.  So instead of printing registration messages, the firmware prints these errors.  There is one ticket I've found which is related to this:

https://devzone.nordicsemi.com/f/nordic-q-a/77306/could-not-init-at-param-list-error--12-nrf9160

So I'm assuming I also have a problem with parse_cereg(), but how do I fix this problem?  I'm not querying modem informing in my code.  I'm letting the lte handler take care of that.  As I mentioned I'm in a non-optimal area so I'm getting registration messages more frequently than most, but I don't see how I could get enough messages to fill up the param list.

Thanks for any help,

Chris

Parents
  • Hello Chris,

    So I'm assuming I also have a problem with parse_cereg(), but how do I fix this problem?  I'm not querying modem informing in my code.  I'm letting the lte handler take care of that.  As I mentioned I'm in a non-optimal area so I'm getting registration messages more frequently than most, but I don't see how I could get enough messages to fill up the param list.

    Do you have the possibility to debug your code? It would be interesting to know how the response list looks like before at_params_list_init() is called and returns error -12.

    Regards,

    Markus

  • I've done more testing.  I decided to investigate why at params could not be initialized.  Apparently it looks like I was slowly using up all my kernel heap over time an that's why it usually took an hour for the problem to appear.

    I isolated it to addrinfo, and I wasn't freeing it properly when I was using freeaddrinfo.

    Thanks for your help.  You answer actually helped guide me in the right direction.  All is good now.

    Chris

Reply
  • I've done more testing.  I decided to investigate why at params could not be initialized.  Apparently it looks like I was slowly using up all my kernel heap over time an that's why it usually took an hour for the problem to appear.

    I isolated it to addrinfo, and I wasn't freeing it properly when I was using freeaddrinfo.

    Thanks for your help.  You answer actually helped guide me in the right direction.  All is good now.

    Chris

Children
No Data
Related