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

BLE multilink ATT timeout problem occurs when the number of connections increases

Recently I am using BLE in Zephyr to implement the multilink central function
However, none of the references currently have a similar function, and there is also the nordic zephyr code
https://github.com/nrfconnect/sdk-nrf  <-There are only examples of multilink peripherals in this link
So I wrote one to implement it. The goal I want to achieve is one central to 30 peripherals
The current connection with 4 peripherals is fully stable, but when I increase the connected peripherals, the following error will appear

<err> bt_attLATT Timeout
<wrn> bt_att: No ATT channel for MTU 5
<wrn> bt_att: No pending ATT request

The picture below shows the error when connecting 20 peripherals

At present, I know that modifying the Interval connection will indeed improve, but only to make <err> bt_attLATT Timeout happen later.

How can I avoid this problem so that I can connect 30 peripherals stably?

Below is my code
Or you can go to this page to download https://github.com/mfinmuch/zephyr-ble-mulrilink-test

3225.multilink central.rar

Thanks,

Poyi

  • Hi Poyi, 


    I meant if you queue a write command for every single connection on every connection event, you will need a bigger buffer than 18 as you have 20 connection concurrently. However, this shouldn't cause tx overflow as far as I know. You may receive an error of full buffer when you try to queue write command when buffer is full. 

    Please note that our softdevice controller currently only officially support maximum 20 concurrent connections at a time. See here. I assume you plan to use our Nordic LL ? not the Zephyr LL ? From what I can tell when compiling locally here you are using our Nordic LL. 

    If you are sending your data at 1s interval I don't see much point of having shorter interval, please describe your application in more detail. 

    Please try again with CONFIG_THREAD_NAME=y so that the thread got overflow be printed out. 

    But could you clarify that you no longer see MPU fault and now only see TX Overflow ? On how many peripherals connected do you start seeing that ? 

  • you will need a bigger buffer than 18

    In zephyr, I can only set it to 18 at most, and it cannot be set even larger than this. If I set more than 18, I will not be able to compile

    You may receive an error of full buffer when you try to queue write command when buffer is full. 

    The error is in \zephyr\subsys\bluetooth\controller\hci\hci.c

    Shown in

    node_tx = ll_tx_mem_acquire();
    if (!node_tx) {
        BT_ERR("Tx Buffer Overflow");
        data_buf_overflow(evt);
        return -ENOBUFS;
    }

    I am not sure which LL I am using, I did not set BT_LL_SOFTDEVICE in my prj.conf
    I downloaded the sample from Zephyr's official website to make changes. Website:https://github.com/zephyrproject-rtos/zephyr

    I am currently connected to 15 connections, there will be TX overflow, is there any good way, or what can explain the reason for this error

    Thanks,

    Poyi

  • Hi Poyi, 

    Did you use our NCS repository or you are using Zephyr natively ? 
    You can check inside autoconf.h to see if you have CONFIG_BT_LL_SOFTDEVICE 1 or not. 

    By default if you use NCS and if you don't have CONFIG_BT_LL_SW_SPLIT =y then it will be our softdevice LL used. 

    Our team is working with the case on github that I pointed. I will check with them and get back to you if we find anything.  

  • Hello,
    I think I use Zephyr natively
    I have set this in my autocpnf.h

    #define CONFIG_BT_LL_SW_SPLIT 1

    Also in my autoconf.h did not see CONFIG_BT_LL_SOFTDEVICE

    I am glad to hear this news, if there is any improvement, please let me know

    Thanks,

    Poyi

  • Hi Poyi, 

    I would suggest to try testing using our Softdevice LL. 
    Please note that in this support channel we focus on Nordic's products so if you plan to use Zephyr LL, you may want to post your question on the Zephyr Github channel. 

Related