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

  • Hi,

    I tried the nrf52-ble-app-uart-c-multilink example but I get NRF_ERROR_BUSY when connecting to more than one ble_app_uart peripheral.

    If I turn on the peripherals one at a time they all connect.

    If all the peripherals are on when I turn on the central I get the NRF_ERROR_BUSY error.

    Can you give me some advice about this issue?

    Best regards,

    Marcio

  • Hi Marcio

    Which call returns NRF_ERROR_BUSY?

    Are you able to connect to 2-3 devices at the same time?

    In the multi link demo on Github I restricted the central to connect to one device at a time, as I saw similar issues. You should be able to put in a similar limit, and stop scanning once you are in the process of connecting to a certain number of devices. 

    Best regards
    Torbjørn

  • Hi Torbjørn,

    Is it possible that ble-app-uart-c-multilink can support more than 4 peripheral connections ? As far as I know, regular ble_app_multilink_central example supports up to 20 concurrent connections, but that example is meant for led blinking, not for sending data. Is it related with RAM size of Soft Device ?

    Best Regards

  • 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

Related