Bluetooth mcumgr SMP DFU speed #ble
nick.ward@...
Hi all,
I'm trying to optimise the mcumgr SMP DFU transfer speed over Bluetooth LE. I'm getting speeds up to 5.12KibB/s (with different combinations of devices) but this Punchthrough blog post claims up to ~50KB/s is possible: https://punchthrough.com/maximizing-ble-throughput-part-3-data-length-extension-dle-2/ The Bluetooth code is all running on a nRf52832 module. I'm using Zephyr 1.14.0 I've got scanning turned off Other settings: CONFIG_BT_L2CAP_TX_MTU=260
CONFIG_BT_RX_BUF_LEN=260
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 I'm using a connection interval of 7.5ms I've experimented with other Kconfig Bluetooth options but none have improved it significantly. Has anyone got any tips to increase this throughput they can share? Is 5.12 KiB/s possibly the upper limit with Zephyr 1.14? Thanks, Nick
|
|
Carles Cufi
Hi Nick,
What is your client device? i.e. the device sending the image. If it’s a Linux box running mcumgr there might be limitations there, but if it’s a mobile phone then you should definitely get faster speeds. Have you tried with different client devices?
Finally, please take a look at this configuration file that maximizes throughput:
Carles
From: users@... <users@...>
On Behalf Of nick.ward via Lists.Zephyrproject.Org
Sent: 15 October 2019 02:28 To: users@... Cc: users@... Subject: [Zephyr-users] Bluetooth mcumgr SMP DFU speed #ble
Hi all,
CONFIG_BT_L2CAP_TX_MTU=260 CONFIG_BT_RX_BUF_LEN=260 CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
|
|
nick.ward@...
Hi Carles,
Thanks for the link, I experimented with the settings provided and I maybe saw a small increase (~0.2KiB/s) but not major boost.
My client test devices have been:
- a 4.0 Bluetooth dongle and Ubuntu using the newtmgr (go version) -> 5KiB/s
- Android Pixel 3 XL with Bluetooth 5.0 and nRF Connect app -> 5KiB/s
- Cheap Android 8.1.0 tablet with Bluetooth 4.2 and nRF Connect app -> 1.25KiB/s
I was talking with Vinayak and he was saying the DFU flash writes will cause the CPU to halt (and BLE radio will not be in use) so this will likely reduce throughput somewhat.
I'm trying to send him a sniffer capture of the DFU transfer but I don't have a 2Mbit PHY sniffer as yet.
My results also correlate with this github issue: https://github.com/zephyrproject-rtos/zephyr/issues/19244#issuecomment-534424966
Also I found this link with similar results for the Nordic SDK so it might be the flash writing issue:
https://devzone.nordicsemi.com/f/nordic-q-a/29858/transfer-speed-secure-dfu-sdk14
If I get a chance I'll try DFU with an external flash to compare.
Nick
|
|
nick.ward@...
https://github.com/zephyrproject-rtos/zephyr/issues/19244
More discussions on this issue here: https://github.com/zephyrproject-rtos/zephyr/issues/19244
|
|