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

Multilink central with UART

Hello,

I am trying to develop a sensor which can connect to multiple sensors and send the data which is received by its UART through bluetooth, at the peripheral. Central device reveives the data through the bluetooth and then sends it out through UART. I have tried the example given in the SDK and it is working fine. Now i want to add multilink features to the central device. I tried adding, but it did not work out. Can someone please help me out with the same? Is there any example program available for this?

SDK Used: NRF52 SDK 16.0

Chipset : NRF52832

IDE : Segger Embedded Studio

Regards,

Subbu

Parents Reply Children
  • Hi 

    Running up to 20 links is mainly a question of RAM, that is correct, and the nRF52832 might come a bit short in this regard. That being said there is not a huge difference in RAM consumption between the blinky service and the UART service if you keep the max MTU size to the default 27 bytes. 

    I haven't checked the exact numbers, but if you can do 20 blinky connections on the nRF52832 I would expect you to be able to do the same with 20 NUS connections. 

    Then there is the question of application RAM consumption. If you need a lot of RAM for other things in your application it might be better to go for the nRF52833 or the nRF52840 where you have more RAM available. 

    Best regards
    Torbjørn

  • Thanks for the explanation.
    So if we use nRF52840, we can have up to 20 NUS connections. I mean at least, we can try that.

    For 20 peripheral connections, are the modifications below enough ?


    #define NRF_SDH_BLE_PERIPHERAL_LINK_COUNT 0

    #define NRF_SDH_BLE_CENTRAL_LINK_COUNT 20

    #define NRF_SDH_BLE_TOTAL_LINK_COUNT 20

    Best Regards

  • Hi 

    Yes, those changes should be enough. Please be aware that once you run the code after making these changes you will most likely get an error message asking you to increase the amount of RAM assigned to the SoftDevice. 

    The error message will include the RAM settings that you need to apply to ensure the SoftDevice has enough RAM. 

    Best regards
    Torbjørn

Related