adafruit / Adafruit_nRF52_Bootloader

USB-enabled bootloaders for the nRF52 BLE SoC chips

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DFU OTA always fails

hyx0329 opened this issue · comments

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 (277a0c8), 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 #35 (comment)

Changing HCI_RX_BUF_QUEUE_SIZE to 16 fixed my problem.

How to reproduce

  • install Nordic DFU App version 2.3.0 build 2212700, apk: nRF Device Firmware Update_2.3.0.zip (dl from apkpure, sha256 dda40ac05f468a0c89e62371199a4c270e0048adb826eacc0179b2b522216690)
  • put the device(nrf52840) to OTA mode
  • open the app, select an update zip for bootloader(a same version is ok)
  • select the ble device AdaDFU
  • click start
  • reproduced

My setup:

  • Phone: Pixel 4XL
  • OS: Lineage 20-20230507 (android 13)
  • Nordic DFU App version 2.3.0 build 2212700
  • bootloader (277a0c8)

Known affected devices:

  • M60 keyboard(nrf52840)
  • waiting feedbacks

Possible related issues and prs:

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