adafruit / Adafruit_nRF52_Bootloader

USB-enabled bootloaders for the nRF52 BLE SoC chips
MIT License
461 stars 416 forks source link

DFU OTA always fails #306

Open hyx0329 opened 1 year ago

hyx0329 commented 1 year ago

What happened

I observed that the DFU OTA always fails with latest code on my M60 keyboard(nrf52840). When using a bootloader compiled from current master branch (https://github.com/adafruit/Adafruit_nRF52_Bootloader/commit/277a0c83f44e29c7710bcc6dc299e311b6e7fa26), the OTA process will stuck at 1% and freeze, or completely fail. After that, the bootloader restart itself to UF2 mode.

From #35 I found a solution not incorporated:

The resolution was to modify src/sdk_config.h and increase the value of HCI_RX_BUF_QUEUE_SIZE to 16 resolved all issues.

_Originally posted by chrisingis in https://github.com/adafruit/Adafruit_nRF52_Bootloader/issues/35#issuecomment-518597429_

Changing HCI_RX_BUF_QUEUE_SIZE to 16 fixed my problem.

How to reproduce

My setup:

Known affected devices:

Possible related issues and prs:

jeffc commented 7 months ago

One workaround for this is to go into the DFU app settings and turn on "packets receipt notification," then set the number of packets to something small. The Adafruit app (which does seem to work pretty reliably for DFU) hardcodes 4 as a hack