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

[NRF51822] How to set device to Non-discovery Mode?

I have 3 questions: 1. How to set device to non-discovery mode? 2. Once the device is in non-discovery mode, How can host connect to it? 3. Can I use Master Control Panel to connect device which is in non-discovery mode?

Parents
  • What exactly do you mean by "non-discovery mode"?

    If you just mean to send advertising packets, but not be neither General Discoverable nor Limited Discoverable, this is done just by not using those flags when setting the advertising data, i.e. using BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED and not BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE or BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE.

    However, if you mean to not send advertisement packets at all, you'll have to either explicitly stop advertising using sd_ble_gap_adv_stop() or wait for a timeout, and in this case, no device will be able to connect to you.

  • Thank you for your reply. I mean, if there's a way to make host can connect to my nrf51822 device, and also to make nrf51822 device not be displayed in the ble device list of host? BTW, if I use BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED to set advertising data, what mode is my device actually in? I try to do this, It can still be displayed in MCP.

Reply Children
No Data
Related