nrf5340 - increasing HCI RPMsg BLE transmit throughput

Hi,
I'm working on a ble peripheral that uses nRF5340, NCS recently upgraded to v2.6.1, Zephyr v3.4.99.
The net core is running the HCI RPMsg controller sample as it is.
In the app core I've defined a couple of characteristics implementing a UART-like serial streaming.

Here are my BT configuration settings

CONFIG_BT=y
CONFIG_BT_LOG_LEVEL_ERR=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_LIM_ADV_TIMEOUT=180
CONFIG_BT_MAX_CONN=1
CONFIG_BT_MAX_PAIRED=3
CONFIG_BT_SECURITY_ENABLED=y
CONFIG_BT_SMP=y
CONFIG_BT_SMP_APP_PAIRING_ACCEPT=y
CONFIG_BT_GATT_CLIENT=y
CONFIG_BT_L2CAP_TX_MTU=247
CONFIG_BT_BUF_ACL_TX_SIZE=251
CONFIG_BT_BUF_ACL_RX_SIZE=502

Hereunder the log of connection, pairing and bonding.
The negotiated MTU is 244 and the connection interval is 9 ms.

[00:03:54.661,590] <inf> bas: BAS Notifications enabled
[00:03:54.667,327] <wrn> ble: connected to peer 00:E0:4C:2B:01:42 (public)
[00:03:54.674,804] <inf> ble: sending ATT MTU to peer..
[00:03:54.680,725] <wrn> control: client is ble
[00:03:54.877,197] <inf> ble: max send len is 244
[00:03:58.407,257] <inf> bas: BAS Notifications disabled
[00:03:58.413,146] <wrn> ble: disconnected from peer 00:E0:4C:2B:01:42 (public) [reason: 0x13]
[00:03:58.422,576] <inf> ble: [1] bonded peer: 00:E0:4C:2B:01:42 (public)
[00:03:58.429,687] <inf> ble: total bonded peers: 1
[00:03:58.[00:03:58.436,981] <inf> ble: regular advertising started
[00:00:00.421,539] <inf> bt_hci_core: hci_vs_init: HW Platform: Nordic Semiconductor (0x0002)
[00:00:00.430,358] <inf> bt_hci_core: hci_vs_init: HW Variant: nRF53x (0x0003)
[00:00:00.437,957] <inf> bt_hci_core: hci_vs_init: Firmware: Standard Bluetooth controller (0x00) Version 54.58864 Build 1214809870
[00:00:00.451,019] <inf> bt_hci_core: bt_init: No ID address. App must call settings_load()
[00:00:00.459,655] <inf> ble: ble_init: initialized
[00:00:00.464,996] <inf> ble: ble_init: setting public address
[00:00:00.472,961] <inf> bt_hci_core: bt_dev_show_info: Identity: 6C:1D:EB:C1:18:73 (public)
[00:00:00.481,719] <inf> bt_hci_core: bt_dev_show_info: HCI: version 5.4 (0x0d) revision 0x218f, manufacturer 0x0059
[00:00:00.492,675] <inf> bt_hci_core: bt_dev_show_info: LMP: version 5.4 (0x0d) subver 0x218f
[00:00:00.502,044] <inf> ble: advertising_process: total bonded peers: 0
[00:00:23.350,036] <wrn> ble: connected: connected to peer 00:E0:4C:2B:01:42 (public)
[00:00:23.358,459] <inf> ble: connected: sending ATT MTU to peer..
[00:00:23.380,126] <inf> ble: exchange_func: max send len is 244
[00:00:23.431,427] <inf> ble: pairing_accept: secure pairing accepted
[00:00:23.781,555] <inf> ble: auth_passkey_confirm: secure passkey from peer 00:E0:4C:2B:01:42 (public): 255651
[00:00:23.791,900] <wrn> ble: auth_passkey_confirm: TODO: manage authentication OOB (USB).
[00:00:23.800,781] <wrn> ble: auth_passkey_confirm: PB short press to accept pairing in 4 seconds ..
[00:00:26.164,184] <inf> ble: num_comp_reply: accepting connection (0x20004560)
[00:00:26.171,783] <inf> ble: auth_passkey_confirm: bonding request confirmed.
[00:00:28.559,753] <inf> ble: conn_params_update_handler: suggest connection params to central.. (interval 8)
[00:00:28.785,034] <inf> ble: security_changed: security change succeded: 00:E0:4C:2B:01:42 (public) level 4
[00:00:28.924,591] <inf> ble: pairing_complete: secure pairing completed with peer 00:E0:4C:2B:01:42 (public), bonded: yes
[00:00:29.334,777] <inf> ble: conn_params_update_handler: suggest connection params to central.. (interval 9)
[00:00:30.599,487] <inf> bas: blvl_ccc_cfg_changed: BAS Notifications enabled
[00:00:33.745,635] <inf> bas: blvl_ccc_cfg_changed: BAS Notifications disabled
[00:00:33.753,417] <wrn> ble: disconnected: disconnected from peer 00:E0:4C:2B:01:42 (public) [reason: 0x13]
[00:00:33.764,038] <inf> ble: bond_handler: [1] bonded peer: 00:E0:4C:2B:01:42 (public)
[00:00:33.772,338] <inf> ble: advertising_process: total bonded peers: 1


The problem is that the Bluetooth transmit throughput is not enough.
On the central side (Windows PC) I receive 240 bytes / s.
On the contrary the USB channel performs better, with 500 bytes / s.
Consider that the thread getting the data from the queue before transmit is exactly the same both for USB and Bluetooth.

How can I double the BLE throughput ?

Parents Reply Children
Related