Hello CYPRESS Community!
So I have been trying to read the RSSI value from the peripheral device using a central device.
Once the connection is established between the two devices:
PS: I am using CYBLE-416045-02 module PSoC 6 prototyping kit.
i have included the following statements in my code:
apiResultRssi = Cy_BLE_GetRssiPeer(conn_handle.bdHandle);
printf("The RSSI value is %X\r\n", rssipara.rssi);
if(apiResultRssi != CY_BLE_SUCCESS)
DEBUG_BLE("Cy_BLE_GetRssiPeer API Error: %xd \r\n", apiResultRssi);
rssi_param = (cy_stc_ble_rssi_info_t*)(((cy_stc_ble_events_param_generic_t*) eventParam)->eventParams);
printf("RSSI value is %02x \r\n",rssi_param->rssi);
and declared the variables as follows:
cy_en_ble_api_result_t apiResultRssi = CY_BLE_SUCCESS;
Results obtained it is giving an constant outpuyt of
The RSSI value is FFFFFFFC
RSSI value is ffffffc9
Am i reading the right rssi value? and why is that i am getting in hex how do I print the right decimal equivalent value?
I could find out that %d would give the value