-
Notifications
You must be signed in to change notification settings - Fork 274
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
DFU update failed (TIMEOUT occured) #452
Comments
Hello,
There's a 5 second delay between these two messages, suggesting that the device started erasing memory and does not reply when doing so. The connection parameters may have a Supervision Timeout set to 5 seconds, so after that time the phone disconnects. I suggest requesting a different supervision timeout from the device side before DFU or checking why the device does not reply. Some phones request 20 second timeout instead of 5, perhaps that's why it works on other phones. Check the time that it takes for the device to reply to firmware image size sent command on phones that are working. |
Hello,
|
Hello, |
Hello, On your last logs you can find these:
However, on the non-working log there's this:
Perhaps the device isn't sending any packets when it's erasing the slot? The phone can think that the connected device has been reset / died and reports disconnection. Did you do the tests on the same device and in the same state? In example, was the slot empty already in both cases, or is it that the 1st dfu worked, but following didn't? |
I did some (a lot) testing. I believe I know what's going on. On one of my devices (Samsung Tab A8) I am not able to reconnect to the device in bootloader mode after using Buttonless service. This was found on DFU from nRF5 SDK 8 and 11 (and i believe all in between). The reason is that the bootloader is using Direct advertising with very short advertising interval (3 ms). Samsung Tab A8 cannot reconnect to it, while other phones (Pixel 5 and Pixel 7 can without any problems). I added a hint to the logs with possible workaround:
|
A way to test it:
|
Hmm... in your case you are able to connect to the device in bootloader mode... so it must be a different issue. But I also managed to get your case, i believe. Let me try something. |
This may be the same as #376. |
We are also having to support an old product with nRF51822 and SDK8.1, and we see similar behaviour, particularly when the firmware image gets larger. But if I increase the supervision timeout in the SDK8 bootloader from 4 to 8 seconds, then dfu works fine. Tried this out with nRFConnect for Android 4.28.1 (but I guess this does not have the latest Android DFU library?) Update: worked yesterday, but today it only intermittently works (random), so something else is going on.... |
Where do you suspect the issue?
Issue related to Android version or specific device
Version
2.4.0
Describe the issue
I am using DFU Bootloader v8.1.0 for my application and trying to perform a DFU using the DFU app version 2.4.0. I am using a Redmi 9C running Android 10 for the process.
The issue is that whenever I start the DFU, it always returns an error during the initialization. The logs can be found below.
I tried debugging the bootloader during the process and discovered that the issue stems from the
pstorage_callback_handler
function, specifically in the case where the callback code isPSTORAGE_CLEAR_OP_CODE
. In this case,m_data_pkt_cb
returns the error codeNRF_ERROR_TIMEOUT
.However, when I tried with another phone, a Pixel 5, the process worked without any issues. This suggests that the issue may be reproducible on specific phones.
Can anyone help me solve this issue?
Note: I tried increasing the BLE connection parameters, but this did not resolve the problem.
Relevant log output
The text was updated successfully, but these errors were encountered: