Hello to all.
Please find attached the image that show architecture of the embedded system I'm working on.
As it can be seen there is one main embedded device (Hub) and a number of peripheral embedded devices. Number of mobile phones with installed application can communicate with the main embedded device, but there is no need to support simultaneously more than one connection with the mobile phones. Minimal setup will be one main device, two peripheral and one mobile phone. But user can add new peripheral device whenever he wants. I still don't know the maximum number of the devices, but lets say up to four peripheral devices.
Here are some observations that could help design the best architecture for this small BLE network that I want to design:
- All embedded devices should spend as little power as possible :)
- All embedded devices have CYBLE-022001-00 module on them.
- Mobile App should connect only to the Hub. Application will be written for both iPhone and Android devices.
- Only the Hub should be able to connect to the peripheral devices.
- Peripheral devices have no need to speak to one another. All communication goes through Hub (this can be changed if better solution exists).
- Only the user that bought the devices should be able to securely connect to the Hub (I guess some password mechanism).
- Peripheral embedded devices have sensors and buttons. In case that someone presses the button they need to notify the Hub. Hub then can initiate communication with them or with another peripheral embedded device and return some values. Hub also has a button. If someone presses it, he needs to establish communication with some of the peripheral devices (maybe all of them). User can via mobile App request something from Hub. Hub in return may look for that info from one of the peripheral devices.
- Hub must know that peripheral devices are alive and present. If they are not, he triggers the alarm sound. He should check that for about 10 times in a second.
- Let's say mobile phone app plays BLE Central role.
- Peripheral devices will sometimes be Broadcasters (when they say I'm here, I'm here..., Connect with me ASAP Connect with me ASAP...). I don't want to broadcast sensitive information into the air, that's way I would like to do it when connected with Hub. Does this make sense? And sometimes peripheral devices will be Peripherals (to enable Hub to connect to them).
- Hub obviously sometimes needs to be Central (when he needs to establish a connection with the peripherals) and sometime needs to be Peripheral (when user via mobile phone application wants to connect to it).
- Mobile phone can connect to the Hub, only when Hub advertises. When he is connected to the peripheral device then user can't connect to it, right?
- If the Hub is connected to the mobile phone app, can it then listen to peripherals who are broadcasting?
- As I see it, if the mobile app is central, and Hub breaks the connection (if he can do it) in order to connect ot some alarming peripheral devices, later on Hub can no longer initiate the connection with the mobile app. Or he can maybe also advertise You can connect with me, You can connect with me... Or the mobile app could be programmed that whenever it sees the Hub, it will automatically connect to it.
- What kind of mechanism to use to switch Hub from Central to Peripheral. Maybe App should play Peripheral BLE role?
- Could adding new peripherals into the system be made automatic, i.e. that Hub recognize new device and start communicate with it, without the user intervention i.e. so that user doesn't need to initiate some kind of pairing mechanism.
- Can BLE whitelist concept be utilized here? I guess peripheral devices should whitelist the Hub and allow only him to connect to them. When do you put the device in the whitelist?
- Hub is definitely the bottleneck here. How to setup him the best?
Obviously, I don't have experience with the design of wireless networks. Can any of you guys share their thoughts on this. I would appreciate that much. Be free to ask any question and make any suggestion.
BLE network question.png 54.8 K