Developing nRF52840-based devices that needs to act as both BLE Central and Peripheral.
I've seen examples for the Multi-Link Multi-Role aggregate , the NUS Multilink Star typology, and the Heart Rate Relay. They all seem to dedicate a single node/device to act as the Central/Peripheral and then have other Peripherals (only) or Centrals (only) connecting to them.
The idea for my final implementation is to have x number of devices receive commands from a mobile app (similar to how the aggregate example demonstrates). Just imagine something simple like a solitary LED changing color. I'd like to let the user pick from a list which light to blink. I would like to have all my devices be Multi-Role (both Central and Peripherals) and be able to connect to one another to distribute the commands (because the phone can only connect to one peripheral at a time).
I will not know how many devices the end user will have, it could be two, it could be a hundred. And there would be no dedicated central other than the phone.
I understand the connection limitation of one nRF52840 is 20, however it's also mentioned that each of those 20 could connect to 20 more, and so on and so on. So that one device could connect to 20 and each of those 20 to 20 more ( creating a small network).
So my questions are:
- Could all my devices be both Central and Peripheral?
- Meaning they'd share the same base code, same device name, same services, etc.
- Imagine the heart rate relay, only they are all acting as the relays, make sense?
- If this is possible, how do the devices determine who is central to what peripheral?
- If I'm looking at the aggregate example, it's listing in the mobile app all the available devices that are connected to the aggregate.
- So if I have two aggregate devices, who would be the primary central?
- And would they both be able to pass on their lists of devices to the mobile app?
- If I'm looking at the aggregate example, it's listing in the mobile app all the available devices that are connected to the aggregate.
It seems to me this should be rather simple, but I can't find an example that shows this being possible.
Am I making this more complicated than it needs to be?
If this isn't clear, let me know so I can clarify.
Thank you!