How to use MQTTPUB or MQTTPUBSEND to send binary data?

I’m using wizfi360 module, with fw version
it is correctly connected on MQTT server.
1-MQTTPUBSEND=15\r\n return always ERROR
2-MQTTPUB=“xxxxxx”\r\n alway work correctly if xxxxx is an ASCII string, if i try to send binary data I have a lot problems: I can’t trasmit 0x00,0x08,0x0A

this is my code
for (i = 1; i < 256; i++) {
if (i != 10 && i != 8)
It works correctly if I don’t send 0,8,10 otherways it stops sending.

How can i solve this problem?

Hello, this is scarlet.
First of all, [MQTTPUB] is a command used for general strings.
It is correct to use the [MQTTPUBSEND] command for binary data.
I am attaching the screen that I tested here.

It appears that you have written code to send a message from the MCU via UART.
If you’re using a module, have you tried sending commands using a serial program (ex. tera term)?
When developing with WizFi360, we recommend verifying the command transmission process with a serial program before proceeding with development on the MCU side.
If there’s an issue when testing with the serial program, please attach the log and feel free ask to me.