MQTT Binary Payload

Discussion about software developed by Freematics, including Freematics Builder and Freematics Emulator GUI
Post Reply
Posts: 3
Joined: Tue Nov 16, 2021 9:18 am

MQTT Binary Payload

Post by smith »


When transmitting via TCP I've had no problems with a binary payload, however when transmitting via MQTT, I get errors when loading after ">".

Using the command:

Code: Select all

sprintf(m_buffer, "AT+CMQTTPAYLOAD=0,%u\r", length);
if(sendCommand(m_buffer, 23, 500, ">")){
	sendCommand(buffer, length, 1000, "\r\nOK\r\n");
Any ideas why this might be? Is there a chance I'm hitting a serial control character?

I've tested with random binary data and had sporadic successes and failures, with no clear cause.
Post Reply