I want to have a few peripheral BLE devices connected to a single central, but I'm struggling with little implementation details and snags.
The peripherals are listening for something to happen ( a button press ) and when it occurs, the service they're running gets updated and any subscribed central will hear it.
Do I need to .connect() the peripheral and the central for this to happen? Will it be able to distinguish which device updated the service, and talk to that device specifically? How would I implement that?
Let's say the peripheral, after updating the service, goes into a state where it is waiting for a reply. Upon receiving a reply, it will do a thing and start listening again. Should that be a subscription pattern, or would I want to do an actual active connection with like while(peripheral.connected()) ? What if a device wants to connect while there is an active connection?