MQTT Sim800C application

Hello all,

I’m trying to send upwards of 200 bytes Payload by means of MQTT protocol and currently not seeing the packet arriving server side, although it seems shorter Payloads are working. I’ve realised my Remaining Length byte is not correct as the value is greater than 127. I therefore need to define two bytes. Working on that now, but wondering if there is anythingelse I may have missed in order for longer Payloads to be sent correctly?

I’m working with a SIM800C and getting all the correct responses from the device - therefore thinking that the problem is with my construction of the MQTT packets.

Please advise?

Thanks!

Yes, you can use the readily available algorithm given in the documentation.
Also check on the QOS value the broker supports and make sure you are sending the same in your packets. And check the connect flags to set username and password flags if you are using any.