This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to print an array using NRF_LOG_INFO

Hallo everyone,

I am reciving a notification from my server, which lenght can be 8, 20, 30 bytes but when I want to display the info using NRF_LOG_INFO is not printing out the whole notification, only one byte

I use the following code to save the data and printting it out

    for (int i = 0;i <p_ble_gattc_evt->params.hvx.len; i++ )
	{
		valor[i] = p_ble_gattc_evt->params.hvx.data[(p_ble_gattc_evt->params.hvx.len-1)-i];
	}

	NRF_LOG_INFO("Sensor %d %.40X \r\n",(number_sensor +1 ),*valor);

I dont want to interate the NRF_LOG_INFO because the data from the notification is not clearly seen.

Regards, David Caraveo

Related