Hi sir In the Developed zone, I found how to read RSSI value as below. According to nRF51822 RM, RSSISAMPLE would be 0~ 127. Actual RSSI is – (RSSISAMPLE) dBm. But, I found the value I read out seems like a 2’s complement byte. The value I read is all over 128, like 210,197, 187, 182 and so on. (from near to far away). It’s correct? Thanks.
static void on_ble_evt(ble_evt_t * p_ble_evt) { uint32_t err_code; static ble_gap_evt_auth_status_t m_auth_status; ble_gap_enc_info_t * p_enc_info;
switch (p_ble_evt->header.evt_id)
{
case BLE_GAP_EVT_CONNECTED:
m_conn_handle = p_ble_evt->evt.gap_evt.conn_handle;
sd_ble_gap_rssi_start(m_conn_handle); //JEFFERY Start RSSI measurement
break;
//JEFFERY RSSI measurement
case BLE_GAP_EVT_RSSI_CHANGED:
rssi_value = p_ble_evt->evt.gap_evt.params.rssi_changed.rssi;
break;
}