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

How to analyze data received by MQTT subscriber

Hi all,

Currently, I am working on Nrf52 DK with nRF52832 on Keil IDE. My focus is MQTT with 2 nRF52s and RPi. I have succesfully used examples in SDK, but now I am trying to specialize the example for my needs. I am getting familiarized with Wireshark program to analyze data traffic. However, I could not be sure that whether subscriber receives data I sent or not? Which way or program should I use to clear myself? Thanks in advance.

SDK version : 15.2.0

Parents
  • If you are using the MQTT Client - Subscriber example, you can verify that the messages are received correctly by checking if LED 4 turns on/off (depending on the message sent from the publisher), but I assume this is not happening. If that is the case, I would set a break point in the start of the callback function app_mqtt_evt_handler(..) and check if the program stops. If this doesn't happen, please tell me and I will look into it.

    Best regards,

    Simon

  • Hi Simon,

    Thank you for an answer. I debugged but it seemed works fine. Actually, I am a beginner of debugging as well. However, I changed publish function for my use case to send 16 or 32 bits data as below. 

    Then, I realized that I need to update app_mqtt_evt_handler()'s below part for the same purpose since the original version is designed to send blink led command only. 

    Best regards,

    Halil

Reply
  • Hi Simon,

    Thank you for an answer. I debugged but it seemed works fine. Actually, I am a beginner of debugging as well. However, I changed publish function for my use case to send 16 or 32 bits data as below. 

    Then, I realized that I need to update app_mqtt_evt_handler()'s below part for the same purpose since the original version is designed to send blink led command only. 

    Best regards,

    Halil

Children
Related