nRF9160 MQTT - Receiving large (over 2kB) messages causing a disconnect

Hi

MQTT large message receiving when trying to obtain certs from aws...  

Setup

Modem: 1.3.3

nRF Connect: 2.3.0

I have seen posts 254191 & 303100 that relate to this this and discuss a number of work arounds.  To replicate I have removed all custom code and running example code on the dk

Running serial_lte_modem example and implementing native_tls  

testing against aws iot core (secure) , and hivemq (unsecure)

The data limit is in the low 2300's as the payload/topic combined. This points me away from the 2kB secure buffer as mentioned in 303100

Increased buffers in the native overlay

also found and increased the below in slm_defines.h this has little effect.

// #define SLM_AT_MAX_RSP_LEN   2100
#define SLM_AT_MAX_RSP_LEN   4096
// #define SLM_MAX_MESSAGE_SIZE NRF_SOCKET_TLS_MAX_MESSAGE_SIZE
#define SLM_MAX_MESSAGE_SIZE 4096

snap shot of log

#XMQTTEVT: 7,0

#XMQTTMSG: 21,10

nrf91/slm/mqtt/topic0

aaaasdfsad

 

#XMQTTEVT: 2,0

#XMQTTMSG: 21,10

nrf91/slm/mqtt/topic0

aaaasdfsad

 

#XMQTTEVT: 2,0

#XMQTTEVT: 1,-113    Frowning2

%CESQ: 68,3,17,2

%CESQ: 255,0,255,0

any help much appreciated

Trent

Parents
  • Hi Trent,

    Looks the following configuration in v2.3.0\nrf\applications\serial_lte_modem\overlay-native_tls.conf already satisfies your needs as long as the received package is smaller than 5KB.

    # If larger TLS buffer is required for large CA chain,
    # increase CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN and
    # CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN to 4096
    # and CONFIG_MBEDTLS_HEAP_SIZE to 36864
    CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=5120
    CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=4096
    CONFIG_MBEDTLS_HEAP_SIZE=36864

    I will do a test tomorrow to verify if it works or not and share with you my testing process and results.

    Best regards,

    Charlie

Reply
  • Hi Trent,

    Looks the following configuration in v2.3.0\nrf\applications\serial_lte_modem\overlay-native_tls.conf already satisfies your needs as long as the received package is smaller than 5KB.

    # If larger TLS buffer is required for large CA chain,
    # increase CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN and
    # CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN to 4096
    # and CONFIG_MBEDTLS_HEAP_SIZE to 36864
    CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=5120
    CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=4096
    CONFIG_MBEDTLS_HEAP_SIZE=36864

    I will do a test tomorrow to verify if it works or not and share with you my testing process and results.

    Best regards,

    Charlie

Children
No Data
Related