PHY1M is slower than PHY2M while forwarding data.

Hello All,

I have a problem when I build my project from sample central_uart &  peripheral_uart.

I have two nrf5340 called A and BB scans the broadcast to A to establish a connection. Then my phone(C) connects B.

A sends data to B, and B forwards data to C.

Speed of retransmission  is 160kbps when B works on PHY1M. However, speed drops to 40kbps when B works on PHY2M

I wonder what cause this problem.

Is there any ways to increase forwarding data speed?

Thank you.

static uint8_t ble_data_received(struct bt_nus_client *nus,
						const uint8_t *data, uint16_t len)
{
	ARG_UNUSED(nus);
	int err;

	err = bt_nus_send(peripheral_conn, data, len);
		// printk("len:%d\n",len);
		if (err) {
			printk("Send Error(err %d)\n", err);
		}
	
	return BT_GATT_ITER_CONTINUE;
}

B is connected with A as the center and C as the periphery.

Parents
  • Hi,

    The theoretical maximum throughput is doubled when going from 1 Mbps to 2 Mbps PHY. However there are many factors that affect throughput. What are the connection parameters, what about the event length? Is the device (A) able to provide data quickly enough to fill the connection event with more packets? It could be interesting to know which parameters you use, and see a sniffer trace of both the cases (1 and 2 Mbps) to see what the differences are on air.

  • Hi,

    The parameters I use are below.

    CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
    CONFIG_BT_BUF_ACL_TX_SIZE=256
    CONFIG_BT_BUF_ACL_RX_SIZE=512
    CONFIG_BT_CTLR_PHY_2M=y
    CONFIG_BT_CTLR_RX_BUFFERS=2
    CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT=50000

    I use the default parameters for the rest.

    Moreover, the speed of data could reach 1.2Mbps when A only connects B without advertising. 
    Thanks.
Reply Children
Related