Speeding up DFU OTA on Linux

Hello,

I am using Linux computer as an update hub for BT device, based on NRF52840. 

The device is set to use Coded PHY, so there is no possibility to use McuMgr - but with Bluez 5.64 and Bleak 0.21.1. The application is compiled using NRF Connect 2.4.2 SDK. 

Negotiated MTU is 495, but some of the capacity is "wasted" by BT headers and SMP message parameters - so I cannot send more than 410 bytes in a first chunk and around 470 in a subsequent ones. I am writing the chunks one by one, without requiring the response - and waiting for a notification to read the next offset. 

Unfortunately, top speed I managed to achieve is 1.4 KB/s - when with Nordic Android app I am easily reaching upload speed of 11.3 kB/s - i.e. 8 times faster. 

What can be improved to speed up the upload?

Thanks,



Related