How to mqtt publish data in hex mode on BC-660?


I want to publish data to an mqtt topic but the data is in byte format (byte array). This comes from a C program on a MCU through UART.
I can send the data in text mode. It publishes successfully, I can see the data on my mqtt client but the response is garbage. I don’t receive OK or ERROR, just an unidentified unicode character.
I see in the mqtt application note that there is a way to send the data in hex mode. I’ve tried it but it does not work. I get ERROR and no data is published to my client.


// Open and Connect to MQTT //

// Connect to MQTT
> Sent data in bytes


What is the best way to send my byte array through MQTT in hex?

The module supports both hexadecimal and string formats, please provide a complete log