Closed Boon-FM closed 1 year ago
Did you try enabling Package Receipt Notifications (PRN) with different values? It may be that the phone sends the fw too fast for the nRF51 to be able to send. PRNs will slow the upload down and sync transmitter with the receiver.
To enable PRSs use: https://github.com/NordicSemiconductor/IOS-DFU-Library/blob/4f9db204fd7d702a8d3f380e017ce7395d0b39c0/iOSDFULibrary/Classes/Implementation/DFUServiceInitiator.swift#L115
Starting from iOS 11 the PRNs can be disabled (see code below), but if you have transfer issues enabling them may help: https://github.com/NordicSemiconductor/IOS-DFU-Library/blob/4f9db204fd7d702a8d3f380e017ce7395d0b39c0/Example/iOSDFULibrary/View%20Controllers/DFUViewController.swift#L229-L235
Btw, seems like the root cause of the issue is on the iOS side. Perhaps the connection interval was changed or more data can be sent in a connection interval. You may also try increasing the distance between the iPhone and your device to cause some transfer issues. Retransmitting will slow down the upload. But of course this is a very unreliable method.
After testing with some phones, we found out that the bug only happens on some phone models (For example, it's no iPhone XS but not on iPhone SE (2nd Gen)). The PRN was enabled with the default value 12. Lowering the PRN value to 10 or below fixed the bug on iPhone XS. Weirdly, disable the PRN also fixes the bug, not sure what's happening there. Thanks for helping @philips77 .
I try to change the value of packetReceiptNotificationParameter from 12 to 0, but on the iPad 12 mini with iOS 17 the problem persists
I'm testing on iOS 17.0.3 and cannot reproduce the issue.
DFU Bootloader version (please complete the following information):
Device information (please complete the following information):
Describe the bug DFU can be initiated without any problem, how ever the progress stuck at random progress (Sometimes 1% sometimes 60% sometimes success if super lucky). 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.
Logs