This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Scan request with extended advertising

Hi,

I'm trying to send and receive scan request/scan response.  The system consists of 2 nrf52840, 1 central and 1 peripheral.  They both advertise and scan on 1M and coded PHY alternately.

I'm trying to get the central to send out a scan request, but the peripheral isn't receiving any scan request.  I have the following on peripheral side:

m_advertising.adv_params.scan_req_notification = 1;

and

          case BLE_GAP_EVT_SCAN_REQ_REPORT:  
          {
              NRF_LOG_INFO("SCAN REQ %d", valid_num_central);

On central side, I have:

static ble_gap_scan_params_t m_scan_params =
{
    .active   = 1, //scan req
    .interval = SCAN_INTERVAL,
    .window   = SCAN_WINDOW,
    .report_incomplete_evts = 0, 
    .extended = 1,
    .timeout           = SCAN_TIMEOUT,
    .scan_phys         = BLE_GAP_PHY_1MBPS | BLE_GAP_PHY_CODED, 
    .filter_policy     = BLE_GAP_SCAN_FP_ACCEPT_ALL,
    .channel_mask      = {0,0,0,0,0x00},
};

#define SCAN_INTERVAL 1280
#define SCAN_WINDOW 640
#define SCAN_TIMEOUT 0 

I'm using SDK 16.0.0, SD S140 7.0.1

Any suggestion would be appreciated.

Thanks,

Ken

Parents
  • Hi

    Sorry, I should have mentioned the nRF Sniffer to you in my reply. The fact that the device still advertises in "NONSCANNABLE" is likely why you're seeing this issue. Are you perhaps calling set_adv_mode_directed_high_duty() somewhere in your application, as that will cause the device to advertise in a "NONSCANNABLE" state. Maybe you haven't compiled and built the peripheral project after you changed the application to use SCANNABLE advertising.

    Best regards,

    Simon

Reply
  • Hi

    Sorry, I should have mentioned the nRF Sniffer to you in my reply. The fact that the device still advertises in "NONSCANNABLE" is likely why you're seeing this issue. Are you perhaps calling set_adv_mode_directed_high_duty() somewhere in your application, as that will cause the device to advertise in a "NONSCANNABLE" state. Maybe you haven't compiled and built the peripheral project after you changed the application to use SCANNABLE advertising.

    Best regards,

    Simon

Children
Related