Bluetooth transfer speed is slow.

- nRF connect SDK 1.9.1

- nRF5340 DK

We use the official samples Bluetooth: Central UART and Bluetooth: Peripheral UART to test bluetooth transfer between two development kit. We found observable delays and data loss when sending data continuously.

Specifically, the central sends data with a length of 40 bytes each 0.05s. The central send a total of 5120bytes, but the peripheral recieve only 4480 bytes of data. The transmission process was accompanied by a relatively obvious delay.

Parents
  • Hi

    There are multiple parameters that can help increase the throughput, and you should begin by using the 2MBPS PHY, as well as enabling extended advertising to increase MTU and data length, and update the connection parameters/interval. All of this is done with functions like these which are used in the throughput example:

    static bool le_param_req(struct bt_conn *conn, struct bt_le_conn_param *param)
    {
    	printk("Connection parameters update request received.\n");
    	printk("Minimum interval: %d, Maximum interval: %d\n",
    	       param->interval_min, param->interval_max);
    	printk("Latency: %d, Timeout: %d\n", param->latency, param->timeout);
    
    	return true;
    }
    
    static void le_param_updated(struct bt_conn *conn, uint16_t interval,
    			     uint16_t latency, uint16_t timeout)
    {
    	printk("Connection parameters updated.\n"
    	       " interval: %d, latency: %d, timeout: %d\n",
    	       interval, latency, timeout);
    
    	k_sem_give(&throughput_sem);
    }
    
    static void le_phy_updated(struct bt_conn *conn,
    			   struct bt_conn_le_phy_info *param)
    {
    	printk("LE PHY updated: TX PHY %s, RX PHY %s\n",
    	       phy2str(param->tx_phy), phy2str(param->rx_phy));
    
    	k_sem_give(&throughput_sem);
    }

    Best regards,

    Simon

Reply
  • Hi

    There are multiple parameters that can help increase the throughput, and you should begin by using the 2MBPS PHY, as well as enabling extended advertising to increase MTU and data length, and update the connection parameters/interval. All of this is done with functions like these which are used in the throughput example:

    static bool le_param_req(struct bt_conn *conn, struct bt_le_conn_param *param)
    {
    	printk("Connection parameters update request received.\n");
    	printk("Minimum interval: %d, Maximum interval: %d\n",
    	       param->interval_min, param->interval_max);
    	printk("Latency: %d, Timeout: %d\n", param->latency, param->timeout);
    
    	return true;
    }
    
    static void le_param_updated(struct bt_conn *conn, uint16_t interval,
    			     uint16_t latency, uint16_t timeout)
    {
    	printk("Connection parameters updated.\n"
    	       " interval: %d, latency: %d, timeout: %d\n",
    	       interval, latency, timeout);
    
    	k_sem_give(&throughput_sem);
    }
    
    static void le_phy_updated(struct bt_conn *conn,
    			   struct bt_conn_le_phy_info *param)
    {
    	printk("LE PHY updated: TX PHY %s, RX PHY %s\n",
    	       phy2str(param->tx_phy), phy2str(param->rx_phy));
    
    	k_sem_give(&throughput_sem);
    }

    Best regards,

    Simon

Children
No Data
Related