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

nrf52 Advertising Extensions S132 6.1.1

Hi,

I'm currently trying to use advertising extensions with my nrf52832. However once I use the 

BLE_GAP_ADV_TYPE_EXTENDED_CONNECTABLE_NONSCANNABLE_UNDIRECTED
type for the ble_gap_adv_params_t properties I get an error at sd_ble_gap_adv_set_configure.
Is there any example available that shows how to do this with softdevice?
Thanks.
Parents Reply Children
  • Yeah I already took a look at that but it uses a different configuration approach. I would like to use the ble_gap_adv_params_t so I can keep my already made project structure. I do indeed get the NRF_INVALID_PARAMS error.

    ble_gap_adv_params_t adv_para =
      {
        .properties    = { .type = _type, .anonymous  = 0 },
        .p_peer_addr   = NULL                     , // Undirected advertisement
        .interval      = interval                 , // advertising interval (in units of 0.625 ms)
        .duration      = (uint16_t) (timeout*100) , // in 10-ms unit
    
        .max_adv_evts  = 0                        , // TODO can be used for fast/slow mode
        .channel_mask  = { 0, 0, 0, 0, 0 }        , // 40 channel, set 1 to disable
        .filter_policy = BLE_GAP_ADV_FP_ANY       ,
    
        .primary_phy   = BLE_GAP_PHY_AUTO         , // 1 Mbps will be used
        .secondary_phy = BLE_GAP_PHY_AUTO         , // 1 Mbps will be used
          // , .set_id, .scan_req_notification
      };
    
      // gap_adv long-live is required by SD v6
      static ble_gap_adv_data_t gap_adv =
      {
          .adv_data      = { .p_data = _data, .len = _count },
          .scan_rsp_data = { .p_data = getData(), .len = sr.count() }
      };
      ret = sd_ble_gap_adv_set_configure(&_hdl, &gap_adv, &adv_para);

    that's the way I setup my advertisements. _type is BLE_GAP_ADV_TYPE_EXTENDED_CONNECTABLE_NONSCANNABLE_UNDIRECTED.

  • Hi,

    I do not see any problem with these parameters. Could it be something with the advertising data? (that is also checked by the SoftDevice). Can you upload a completed project so that I can test on my side with the exact same settings and advertising data?

Related