MQTT and binary data using AT commands

It is possible to use binary data in QMTPUB command and QMTRECV notification on M66? Could you provide some examples?

I would like to use M66 to communicate with MQTT broker where data is binary. I know that MQTT specs support it, but I’m not sure that MQTT implementation in M66 allow this.

I’m looking for GSM modem with MQTT implementation.

Dear Sir,
Please click the following link to download your needed MQTT applictaion note. Thaks!
https://cnquectel-my.sharepoint.com/:b:/g/personal/asean-fae_quectel_com/EQf4_nPum7lLrS25Ts65W1wBTHv9Cw63dEooPBsGVmzajg?e=OASU9Q

@dmajewski I have not tried it with MQTT stack of MC60, but have sent and received binary data to a MQTT broker via SSL functionality of MC60 module and to me there should be no issues in sending binary data via QMTPUB command/

Dear Sir,
You can have a try to send binary data via command QMTPUB, if you meet any issue, please tell us, we will try our best to help you to solve it. Thanks!

@Kyson i am not able to open that link , Can you send Again ??

https://cnquectel-my.sharepoint.com/:b:/g/personal/asean-fae_quectel_com/EQf4_nPum7lLrS25Ts65W1wBTHv9Cw63dEooPBsGVmzajg?e=OASU9Q

Thanks !

Dear Hardik,
Please click the following link to download it. Thanks!
Quectel_GSM_MQTT_Application_Note_V1.2.pdf (518.0 KB)

Did you succeeded to do that ?

Since with MQTT Publish, the data sent (after received the > char from the modem) can be binary, the issue is that end of data is Ctrl-Z so 0x1B code. So if your binary data contains 1B byte, it will discard the rest of the data.

I have the same question on BG96.
What if the Binary data contains control characters such as 0x1B, 0x1A, 0x08, etc.?
Anyway to avoid this problem ?

Hi Motsuka:
For BG96 modules, If you want to send all the Binary data,you can do like this:


You can post messages with length so that characters will not be escaped.

Dear Winnie,
Thank you for your reply.

By using “msglen”, it is now possible to send the Binary data including control characters.

Dear Motsuka:
You are welcome. Please contact us again if you have any further questions. :slightly_smiling_face:

Hi all,

Sorry for opening this old topic.
But I think my question is relevant.

How can we register a will message containing binary data?

Is it possible to add a msg_len to the will configuration message?