Other Parts Discussed in Thread: CC2540
Hi,
I'm trying to program a device in peripheral mode which shall select its central-device from a priority list. So like sending out open advertising, waiting for a while and then refuse every request but the one from the one's available that has the highest priority.
I thought about using a multi-role peripheral+observer and the central device using broadcast+central so the peripheral can find available devices and send a directed advertisement, but as the central device shall be a smartphone for example with android and android only supports peripheral/broadcast mode since version 5.0 this would only be a partial solution.
My next idea is to connect once to every single device collect its address and disconnect again. the disconnected master devices shall not try to connect for a while. When there are no more master devices responding to the advertising, the peripheral will check the priority list and send out a directed advertising to the master with the highest priority. if no device from the list is available, the peripheral will use undirected advertising and connect with whoever wants to.
But I'm not sure if this is the easiest way to go and if it really is achievable so I'd be thankful for any advice.
I'm using the cc2540 on a custom board derived from the ti blelights example. The lights shall be controlled by a custom android/ios app.
Thanks
Robin