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

MQTT 128kB packet size

Hello,

I am using NRF9160 running the Serial LTE Modem application in NCS 1.5.0.

When connecting with AWS IoT over a secure MQTT connection the maximum MQTT packet size allowed by AWS IoT is 128kB. When I publish a message of this size from an external device my nrf9160 device outputs the error -128. What is this error? 128 does not appear in errno.h.

How can I allow the maximum packet size of 128kB from AWS IoT to be received by the nrf9160? If this size is not reachable what is the maximum limit and how do I enable that limit?

What is the maximum outgoing limit and how do I enable that limit?

Parents
  • Thanks  The Only reply button seems to be at the top so I'm replying to 


    Hi,

    Unfortunately, I have not been able to make much progress. I have been quite busy, especially the past couple of months, due to low staffing during the summer acation period.

    I am truly sorry for not having been able to work more on this.

    However, staffing should soon return to normal, which will make it easier to find the time needed to look properly into this issue.

    There has also been a lot of work done on the crypto side, with the inclusion of Trusted Firmware-M.

    This includes adding a sample to the master branch that shows how you can run the TLS stack in the secure domain: https://github.com/nrfconnect/sdk-nrf/tree/master/samples/crypto/psa_tls

    With sincere apologies,

    Didrik

    Understood. I will check that out. In the meantime I have found what looks like the point where my error first arises in rsa.c. You can see the Call stack and the line where the error code comes from in this image.

    Watch on "ret" doesn't work here but I do believe the value is -0x10 = MBEDTLS_ERR_MPI_ALLOC_FAILED.

    Hopefully that might be of use in the future.

    As a side note it's pretty difficult to step through this code because it is optimized and there is only Common Configuration in the drop down. Is it possible to run this SLM application in an unoptimized Debug configuration?

Reply
  • Thanks  The Only reply button seems to be at the top so I'm replying to 


    Hi,

    Unfortunately, I have not been able to make much progress. I have been quite busy, especially the past couple of months, due to low staffing during the summer acation period.

    I am truly sorry for not having been able to work more on this.

    However, staffing should soon return to normal, which will make it easier to find the time needed to look properly into this issue.

    There has also been a lot of work done on the crypto side, with the inclusion of Trusted Firmware-M.

    This includes adding a sample to the master branch that shows how you can run the TLS stack in the secure domain: https://github.com/nrfconnect/sdk-nrf/tree/master/samples/crypto/psa_tls

    With sincere apologies,

    Didrik

    Understood. I will check that out. In the meantime I have found what looks like the point where my error first arises in rsa.c. You can see the Call stack and the line where the error code comes from in this image.

    Watch on "ret" doesn't work here but I do believe the value is -0x10 = MBEDTLS_ERR_MPI_ALLOC_FAILED.

    Hopefully that might be of use in the future.

    As a side note it's pretty difficult to step through this code because it is optimized and there is only Common Configuration in the drop down. Is it possible to run this SLM application in an unoptimized Debug configuration?

Children
No Data
Related