-
Notifications
You must be signed in to change notification settings - Fork 272
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
Device got disconnected before service discovery finished #35
Comments
These are log that add gatt.refresh() before second dfu.
|
I have met this issue too on Android Nougat 7.1.1. |
@philips77 |
i've been getting this quite a lot. (Android 7.1.1 - Oneplus one) |
Yes, I saw it as well. I think I kind of solved it by adding a delay before starting dfu after the device disconnected (in this case I was disconnecting and starting dfu afterwards). But I have no clue what causing it and why, and how to really solve it. |
added a scan after setting device to dfu mode, delays, retrying after failure sometimes works but failure rate is still too high. |
Could you enable snoop log and, after you get the error, send me the bug report? Can be via email if you don't want to post it here. |
i can send you the log can i use the @ in your profile page ? |
Yes you can. |
Any update? |
Hi @philips77 |
Hi, there is not much that can be done. It happens occasionally, I'm not sure why, not on all devices, etc. The only thing that could be done is adding some delay? But that's not solving and will not help 100% cases. Some investigation is required why this happens, does it happens also on new versions of Android, on Pixels, which chipsets, etc. And it's more to be fix on Android or even stack side, not app. The service can be just restarted. Make sure you scan for the device at least once before you do dfu if it's not bonded (creating the BluetoothDevice from address assumes public address). |
OK, Thank you suggestion, @philips77 |
I'll release version 1.8.0 of the DFU library today. It had some improvements since this issue was created. |
Also, duplicate of #28. |
1.8.0 is released now. |
I just faced this issue using 1.8.0 Device is a Huawei P10 Lite on Android 7.0 and EMUI 5.1 (I hate huawei bluetooth engineers, btw. So many issues) Should scanning for the device before starting DfuService help? Currently we have a delay before starting the service DfuServiceListenerHelper.registerProgressListener(context, listener);
connection.disconnect();
Thread.sleep(TimeUnit.SECONDS.toMillis(2));
starter.start(context, MyFirmwareUpdaterService.class); If it does help, could we add it to DFU library? (if it's not already) |
FYI: You don't need to disconnect before starting DFU. In nRF Connect we don't. |
Hi Philips: We also meet a similar issue as below log, we use 48 devices which all run secure bootloader at the same time, and using dfu-library1.8.1 This issue seems happen easier when devices become more in our environment. Could you diagnose it and give us any suggestion? workaround is also welcome, thank you. |
Hi,phillip
I have met another problem. The twice dfu is on same MAC address. Becasue they are same Mac address,so does not do gatt.refresh(). At second dfu happend
Could you help me?
The text was updated successfully, but these errors were encountered: