Hey all,
I'm trying to get the Nordic UART service with the nRF Toolbox App (Android). But always when I send "Hello" from the nRF Toolbox App, for example, I don't only get "Hello". In putty I can see something like "Hello," or "Hello▒" for example. So I can not use strcmp properly.
Here is how I receive the data:
static void nus_data_handler(ble_nus_evt_t * p_evt)
{
if (p_evt->type == BLE_NUS_EVT_RX_DATA)
{
NRF_LOG_DEBUG("Received data from BLE NUS. Writing data on UART.");
NRF_LOG_HEXDUMP_DEBUG(p_evt->params.rx_data.p_data, p_evt->params.rx_data.length);
printf("\r\nReceived: %s\r\nSize: %d", (p_evt->params.rx_data.p_data), sizeof(p_evt->params.rx_data.length));
}
}
}
Can someone help me with my problem? What am I doing wrong?
Kind regards