The BLE has different features for doing this, you can use the white list and dont accept scan requests or connection request from anyone besides the devices in the white list or you can use the directed advertising feature, or you can even check the bd address of the device that just connected with you and immidiatelly issue a disconnection event via using software. The implementation depends on your application and what you would like to do. For more info regarding the white list you can have at the RW-BLE-GAP-IS or you can have a look at the keyboard reference design that uses the white list.
Hi RandyYu,
The BLE has different features for doing this, you can use the white list and dont accept scan requests or connection request from anyone besides the devices in the white list or you can use the directed advertising feature, or you can even check the bd address of the device that just connected with you and immidiatelly issue a disconnection event via using software. The implementation depends on your application and what you would like to do. For more info regarding the white list you can have at the RW-BLE-GAP-IS or you can have a look at the keyboard reference design that uses the white list.
Thanks MT_dialog
If I set .app_on_connection = NULL. Can it ignore/reject any connect request?
yes, the link would not be established. But it is still suggest to use the direct-connect adv or non-connect adv
change ADV_CONN_UNDIR to ADV_NONCONN_UNDIR?
正确的