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

How many connections nrf52840 / nrf52832 supports as peripheral?

Hello,


I want to connect some ammount of central devices to one peripheral.

nRF52840 or nRF52832 considering as peripheral. Latest SDK (15.0.0) will be used.

Connection will be established by BLE v4.0 (please note if it affects v5.0)


1) What is upper limit of connections (simultaneously)? Assume that centrals will be iOS / Android devices and some other BLE modules.

2) In case I have different bluetooth profiles on my peripheral ( it acts as server), does it can interact with multiple centrals (clients) with different profiles?

3) And what about same profiles for multiple centrals? For example, I have connected from 4 phones to peripheral and I want to know battery level on nRF side - can I use Battery service profile in same time for all 4 clients?

Regards!

  • Hello,

    1) the SoftDevice (Bluetooth Stack) specification for S132 (for nRF52832) and S140 (for nRF52840) both states that it supports a maximum of 20 connections. However, this is a theoretical limit, as you will spend all of the memory on handling these connections, so depending on your application, you will probably be able to get 15-16 connection.

     

    2) Bluetooth Low Energy operates with Characteristics grouped into Services, where the characteristic holds e.g. the battery level, or a variable that you can write to. If you change this characteristic from one connected device (central), it will be changed for all of the other devices as well. If you want to, you can have a characteristic that you can only write to, with no read access. This way you can send data to the peripheral (the nRF in your case), and none of the other connected devices will be able to see that.

     

    3) (continuation of 2) ) If you want to e.g. give the battery level to all devices, you can have this as a characteristic with read access, and enable notification on this characteristic from all the connected devices. If you change the value of this characteristic, then all the connected devices will be notified with the new value.

     

    Let me know if anything was unclear, or if you have any more specific questions.

     

    Best regards,

    Edvin

  • Thanks for explanation.

    Could you provide more clarification please?

    1) Does this value (theoretical 20) affects only peripheral role? In case nRF will acts as central, what is limit of connections (connecting to X peripherals at the same time)?

    2) In case I will use Nordic UART service, does peripheral (assume it connected to 10-15 phones for example) will receive all RX(sended from phones) packets properly? Or it may loss some of them if packets arrived nearly same time? Unfortunatelly, I'm not able to test it manually.

    Regards!

  • 1) From the softdevice specification: "Support for 20 links in total with freely selectable role (Central/Peripheral) for each link", so yes. That number can also be for connections where the nRF is the central.

    2) It will receive all the packets. It is ensured by the BLE stack. Each connection has a connection interval and a timeslot, so initially they should not send messages at the same time. If for some reason they do send at the same time, so that the message is not received (or that the packet is lost for some other reason), then the transmitting device will not get the ACK for that message, and it will resend the packet. In the nRF application, the SoftDevice will handle this, so you should not need to worry about this. This should also be implemented in the phone's BLE stack.

     

    Side note:

    Please note that the nRF often (not always) acts as the peripheral in a BLE connection when the other device is a phone, and there is two reasons for this:

    • Not all phones support advertising.
    • The central role has to perform scanning, which is a power consuming task, because the radio has to spend a lot of time on (listening). Therefore the scanning task is often placed on a device with larger battery capacity (phones).

    You can still use the nRF as scanner/central. The nRF supports it. Just make sure that the phones that you are using supports BLE advertising.

     

    Best regards,

    Edvin

     

    Best regards,

    Edvin

Related