I’m not sure if the firmware update is even achievable on qemu_x86 platform (same goes with reboot). The lwm2m_client sample does not implement the actual FW update procedure, just provide stubs to get the communication going.
I’ve included some more replies inline below.
From: devel@... <devel@...> On Behalf Of Thomas LE ROUX via lists.zephyrproject.org
Sent: poniedziałek, 2 listopada 2020 17:14
Subject: [Zephyr-devel] #LWM2M #Leshan #FirmwareUpdate
Hi everybody !
I'm trying to build a projet using Zephyr & LWM2M (& Leshan).
TL;DR before I start explaining more precisely my issue :
Having issue making a Firmware Update on a QEMU_x86 instance.
Has anyone been able to successfully achieve a Firmware Upgrade ? How ?
For now, I'm prototyping through QEMU.
I have made my small application to test things out, creating objects and ressources ; defining new .xml files … There's one last thing that I need to succeed before going deeper into my project : Firmware Update. I am unable to make a firmware update on my QEMU instance.
I am actually using a Leshan localhost as my LWM2M server.
I’ve tried several things :
Try increasing the “Response Timeout” parameter in the Leshan web UI. The Leshan will cease to transmit further updates if it does not finish the operation before “Response timeout”.
Nothing else can be expected from the sample at this point (as I said I’m not sure if it’s possible to do the actual firmware update of the qemu_x86 image). From the LwM2M point of view, the FW update procedure
is complete as the entire image was delivered to the device. You can check how does it work with an actual device for instance here:
This is happening because http is not implemented as a FW delivery method in the LwM2M library. For now, only CoAP block transfer is supported.
The problem might be related to the fact that some functions are not yet implemented in Zephyr (e.g : Device reboot on 3/0/4 leads to a callback doing « /* Change the battery voltage for testing */ » and no reboot, same for Factory Default ) …
My problem is pretty much described, if needed, I can send some logs.
Thank you for your help !