How do you intend to realize this scenario in practice? There is something known as the whitelist where the central will accept connections from devices on this list. Check out this blog:
I read and understood that blog.
when hello sensor is advertising with no whitelist, any devices can scan and connect to hello sensor.
on the other hand, is advertising with whitelist specific address, only device have the specific address can scan and connect to hello sensor.
um,,.i have a question.
in my code, device do both scanning and advertising at the same time.
(advertisng start with bleprofile_Discoverable(HIGH_UNDIRECTED_DISCOVERABLE, NULL)
and scanning start with blecen_Scan(HIGH_SCAN))
in my test,
when i set white list, white list affect both scanning and scanning.
assume that A device(address:aaaa) and B device(address:bbbb), and device A setted white list,"bbbb"
in this situation, follow things are founded
1) A device scan only adv of B device. adv of any other devices are not reported.
2) B device, phone and other bluetooth device can scan adv of A device
3) but "connecting to A device" is not allowed any other devices, except B device.
I confuse whether whitelist affect advertising or scanning
The above blog described the addition/removal of addresses on the peripheral/sensor.
I assume your device A is a sensor and device B is a central. And B's address has been included on the whitelist stored in device A.
Now, A being a sensor will broadcast, B being a central will scan. B can also see other sensors other than A.
As A has a whitelist to follow, it will only accept incoming connection requests from members on its whitelist, and in this case B only.
Let me know for any further clarifications.