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

To be in Non-scannable non-connectable mode

Hi, 

I am on SDK 15.2 and NRF52832. I think that I am quite stupid because I do not succeed to be in Non-scannable non-connectable mode.

I tried few stuffs, change directly the line from the ble_advertising_init from ble_advertising library like that : 

p_advertising->adv_params.properties.type = BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED;

But I am still at the same point. I Have tried also to add these lignes after the ble_advertising_init call in my advertising_init function : 

err_code = ble_advertising_init(&m_advertising, &init);
    APP_ERROR_CHECK(err_code);

    //We modify few parameters from ble_advertising_init //AKR
m_advertising.adv_params.properties.type = BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED;
ret = sd_ble_gap_adv_set_configure(&m_advertising.adv_handle, NULL, &m_advertising.adv_params);

But even with these changes, when I use some sniffers, like NRF connect, I can see that I can connect to my device, and I have a scan response. 

Can you help me?

Parents
  • Hi

    I see that you have commented out the advdata.flags. You need advertising flags as part of your advertisement according to the Bluetooth Spec.

    If you just need NONCONNECTABLE_NONSCANNABLE advertising, I suggest basing your application on the beacon example, instead of trying to modify one of the others to do that. 

    Best regards,

    Simon

  • I see that you have commented out the advdata.flags. You need advertising flags as part of your advertisement according to the Bluetooth Spec.

    I have uncommented it, no changes. 

    If you just need NONCONNECTABLE_NONSCANNABLE advertising, I suggest basing your application on the beacon example, instead of trying to modify one of the others to do that. 

    I did that, i have copied the code from the Beacon example, the advertising_init, but I had errors on the encode et sd_configure. I need others pieces of code, so I cannot take all the code from this example. 

Reply
  • I see that you have commented out the advdata.flags. You need advertising flags as part of your advertisement according to the Bluetooth Spec.

    I have uncommented it, no changes. 

    If you just need NONCONNECTABLE_NONSCANNABLE advertising, I suggest basing your application on the beacon example, instead of trying to modify one of the others to do that. 

    I did that, i have copied the code from the Beacon example, the advertising_init, but I had errors on the encode et sd_configure. I need others pieces of code, so I cannot take all the code from this example. 

Children
No Data
Related