Reputation: 2173
I have an IoT device which I wish to implement:
A mobile app - where the phone is the master when communication is initiated by the user's phone
A remote key - where a click on said key should make the iot device do something. The remote key should be paired one time with the iot device.
Now, the issue that I'm experiencing is that I can not communicate with both. I would like to enable connection with the mobile app at all time, but I would also like to listen for a click on the remote key at all time (unless I'm connected to the app).
What would be the best architecture for such communication? Who would be the master and who would be the slave? Should I use a beacon device for the remote key? What's the best practice here?
Upvotes: 1
Views: 368
Reputation: 11057
Depending on the BLE stack, a device can certainly be a Central and a Peripheral at the same time (the use of 'Master' and 'Slave' is inaccurate here).
If I understand correctly, you have 3 devices - a phone, a key, and an IoT Device. There are several options here:
Upvotes: 2