Hello,
I used nrf52832 as a scanner.
Now i use it to scan only one tag. And the TAG advertise data addcoring to ble 4.0.
Now i find scan channels are not 37,38,39,37,38,39,.......they are like this: 37 37 37 37....(about 3 seconds)...38 38 38...(about 3 seconds)....39 39 39...(about 3 seconds)..37 37.37........
But it is right by ble sniffer to see the channel map.
My program like it:
static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context)
..............................
switch (p_ble_evt->header.evt_id)
{
case BLE_GAP_EVT_ADV_REPORT:
data_t adv_data;
// printf("aA\r\n");
ble_gap_evt_adv_report_t adv_report = p_ble_evt->evt.gap_evt.params.adv_report;
// Initialize advertisement report for parsing.
adv_data.p_data = p_ble_evt->evt.gap_evt.params.adv_report.data.p_data;
adv_data.data_len = p_ble_evt->evt.gap_evt.params.adv_report.data.len;
rssi_positive = ~(adv_report.rssi)+0x01; //abs();
ch_number = adv_report.ch_index;
if((adv_report.peer_addr.addr[5]==0xF4)&&(adv_report.peer_addr.addr[4]==0x32))
{
printf("%d",ch_number);
printf("\r\n");
}
Wait for your reply.
Thanks
LIU