Hello, this is my first post in here.
I'm trying to read the TX_POWER information of my beacons.
I'm able to read this info using the nRFConnect app on my phone no problem, but when I'm using the board I'm not being able to.
void bleEvtHandler(ble_evt_t const* p_ble_evt, void* p_context) {
uint16_t conn_handle = p_ble_evt->evt.gap_evt.conn_handle;
uint16_t role = ble_conn_state_role(conn_handle);
if ((role == BLE_GAP_ROLE_CENTRAL) || (p_ble_evt->header.evt_id == BLE_GAP_EVT_ADV_REPORT)) {
onBleCentralEvt(p_ble_evt);
}
}
void onBleCentralEvt(ble_evt_t const* p_ble_evt) {
ble_gap_evt_t const* p_gap_evt = &p_ble_evt->evt.gap_evt;
uint8_t uuid[27];
switch (p_ble_evt->header.evt_id) {
case BLE_GAP_EVT_ADV_REPORT:
printf("Advertise received :\r\n");
memmove(uuid, p_gap_evt->params.adv_report.data.p_data, p_gap_evt->params.adv_report.data.len);
printf("Data LEnght: %d \r\n",p_gap_evt->params.adv_report.data.len );
printf("TX_POWER: %d\r\n", p_gap_evt->params.adv_report.tx_power);
printf("RSSI: %d\r\n\r\n", p_gap_evt->params.adv_report.rssi);
break; // BLE_GAP_ADV_REPORT
default:
break;
}
}so far I'm able to get all the informations but the TX_POWER, its always 127 which I think it means invalid.
Yes I've set the TX_POWER information on the beacons and once again I can read them just fine on nRFConnect.
Thank you for your time!