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

Is it possible for a central device to connect to multiple peripheral devices to simultaneously stream data via Nordic UART profile?

I'm trying to stream data in real time from 4 different sensor units to my computer. Each of these sensor units has an NRF52 module that sends data at 50 packets per second. Each packet is 20 byte sized. I've configured another NRF52 DK as central that connects to all the 4 sensor units at the same time. Is it possible for the central device to read data from all the 4 sensor units simultaneously?

I tested the Nordic UART example code for a single central - peripheral link and it works fine. How do I implement the same for multiple central peripheral - links?

P.S. Multilink central example did not really help, although I'm able to just connect to multiple sensors after a few modifications in the code.

  • So each link require a throughput of 8kbps.

    In the BLE data throughput chapter in the S132 SDS you can see that as a client it is capable of receiving notifications from 8 servers at a rate of 9.1kbps. So 4 servers shouldn't be a problem.

    We don't have an example for NUS central with multiple connections, but it shouldn't be too hard to implement.

    You could do something like this:

    1. Scan
    2. Connect
    3. Do service discovery
    4. Enable notification
    5. Jump to 1. until all devices are connected.

    The Nordic UART Service client library doesn't like many connection handles, but I think you can use this workaround.

    Give it a try, if you get into trouble, I think you should add a new question explaining what you have done, and attaching your complete project.

Related