-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting lots of "Peripheral Disconnected" on iOS 15 and 16 #492
Comments
There was a change in iOS 16, not official, but BLE documentation regarding minimum connection parameters is enforced much more strictly than it was before, hence the disconnections. Please check whether the minimum connection parameters of the device firmware you're trying to DFU to are valid, Apple's Documentation regarding this can be found here: https://developer.apple.com/library/archive/qa/qa1931/_index.html |
The numbers may be correlated with distribution of iOS version used. iOS 16 and 15.6.1 are the most popular. Did you try to get a percentage of dfu ending with failures per dfu with any results on those iOS versions? |
Thanks for the reference, we will try changing our advertising period to one recommended. However, our customers dont have any issue scanning our devices for anything other than DFU, si I'm not sure why this would be an issue specific to DFU. |
This is a projet that has been up for 3+ years, we started getting this issue with the rise of iOS 15.6, and even more now with iOS 16 becoming popular |
@QuentinFarizon scanning does not 'connect to a device'. It's just scanning. DFU is a problem if the connection parameters are wrong becuase the iPhone will drop the connection if it can't negotiate for parameters it likes. We noticed this about 1.5 years ago when DFU'ing between the Mac and a firmware device, with the Mac proving to be a lot more strict regarding holding the connection. So if you're able to, try to test if you can run your software from a Mac and try to upgrade. Apple allows iPhone(s) to be used as BLE Sniffers so you can catch the traffic and get more information as to why the connection is being dropped. Anyway - the intervals are important because for DFU the connection needs to be held for a while, and likely, will be negotiated a couple of times from one side or the other. |
Yes sorry, but our customers also dont have any issue connecting our devices for anything other than DFU, even for long periods. |
Can you reproduce the issue? Or give us some form of example or sample firmware we can flash to a devkit to replicate the issue? |
The data are taken over what time period? |
Well, 3 years
Le mer. 23 nov. 2022, 10:07, Aleksander Nowakowski ***@***.***>
a écrit :
… This is a projet that has been up for 3+ years, we started getting this
issue with the rise of iOS 15.6, and even more now with iOS 16 becoming
popular
The data are taken over what time period?
—
Reply to this email directly, view it on GitHub
<#492 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIATUIGQ2C2EYM2FHE4ZU4TWJXNEVANCNFSM6AAAAAASEKXMHQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Any progress here? |
@wiesener this is outside of our control as well - we can't change the BLE API behaviour on iOS. We only make our apps based on it and make our own observations about it. We've given you already all of the info that we have regarding the connection parameters as well - for the moment it looks like iOS 16.1 reverted to the old behaviour, so you should see an improvement as customers update their devices. |
Okay, but the thing gets more complicated. I've tested several devices and versions. Kind of strange. I guess it is not just the ios version but as well the chip set. |
I'll have a look into this library this or next week. Sorry for the delay, but I am busy with some other tasks. |
On one customer, we pushed (DFU via an Android) the change of avertising period to the Apple-recommended value of 318.75 ms (instead of the 300 ms we had). I feel this is now a strong requirement from Apple, maybe this should be enforced (or strongly suggested) in the NRF SDK ? At least warning that other values may cause issues with DFU on iOS. |
I've heard that iOS 16.1 stepped back from making it a strong requirement, although didn't have a chance to confirm it yet. |
@philips77 It definitely got worse with iOS 16.1 and onward. No customers on iOS can now do a DFU. Changing advertising period didn't in fact solve the issue, and couldn't, because the real issue is that we are disconnected from device, after a successful connection, just when sending the command to switch to Bootloader. We have investigated further, and by comparing DFU sequences on iOS and Android, we can see that on iOS an ATT MTU exchange is done, but not on Android (see logs below). We suspect that this MTU request started being made from iOS 15.7 and onward, and that there is a race condition between this MTU request and the sending of command to switch to bootloader. Contrary to the nRF Connect application, where you connect, then choose the file, then click start DFU, we start the DFU as soon as the connection succeeds So we added a 3 seconds delay between connect and starting the DFU, and it definitely solved the issue. I think that this lib should somehow wait for the MTU request to be done, before sending the command. Logs from device when connecting+DFU from iOS :
Logs from device when connecting+DFU from Android :
|
Update: Adding a 3 seconds delay improved for some customers, but issue remain for others (on ~25% of our customers on iOS). |
DFU Bootloader version (please complete the following information):
Device information (please complete the following information):
Describe the bug
We are automatically logging DFU errors when they occur on customer phones, and we have an uptick of "Peripheral Disconnected" errors for customers on recent iOS versions (15.6 to 16.1) and especially on 16.0 and 16.1.
It happens uniformly across all device versions, iPhone 8 to 15,3
Here is the number of errors per device version :
Customer phones that have this error can never update their devices, but their device is updatable from an other phone (be it Android or another iPhone).
We have two iPhone at office, but we do not reproduce.
Logs
Message : Peripheral Disconnected
Description : The specified device has disconnected from us.
The text was updated successfully, but these errors were encountered: