paho mqtt/packet. The example provided with it performs serialization of the data that needs to be sent and then sends it over TCP just like that. I have written the code for the ESP, and it works fine without any issues. However, when I serialize the data, it looks like this (as seen in the debugger):

memset(buf, 0, 200); to my code, but I'm still facing the same issue with the serialized data being interpreted incorrectly ...