#LWM2M #Leshan #FirmwareUpdate #lwm2m #leshan #firmwareupdate


Thomas LE ROUX
 

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 :

  • Pushing using 5/0/0 :

    • File above 200ko can’t be pushed without an issue occuring (packets stop downloading and 5/0/3 remain at the value 1 (meaning « downloading ») afterwards.

    • The .elf generated for samples/basic/hello_world is around 400ko which causes an issue here.

    • The .bin generated, however, weight around 100ko which is fine.

      • The file uploads (result can be seen on my terminal).

        • [00:00:28.040,000] <inf> net_lwm2m_client_app: FIRMWARE: BLOCK RECEIVED: len:37 last_block:1

      • The 5/0/3 State value goes to 2 (« downloaded »).

      • When I execute 5/0/2 (Update) : 5/0/5 (Update Result) goes to 1 (meaning Firmware updated successfully).

      • However, nothing happens, and my QEMU continue to respond to requests, no flash occurs.

  • Pulling using 5/0/1 :

    • I've run a local server in order to make a firmware update through 5/0/1 by giving the http address of .bin and .elf.

    • When I try to Update (for .elf or .bin, i have the following Update Result : 9 (meaning « Unsupported protocol » )

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 !

Best regards,

Thomas


Join devel@lists.zephyrproject.org to automatically receive all group messages.