Skip to content
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

onUpgradFailed gets called but update continues #93

Closed
lambo81 opened this issue Sep 23, 2021 · 5 comments
Closed

onUpgradFailed gets called but update continues #93

lambo81 opened this issue Sep 23, 2021 · 5 comments

Comments

@lambo81
Copy link

lambo81 commented Sep 23, 2021

The callback:

public void onUpgradeFailed(FirmwareUpgradeManager.State state, McuMgrException error);

gets called. state.toString() is "VALIDATE" and error.getMessage() is "Payload (10 bytes) too long for MTU: 0"

However, the device keeps going through the update process. The next state is "UPLOAD"

@philips77
Copy link
Collaborator

Hello,
We also encountered the issue and are looking for a solution. Please, check out https://github.com/NordicSemiconductor/Android-nRF-Connect-Device-Manager for more updates, as this repo has been deprecated.

@philips77
Copy link
Collaborator

OK, we pinpointed the issue.
It's the issue in BLE library 2.3. This happens when you are already connected to the device using another client (BluetoothGatt or BleManager), which has requested MTU change. Then, when you connect using McuMgrBleTransport, the onMtuChanged(..) callback gets fired automatically even before the service discovery begins and, as initialization queue has not yet been initialized, if reports the device as ready here: https://github.com/NordicSemiconductor/Android-BLE-Library/blob/1c8339013e678a864302209618435de5707207dd/ble/src/main/java/no/nordicsemi/android/ble/BleManagerHandler.java#L2357

@lambo81
Copy link
Author

lambo81 commented Sep 23, 2021 via email

@lambo81
Copy link
Author

lambo81 commented Sep 23, 2021 via email

@philips77
Copy link
Collaborator

Version 0.13.0-beta06 should have this issue fixed. It's now available on Maven Central.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants