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

Length of Payload of MQTT received message isn't provided in SDK?

Hi everyone,

My English skill is not good, but I really want to share this problem to all developers that I spent three hours for it.

Example nRF5_SDK_for_Thread_and_Zigbee_2.0.0\examples\thread\mqttsn_client_subscriber only receives packets having length of payload is 1-byte (value 0 or 1) , I need to custom it for my application. However, this SDK don't provide length of payload as below.

After dealing with this problems in 3 hours, I have been able to resolve it as below.

finally, write a command to test it.

result:

For me, length of payload received messages are quite necessary.

Parents Reply Children
No Data
Related