Hello guys,
I have a problem with the class RadioEvent.
if (flags->Bits.Rx) {
logDebug(“Rx %d bytes”, info->RxBufferSize);
if (info->RxBufferSize > 0) {
// print RX data as string and hexadecimal
std::string rx((const char*)info->RxBuffer, info->RxBufferSize);
printf(“Rx data: %s [%s]\r\n”, rx.c_str(), mts::Text::bin2hexString(info->RxBuffer, info->RxBufferSize).c_str());
}
}
When my gateway send a message without caractere null, the code work but when there is a caractere null, the first %s doesn’t post a complet message and then the second %s post a complet message in hex.
I want receive a string message. How i can resolve this problem to receive a complet message in string ?
Thanks you