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

Selectively Connecting To Devices

I have an nrf51822-mkit.

Let's say there are 2 BLE phones continuously searching for my module. Phone 1 connects and communicates with the module. The modules determines that this phone is not the correct phone, so it initiates a disconnect. When Phone 1 senses that it has been disconnected, it immediately starts scanning again for the device to connect to. But the module already knows Phone 1 is incorrect, and it would like to try to connect to Phone 2 instead. However, Phone 1 could continually keep trying to connect to the module to check if it's the correct phone.

Ideally, I would like to implement a sort of temporary blacklist. The module would check the phone, and if it's incorrect get the address of the phone, add it to a blacklist, and prohibit connections to devices that are on that blacklist. After, say, 30 seconds the device would be removed from the blacklist.

I have 2 questions:

  1. How do I go about getting the address of the BLE device (phone) from my module so that it can be added to a blacklist and checked later?

  2. Is it possible to prohibit certain addresses from ever connecting? Or does this have to be taken care of with logic after the connection (e.g. if the address matches a blacklisted address after connection, immediately disconnect). If the latter is the case, is it possible for one device to continuously connect and disconnect, prohibiting other devices from trying?

If anyone has any ideas on how best to implement this, I would very much appreciate them.

Parents Reply Children
No Data
Related