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.

  • All advertising packets can be received by any scanner, and it is hence up to the filtering done on the scanner to decide whether or not a device is shown. Even when advertising with just BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED (neither Limited nor General discoverable), some scanners may choose to show this device when scanning, and there isn't anything you can do to avoid this. This is what's called "Non-discoverable Mode" in section 9.2.2 in Volume 3, Part C of the Core Specification.

Reply
  • All advertising packets can be received by any scanner, and it is hence up to the filtering done on the scanner to decide whether or not a device is shown. Even when advertising with just BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED (neither Limited nor General discoverable), some scanners may choose to show this device when scanning, and there isn't anything you can do to avoid this. This is what's called "Non-discoverable Mode" in section 9.2.2 in Volume 3, Part C of the Core Specification.

Children
No Data