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

non connectable advertise get error in SDK9.0.0

non connectable advertise success when in SDK 8.0.0, however I got error code 0x00000007 when upgrade to SDK 9.0.0.

I find out error code 7 is NRF_ERROR_INVALID_PARAM, which params is wrong in SDK9 ? How to fix it? Thank you !

Below is the code:

#define NON_CONNECTABLE_ADV_INTERVAL    320
#define APP_CFG_NON_CONN_ADV_TIMEOUT    900
   static void advertising_nonConnect_init(void){
		
	  uint32_t err_code;
		ble_gap_adv_params_t adv_params;
    memset(&adv_params, 0, sizeof(ble_gap_adv_params_t));
    adv_params.type        =BLE_GAP_ADV_TYPE_ADV_SCAN_IND; //BLE_GAP_ADV_TYPE_ADV_NONCONN_IND;
    adv_params.p_peer_addr = NULL;                             
    adv_params.fp          = BLE_GAP_ADV_FP_ANY;
    adv_params.interval    = NON_CONNECTABLE_ADV_INTERVAL;
    adv_params.timeout     = APP_CFG_NON_CONN_ADV_TIMEOUT;

    err_code = sd_ble_gap_adv_start(&adv_params);
    APP_ERROR_CHECK(err_code);
}
Parents Reply Children
  • Hi,

    The Bluetooth Core spec 5.0 says this. Does it mean that it should not be discoverable when it is advertising in Non-discoverable mode. The question i am asking is about BLE not BR/EDR.

    9.2.2 Non-Discoverable Mode
    9.2.2.1 Description
    A device configured in non-discoverable mode will not be discovered by any
    device that is performing either the general discovery procedure or the limited
    discovery procedure.

    Thanks

    vinod kumar

Related