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

Non-connectable advertisement while scanning as a Central

Is it possible to advertise in non-connectable mode while scanning/connecting/connected as a Central?

  • I wasn't clear. Start non connectable advertising -> stop -> start connectable advertising using ble_advertising_init/ble_advertising_start (your BLE Advertising library). The problem appears to be in using the library after manually initializing advertising data and params outside of the library (doesn't matter if the advertising is stopped in between).

  • Did a quick test and saw no issues:

    advertising_init();    //from ble_app_template example
    err_code = ble_advertising_start(BLE_ADV_MODE_FAST);    //from ble_app_template example
    APP_ERROR_CHECK(err_code);
    
    nrf_delay_ms(5000);
    
    err_code = sd_ble_gap_adv_stop();
    APP_ERROR_CHECK(err_code);
    
    advertising_beacon_init();    //advertising_init() from ble_app_beacon example
    err_code = sd_ble_gap_adv_start(&m_adv_params);
    APP_ERROR_CHECK(err_code);
    

    As this discussion is not related to the original question anymore I suggest that you make a new question.

Related