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

    Can you explain what exactly you'd like to achieve so that I know what assistance you need? Also, please explain the following in your advertising_init() function:

    • Have you checked (by debugging) that the FAST and SLOW if-loops you are using are executed as expected in your init function?
    • What are you using the "Copy advertising data" function for exactly?

    Best regards,

    Simon

  • I would like to advertise data in non connectable and non scannable mode, and to update it when I receive new data from UART bus. 

    What are you using the "Copy advertising data" function for exactly?

    If you are talking about the Copy advertising data, there is first the initialization of my handle if it is not made, then I put 31 in len, because it is an imput parameter of the encode function, to  specify the maximum size, and finally I will encode my advertising data. 

    Have you checked (by debugging) that the FAST and SLOW if-loops you are using are executed as expected in your init function?

    Yeah, it works well. 

Reply
  • I would like to advertise data in non connectable and non scannable mode, and to update it when I receive new data from UART bus. 

    What are you using the "Copy advertising data" function for exactly?

    If you are talking about the Copy advertising data, there is first the initialization of my handle if it is not made, then I put 31 in len, because it is an imput parameter of the encode function, to  specify the maximum size, and finally I will encode my advertising data. 

    Have you checked (by debugging) that the FAST and SLOW if-loops you are using are executed as expected in your init function?

    Yeah, it works well. 

Children
Related