14 Replies Latest reply on Sep 12, 2018 5:38 PM by mifo

    wiced_bt_dev_read_rssi not returning RSSI for BLE

    mkochhal

      Hi.

       

      I am using the BCM43341 reference platform and I am running the WICED-3.5.1 SDK.

       

      Unfortunately, whenever I call the wiced_bt_dev_read_rssi(), the callback from the lower layer never returns with a value ...

        

             static void                   device_ble_rssi_status_callback  ( wiced_bt_dev_rssi_result_t *p_status );

              wiced_result_t            device_read_rssi_status (wiced_bt_device_address_t remote_bda, wiced_bt_transport_t transport, device_dev_cmpl_cback_t *p_cback);

            

           wiced_result_t device_read_rssi_status (wiced_bt_device_address_t remote_bda, wiced_bt_transport_t transport, device_dev_cmpl_cback_t *p_cback)

           {

                    WPRINT_APP_INFO( ("Got request for RSSI status from remote ble client [%02X:%02X:%02X:%02X:%02X:%02X]\n", remote_bda[0], remote_bda[1],      remote_bda[2], remote_bda[3], remote_bda[4], remote_bda[5]) );

                    wiced_bt_dev_read_rssi (remote_bda, transport, p_cback);

                    return WICED_SUCCESS;

           }

       

           /*  device RSSI status report handler */

           static void device_ble_rssi_status_callback( wiced_bt_dev_rssi_result_t *p_status )

           {

               if(p_status != NULL) {

                   printf("Got RSSI = %d dB\n", ((wiced_bt_dev_rssi_result_t*)p_status)->rssi); 

               }

               return;

           }

       

       

       

             This is called every 10s ...

       

              /* read RSSI */

              device_read_rssi_status( p_status->bd_addr, p_status->transport, (wiced_bt_dev_cmpl_cback_t *) device_ble_rssi_status_callback );