The main problem is that actually I have a uint8_t* data buffer. It an array and I only know Its size and Its pointer.
I want to sprintf the data from this pointer in a buffer like this :
void send_bin(uint8_t* binarypayload, uint8_t size, uint32_t mode)
{
char buffer[256];
sprintf(buffer, "AT+ZF=%s,%lu\r\n", binarypayload, mode);
HAL_UART_Transmit(&husart1, (uint8_t*)buffer, strlen((char*) buffer), 1000);
}
But on my uart I can only see the binary value on my uart:
þTÞ˜.
Where am I going wrong ?
Sorry I have forgotten to say that my datas is like :
uint8_t buffer[4] = {0x45, 0xAD, 0xEF, 0x5B};
And I want it to look like this on my uart :
AT+ZF=45ADEF5B,45
but I only have access to its pointer