Readimg RSSI value in PSoC 6 Prototyping kit

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

cross mob
chsrc_3700256
Level 3
Level 3
10 replies posted 5 replies posted 5 questions asked

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);

            }

case CY_BLE_EVT_GET_RSSI_COMPLETE:

        {

            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;

cy_stc_ble_rssi_info_t *rssi_param;

Results obtained it is giving an constant outpuyt of

The RSSI value is FFFFFFFC

RSSI value is ffffffc9

Questions:

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?

WangS_81MeenakshiR_71PSoC SoftwarePSoC 6 MCU Community

0 Likes
1 Solution
chsrc_3700256
Level 3
Level 3
10 replies posted 5 replies posted 5 questions asked

I could find out that %d would give the value

View solution in original post

1 Reply
chsrc_3700256
Level 3
Level 3
10 replies posted 5 replies posted 5 questions asked

I could find out that %d would give the value