This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Do the AT%CMNG commands function properly for writing credentials in mfw_nrf9160_0.7.0-29.alpha

I've used the nrf_inbuilt_key_write to store certificates/keys in the past, but I am still unable to do it using the "AT%CMNG" modem command.

I can list and delete items using "AT%CMNG=1" and "AT%CMNG=3,x,x", but every attempt to write with "AT%CMNG=0,x,x,"xxx"" seems to hang forever.

Our device is providing access to a modem console for factory provisioning and debug, so it would be nice to not have to implement a special method when this should be able to handle it, but I just can't get it to work.

Is this expected to be working in mfw_nrf9160_0.7.0-29.alpha?

Parents
  • We eventually realized that the bulk of the issue, and likely the original root of my troubles, was that the buffers being used by the at_host library are simply too small in both directions, causing silent truncation and loss of data.  There is now a ticket for a Nordic engineer to fix this, and I expect an official fix in the not too far future.

    If you can't wait, start digging through the at_host code, looking in particular at CONFIG_AT_CMD_RESPONSE_MAX_LEN or CONFIG_AT_HOST_SOCKET_BUF_SIZE depending on what version you're at.  I also recommend turning on CONFIG_LOG if you can support it so that the failures aren't so silent.

Reply
  • We eventually realized that the bulk of the issue, and likely the original root of my troubles, was that the buffers being used by the at_host library are simply too small in both directions, causing silent truncation and loss of data.  There is now a ticket for a Nordic engineer to fix this, and I expect an official fix in the not too far future.

    If you can't wait, start digging through the at_host code, looking in particular at CONFIG_AT_CMD_RESPONSE_MAX_LEN or CONFIG_AT_HOST_SOCKET_BUF_SIZE depending on what version you're at.  I also recommend turning on CONFIG_LOG if you can support it so that the failures aren't so silent.

Children
No Data
Related