This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Multiple buttons devices controlling multiple output devices using BLE

Hi,

I have an application where I have for example 5 BLE transmitting devices . Each device has one push button and each device is assigned to a number 1-5. I also have 10 BLE receiving devices, each comes with a simple LCD. In my application, whenever a button is pressed, it should transmit to all the BLE receivers and display the button number on the LCD.

I need to implement this using BLE and not other wireless protocols. Can anyone advise on how this can be best implemented? I am using this in a small office environment (max distance between devices is 30m with 1 wall in-between). Will the multi-link-multi-role demo be a good starting point for this?

https://github.com/NordicPlayground/nrf52-ble-multi-link-multi-role

What BLE services do I need? Or what modifications to the example do I need to make?


Thanks in advance.

  • One BLE Central role can connect to multiple BLE Peripheral roles.

    Once a BLE connection is established, the Centrals and Peripherals can both equally transmit and receive.

    If you can assign one device as a BLE Central, (effectively a "master" of the system), then that BLE Central would initiate connections with all BLE peripherals, and then you are off the races

    With this approac, your 5 "push button" BLE peripherals would report a button press back to the Central, and the Central would relay message onto the 10 "LCD" devices.

    Possible, but awkward. Also, establishing 15 concurrent connections would be a major stretch. The Central could connect / poll / disconnect from each device, and that would work.

    -------------

    In your scenario, you are likely looking for something like BLE Mesh functionality.

    .

  • I was initially thinking of mesh, but the implementation looks too complicated for me to understand. I figured that I might not need long range so I will want to avoid mesh if possible.

  • The softdevice can support up to 20 concurrent links in any role, so you should be able to do this with connections from each of the 10 LCD devices to each of the 5 button devices.

    You can start with the example you suggest, but this does not implement multi-peripheral features, only multi-central. You can also use the BLE Multiperipheral and BLE Multi-link Central examples in the SDK.

  • Hi Jorgen,

    I don't quite understand what you mean by the  ble-multi-link-multi-role example not implementing multi-peripheral features? 

    In my application, are the button devices configured as perpherial and the LCD devices configured as central? Are you suggesting that each LCD device can connect and receive press status from each button device?

    I initially though I would need like a central devices (something like a relay hub) and all the LCDs and buttons connect to it (up to 15 devices in total). And the hub helps to relay message from button to LCD.

  • You can configure all devices in any role (peripheral or central), but having the buttons as peripherals and the LCDs as centrals makes most sense to me. Since we support up to 20 connections, each of the LCDs can connect each of the buttons, but you should be aware that each connection will increase the current consumption (more packets needs to be sent to keep connection alive with all connected devices). If you implement a central gateway (main powered), both buttons and LCDs only need to maintain a single connection, reducing the average current consumption.

Related