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

MQTT stops responding after fixed number of subscribe and publish

Hi everyone,

I was having RAM overflowed with stack issues which were resolved using suggestions here. Now I am facing another issue. While running mqtt I can only do a fixed number (15) of mqtt publish or subscribe requests and then mqtt stops responding to received messages. I am suspecting this as a memory issue where stack pointer reaches an undefined location. Does anyone have any suggestion to debug such an issue while the project is running? Thanks a lot

Parents
  • Hi Jawad, the IoT SDK team has done major improvements to the MQTT library of the IoT SDK since the v0.9.x release. I have attached the latest MQTT library files from our internal repo below, could you try to replace the mqtt library and see if that resolves the issue?

    Attachments:

    mqtt.zip

    Update 12.01.17

    I've added the mqtt files above to the MQTT publisher and subscriber gcc examples in the IoT SDK and verified that I am able to publish and subscribe to messages using a Raspberry Pi running the Mosquitto broker. I have attached the IoT SDK with the mqtt examples that uses the updated mqtt files.

    Note, I've only tested the examples using a non-secure connection, i.e. used the following configuration

    #define APP_MQTT_BROKER_PORT             1883
    m_app_mqtt_client.transport_type       = MQTT_TRANSPORT_NON_SECURE;
    m_app_mqtt_client.p_security_settings  = NULL;
    

    Attachments:

    nrf5_iot_sdk_3288530_mqtt.zip

    Best regards

    Bjørn

Reply
  • Hi Jawad, the IoT SDK team has done major improvements to the MQTT library of the IoT SDK since the v0.9.x release. I have attached the latest MQTT library files from our internal repo below, could you try to replace the mqtt library and see if that resolves the issue?

    Attachments:

    mqtt.zip

    Update 12.01.17

    I've added the mqtt files above to the MQTT publisher and subscriber gcc examples in the IoT SDK and verified that I am able to publish and subscribe to messages using a Raspberry Pi running the Mosquitto broker. I have attached the IoT SDK with the mqtt examples that uses the updated mqtt files.

    Note, I've only tested the examples using a non-secure connection, i.e. used the following configuration

    #define APP_MQTT_BROKER_PORT             1883
    m_app_mqtt_client.transport_type       = MQTT_TRANSPORT_NON_SECURE;
    m_app_mqtt_client.p_security_settings  = NULL;
    

    Attachments:

    nrf5_iot_sdk_3288530_mqtt.zip

    Best regards

    Bjørn

Children
Related