CYBT-343026-EVAL: How to display the received data from a BT device in the debugging UART?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Greetings,

After having sucessfuly connected the bluetooth module with other bluetooth enabled devices such as an android phone or a PC and being able to send data to them via SPP, I am currently trying to send messages from these devices to the module.

I am periodically sending the module a byte in hexadecimal format (0x10) from my phone.

In the debug UART I see that all the callback functions are called as expected. However, the "WICED_BT_TRACE("   spp_data_cb: %x, %d \n", p_data, len );" inside the "hci_control_spp_rfcomm_data_callback" function gives everytime a different value for the "p_data" field.

Since I'm always sending the same message, shouldn't it be the same everytime?

I'd like to be able to display the exact value of the byte received by the module. Any idea on how could I do it?

Thank you in advance.

Regards.

0 Likes
1 Solution
Anonymous
Not applicable

I think there's a mistake. p_data is a void pointer. So, when you are accessing the value, it should be p_data[0].

View solution in original post

1 Reply
Anonymous
Not applicable

I think there's a mistake. p_data is a void pointer. So, when you are accessing the value, it should be p_data[0].