This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Speedup upload procedure via BLE

Hi, I'm trying to find a way to speedup the upload procedure of an application, via BLE on a Arduino Primo with the DFU service.

Here you can find my code: https://github.com/astronomer80/ota-dfu-python/blob/master/dfu.py At this time it needs several minutes! I created an application in c# for windows and it takes about 30 seconds to upload an application.

I tried to increase the packet payload size but it doesn't work. The procedure goes to the end but giving the "ACTIVATE_FIRMWARE_AND_RESET" command, gatt replies that the command goes in timeout and the application doesn't start.

At row 134 you can find the parameters that I tried to change:
#TODO Check this parameter to speed up the procedure
pkt_receipt_interval = 10 #DEFAULT=10
pkt_payload_size = 20 #DEFAULT=20

I tried different values for the pkt_payload_size, from 40 to 500. I think that the issue is on the packet receipt notification but I don't understand how to solve.

Here you can find the application that I'm trying to upload: github.com/.../example

and here the DFU I'm using: github.com/.../DFU

Related