This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Improve communication throughput changing conn_params and ATT MTU params

Hi everybody,

I am working with an UART example with multi-link and everythink working on coded_s8. The objective is keep 20 devices connected and every peripheral send always 50 bytes of data every 100 ms. This are my connection parameters:

//Parametros de conexion
struct bt_le_conn_param m_conn_param=
{
	.interval_min=60,//70*0.625ms
	.interval_max=60,
	.timeout=500,
        .latency=0,
      
};

//Parametros de scaneo
static struct bt_le_scan_param m_scan_param=
{
        .type = BT_LE_SCAN_TYPE_ACTIVE,
        .options = BT_LE_SCAN_OPT_CODED | BT_LE_SCAN_OPT_NO_1M,
        .interval = BT_GAP_SCAN_FAST_INTERVAL,//60ms
        .window = BT_GAP_SCAN_FAST_WINDOW,//30ms
};

I follow this entry: https://devzone.nordicsemi.com/f/nordic-q-a/47330/connection-and-scan-interval-in-multilink-application

Which recommend  set interval of conn=scan interval and a shorter scan window. I whish know if is possible see the packets on a connection with a sniffer to make an strategy and play with parameters, but i thing is only for advertising, isn't it?

Later i see this entry, where explain that increase MTU size and gap data lenght https://devzone.nordicsemi.com/f/nordic-q-a/67249/connection-interval-and-througput/276129#276129

But i am not able to find these parameters on my project, could you guide me on where find that configuration??

My actually throughput isn't enought, i achieve between 200 and 400 messages/second, whereas the objective is 600 messages/second, I write to the UART of every peripheral an array of data every 100 ms with and external uart device. Never a message is lost, every message is sended but not on time desireed, so i am convinced that is a BLE paramter/configuration.

Any suggest or idea to improve the throughput is very welcome!

Really i think that configuring the parameters of the second link seems to be enought, but i don't know how.

I am working with the last version of SDK, and with nrf52840 dongle.

Thank you for the support Nordic team,

regards.

  • Hi,

    Yes this case would be closed but, i have some doubts:

    The reason for this is that it takes a very long time to send packets when using coded phy (just a standard 27 byte payload will take more than 2ms on air), and if the stack was to send even longer packets there would be a high risk of having a packet affected by interference. If you send a very long payload and get bit errors caused by interference you risk losing the entire packet, which would then have to be retransmitted. 

    If I have understand correctly, if I am working with coded_s8 on an high noise envitronment, putting up the ATT_MTU would be perjudicial to the throughput, isn't it?

    My system is working on a noisy environment, do you recommend me to set as a default value the ATT_MTU? Or I put up to my data payload to reduce the quantity of packets?

    What about data_len? How it could affect to my context?

    On another hand, i receive all of the packets on central sended by three peripherals on a minute with conn_interval=conn_window=scan_interval=60, but if I connect four peripherals I miss packets on one of the peripheral, this is solved putting up more the conn_interval=conn_window=scan_interval.

    My question is, could I have some disadvantages on putting up too much the conn_interval with the objetive of manage more peripherals data receiving?

    Edit: on conn_interval , how affect put an interval_min equal to interval_max? Or on another words what is the better way or range to consider maximum and minimum interval of conexion?

    Thank you for the attention, i am near to complete my project and i want to understand really how to play with parameters depending on context,

    Thank you ovrebeckk,

    regards.

  • Hi

    sotillo2409 said:
    If I have understand correctly, if I am working with coded_s8 on an high noise envitronment, putting up the ATT_MTU would be perjudicial to the throughput, isn't it?

    Sending very long packets over the air in coded_s8 mode could have a negative effect on throughput, yes, because the risk of being hit by interference is much higher for coded phy packets compared to 1M packets. This is why the Bluetooth stack doesn't allow long on air packets in coded phy mode, and why setting a higher MTU size will not improve throughput in coded phy mode similar to what it does in 1M or 2M mode.

    sotillo2409 said:

    My system is working on a noisy environment, do you recommend me to set as a default value the ATT_MTU? Or I put up to my data payload to reduce the quantity of packets?

    What about data_len? How it could affect to my context?

    As I said the stack will limit the data length for you, so it shouldn't make a big difference what you sett ATT_MTU or data length to. The advantage of using a longer ATT_MTU is that you don't have to manually split your 50 byte payloads into smaller packets, but can let the Bluetooth link layer do it for you. 

    sotillo2409 said:

    On another hand, i receive all of the packets on central sended by three peripherals on a minute with conn_interval=conn_window=scan_interval=60, but if I connect four peripherals I miss packets on one of the peripheral, this is solved putting up more the conn_interval=conn_window=scan_interval.

    My question is, could I have some disadvantages on putting up too much the conn_interval with the objetive of manage more peripherals data receiving?

    Edit: on conn_interval , how affect put an interval_min equal to interval_max? Or on another words what is the better way or range to consider maximum and minimum interval of conexion?

    Thank you for the attention, i am near to complete my project and i want to understand really how to play with parameters depending on context,

    For a general overview of the scheduling when using the SoftDevice controller, please have a look here:
    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/softdevice_controller/doc/scheduling.html#

    If you have more questions after reading the scheduling chapter just let me know, and I will do my best to help Slight smile

    Best regards
    Torbjørn

  • Hi another time,

    For a general overview of the scheduling when using the SoftDevice controller, please have a look here:
    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/softdevice_controller/doc/scheduling.html#

    This document was so usefull, i am so gratefull with you to share this documentation, I consider this thread closed, i would open another one if I have questions,

    Thank you,

    regards

  • Hi

    I am happy I could be of help, I will close this case then. 

    The best of luck with your project Slight smile

    Best regards
    Torbjørn

Related