Binary data transmission

I am trying to send data over LoRa every ten minutes from my end node device.

Here is dummy data:

char tx_buffer;
tx_buffer = 0x42;

While sending this command over LoRa, I see two options

char buffer[100];

Option1:
sprintf(buffer, "AT+SEND=PortNumber:%c", tx_buffer);

This when printed out is
AT+SEND=PortNumber:B

and B is sent out over LoRa and seen on Things Network as 0x42

Option2:
sprintf(buffer, "AT+SENDB=PortNumber:%u", tx_buffer);

This when printed out is
AT+SEND=PortNumber:66

and 66 is sent out over LoRa and seen on Things Network as 0x66

I wanted to understand if there was any merit in sending data here as text versus as binary. I see the same number of bytes on binary.

Maybe I am not thinking along right lines here. Any help would be much appreciated

The most compact format, which is better for your battery and the RF bandwidth shared by the community, is binary - once you start using text, it’s a slippery slope.

However it very much depends on which module you are using.

As an example, the RAK module uses at+send=lora:<port>:<data> The spec says they’d like it as a Hex string which they translate in to a binary format before sending. It’s done this way to facilitate transmission over a serial port.

So the key question here is, which module are you using?

I am working with STM32 Lora discovery kit which has a murata module. Also, I use I-Cube-LRWAN package