Closed skrabacz-michal closed 6 years ago
Hi, do you get the same result when you try to update the device starting from beginning, not resuming the upload? On the log you sent I see that you try to resume upload, the init packet is the same, the first page of data is the same and the library tries to execute it. For unknown reason it fails. But what if you erase the first page and start again? As the library does not allow to do this yet, you may replace the app.bin file in your zip (or just change first byte in it) and try again. This time the CRC will be different so the lib, instead of sending 0x04 (execute), will send 06-02 (create data object) which will erase the old one. You may then abort the upload (it would fail eventually as the signature check wouldn't pass), revert the first byte and try again.
Hi,
ok - i'll try it and back with the result.
How can I check/verify if my package is correct? Right now I getting error Update firmware on device D7:74:2A:0C:51:E0:[DFU] Remote DFU error: REMOTE DFU INVALID OBJECT
?
As you get this error it means it's not correct :) Do you get it just after sending init packet or whole fw? In the first case make sure it's signed with correct key, the same used in the bootloader. In the second case - you must have alerted the bin file.
I've had reports of DFU failing on Samsung S8 and OnePlus 5 (Android 7 on both). The reports come from end users so I do not have detailed logs. The users are able to run DFU to same nRF52 device with same DFU package on Samsung S5 and ZTE Blade Android 7 on both.
Additionally S8 user reports that DFU service failures started after recent Android update. I can contact the users for more detailed reports if necessary, please give exact instructions on how to report if more details are needed.
I facing this problem . I fork this project, and then disable resume feature by modify source code. It is working fine.
@yjwfn Could you please share your solution ?
@Beremor I found performDfu
method in SecureDfuImpl
first, and then you can see two methods
sendInitPacket(gatt)
and sendFirmware(gatt)
within it. The methods will correct CRC before send package, you can make it always not equals to CRC of you package. This is not very nice solution, hope DFULibrary can add some options to disable it.
I'll add an option to do fresh DFU in 1.8.0.
Released in 1.8.0
On a bunch of different devices, everything works normal and fine (like Samsung S7Edge, A5, S6, Nexus5, MotoXPlay). I run tests several times with same result.