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

How a central BLE device can read data from multiple BLE devices simultaneously?

Firstly, I am a very beginner in the BLE domain. I have very little knowledge of it.

I want to do a project where multiple BLE peripheral devices(nRF52) will communicate with a central BLE device(Andriod phone). Each peripheral device collecting data from the different sensors, like first peripheral interfacing with humidity sensor second peripheral device interfacing with a light sensor so on.

I have the nRF52 development board. I need to collect data from all peripheral devices into my central device. As much I know that I a central device can communicate with multiple devices but I can't talk simultaneously.

So, I want to know how I can achive my goal. It will be best if I can collect the data from different peripherals simultaneously. If it is not possible to collect the data simultaneously then what architecture I should follow to achieve my objective? If any other chip can do ths then please refer me.

How many peripherals devices can talk with a central device? I meant the maximum limit of connection. Thank you for your time and consideration.

Parents
  • I am a very beginner in the BLE domain

    Do you have experience with microcontrollers in general?

    Each peripheral device collecting data from the different sensors

    Unless the sensors need to be in different locations, why not connect all the sensors to one nRF52 ... ?

    As much I know that I a central device can communicate with multiple devices but I can't talk simultaneously.

    Do they really need to be simultaneous?

    Any microcontroller can only do 1 thing at a time; but they can do things in quick succession - which is usually "close enough".

    How many peripherals devices can talk with a central device?

    The SoftDevice can support up to 20 simultaneous connections - how many do you need?

    The SDK contains a multi-link example:

    https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/ble_sdk_app_multilink.html

    But, as a "very beginner", I would suggest that you don't jump straight into that - spend some time with the basic examples first to gain familiarity with BLE in general, and the Nordic product & tools in particular ...

  • Do you have experience with microcontrollers in general?

    Yes, I have.

    Unless the sensors need to be in different locations, why not connect all the sensors to one nRF52 ... ?

    Yes, each sensor is in a different location so I need on nRF52 for each sensor.

    Do they really need to be simultaneous?

    Actually, in my case, each sensor's data is important and the same priority.

    Let's assume in a case.. when the central device talking with an nRF52 in that time another nRF52 has to talk with central devices. In that case, either central device will stop talking with the first nRF52 and it will start talking with the second nRF52 or it will continue talk with the first one thereafter it will talk with the second one.

    But in both cases, data might lose cause when the central device switching from one peripherals device to another peripherals device if another sensor data will come on that instance then the current data will overwrite the previous data. If the number of peripherals device much then the probability of data loss is high.  I am thinking of worst-case scenarios.

    But in normal, sensor data will not come within a fraction of second or microsecond and if the central device's throughput then it can be overcome. 

    Using  RTOS, threading we can achieve parallel processing. I have asked the question in the wrong way, I am sorry for that. 

    The SoftDevice can support up to 20 simultaneous connections - how many do you need?

    I need 8 device

  • Using  RTOS, threading we can achieve parallel processing

    Not on a single core CPU, you can't !

    You achieve the illusion of parallel processing by switching between tasks/threads - only one is actually active at a time.

    data might lose cause when the central device switching from one peripherals device to another peripherals device if another sensor data will come on that instance

    So you have to buffer the data while waiting to send it.

    These are all basic concepts - not really specific to BLE or Nordic.

Reply
  • Using  RTOS, threading we can achieve parallel processing

    Not on a single core CPU, you can't !

    You achieve the illusion of parallel processing by switching between tasks/threads - only one is actually active at a time.

    data might lose cause when the central device switching from one peripherals device to another peripherals device if another sensor data will come on that instance

    So you have to buffer the data while waiting to send it.

    These are all basic concepts - not really specific to BLE or Nordic.

Children
Related