NordicSemiconductor / IOS-DFU-Library

OTA DFU Library for Mac and iOS, compatible with nRF5x SoCs
http://www.nordicsemi.com
BSD 3-Clause "New" or "Revised" License
520 stars 214 forks source link

DFU progress stuck on iOS 17.0 #514

Open LucaDonetti opened 11 months ago

LucaDonetti commented 11 months ago

DFU Bootloader version (please complete the following information):

SDK version: NRF5, v16

Device information (please complete the following information):

Device: iPhone XS, iPhone 14 Pro, iPad mini 5th Generation

Describe the bug: DFU can be initiated without any problem, however the progress stuck at random progress. Only happens on iOS 17.0. Everything is working fine for iOS 16 and below. Suspect that's a bug from Apple side on iOS 17.0, but might as well post here. The Bug is very similar to https://github.com/NordicSemiconductor/IOS-DFU-Library/issues/510. I try to set "packetReceiptNotificationParameter" to 0(like you explain on this report https://github.com/NordicSemiconductor/IOS-DFU-Library/issues/510), but is not work.

Log:

"[BSDfuOta] [Nordic-Service] State changed: Connecting"
"[BSDfuOta] [Nordic-Service] State changed: Starting"
"[BSDfuOta] [Nordic-Service] State changed: Uploading"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 0 % - Speed: 0.0 - Avg speed: 0.0"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 1 % - Speed: 6958.366797646767 - Avg speed: 6958.366797646767"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 2 % - Speed: 4509.398199166779 - Avg speed: 5473.2088788075325"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 3 % - Speed: 4081.0547312089516 - Avg speed: 4914.6331591716735"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 4 % - Speed: 6529.697413215871 - Avg speed: 5236.988559958262"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 5 % - Speed: 4543.566837350083 - Avg speed: 5081.746769250404"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 6 % - Speed: 4935.882293024704 - Avg speed: 5056.822899650668"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 7 % - Speed: 6722.5135078699495 - Avg speed: 5241.577580605801"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 8 % - Speed: 4308.121523592575 - Avg speed: 5103.192135303826"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 9 % - Speed: 4352.404008856006 - Avg speed: 5007.117919232876"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 10 % - Speed: 5960.438633141871 - Avg speed: 5088.16772177767"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 11 % - Speed: 4150.61427948979 - Avg speed: 4985.644796943376"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 12 % - Speed: 3638.132737776432 - Avg speed: 4836.181889448011"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 13 % - Speed: 3596.889887365924 - Avg speed: 4711.958910960532"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 14 % - Speed: 6161.176733136156 - Avg speed: 4792.716572083866"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 15 % - Speed: 3784.7014997663578 - Avg speed: 4708.986727917955"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 16 % - Speed: 3969.114815418525 - Avg speed: 4655.038745743609"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 17 % - Speed: 7788.733878047134 - Avg speed: 4768.222914186186"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 18 % - Speed: 4505.52774625675 - Avg speed: 4752.804971497896"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 19 % - Speed: 4382.366392777505 - Avg speed: 4731.863693777893"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 20 % - Speed: 7678.367097694481 - Avg speed: 4824.7149159199425"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 21 % - Speed: 4046.672708164637 - Avg speed: 4780.8759847796455"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 22 % - Speed: 4494.97636887608 - Avg speed: 4767.0736768621655"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 23 % - Speed: 3657.189160188722 - Avg speed: 4705.317471268779"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 24 % - Speed: 8387.021503974249 - Avg speed: 4793.250629186246"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 25 % - Speed: 4135.09154503794 - Avg speed: 4762.881458766034"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 26 % - Speed: 3797.4188327619404 - Avg speed: 4717.000045096783"
"[BSDfuOta] [Nordic-Progress] Parts: 1 / 1 - Progress: 27 % - Speed: 8023.633665028591 - Avg speed: 4790.337201423899"
"[BSDfuOta] [Nordic-Service] State changed: Connecting"
"[BSDfuOta] [Nordic-Service] State changed: Starting"
"[BSDfuOta] [Nordic-Service] Error 305: Writing to characteristic failed"
zwift-aebling commented 11 months ago

Can confirm we are seeing similar behaviour here, which was not reproducible until we updated the device to iOS 17.

LucaDonetti commented 11 months ago

Any solutions? Because some clients that update to iOS 17 can't update to the new firmware

JtheSaw commented 11 months ago

Some of my clients are experiencing the same problem but I can't reproduce it with my test devices. Do you have a way to reliably force the problem to occur?

zwift-aebling commented 11 months ago

I was able to reproduce using iPhone 13 Pro/iOS 17 and flashing old FW to an NRF52DK, then doing DFU.

EDIT: the DFU package used contained app + sd + bl.

philips77 commented 10 months ago

Hello, I'll try to look into this issue this week. I need to finish my current task before. Sorry that I keep you waiting.

jpszczerba commented 10 months ago

Hey, do you have any update regarding this?

philips77 commented 10 months ago

I'm resuming work on this project just now.

jpszczerba commented 10 months ago

Okay, thank you!

philips77 commented 10 months ago

In the project there's Example folder, which has a set of automated tests for DFU. First, one has to flash nRF51, nRF52832 or nRF52840 DK with a hex file that can be found in this folder and when the app is started and DFU device is selected, the app will perform number of updates from going through different SDKs forward (nRF52) or backwards (nRF51).

I started the test on an iPhone Xs (iOS 17.0.3) and all tests completed with success. Let me test different phones and iOS versions.

Yramani1998 commented 9 months ago

Still facing the same issue on iphone 12 (ios 17.0.0) . Do we have any updates ?