Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [leshan-dev] Firmware updates using LWM2M / Leshan

Hi,
How the firmware update should work with LWM2M:

The server write update package the /5/0/1 URI.
So the device start download the package pointed by the URI and update the /5/0/3 from value 1 (Idle) to 2 (Downloading)
and 3 (Downloaded) when the package is ready to install.

The server should then (after reading /5/0/3 and seeing he download was sucessfull) start the update by sending the execute on /5/0/2.
After that the server should monitor the /5/0/5 and wait for a final result.

Maybe Manu you have an example of a firmware update using the java client?
HTH
Julien

On Sat Feb 07 2015 at 12:27:59 Davy De Waele <ddewaele@xxxxxxxxx> wrote:
Hi,

I've got a basic client / server up and running using Leshan and can read write basic values and execute standalone operations (ex: rebooting a device).

What I would like to do now is the following : Update the firmware of a device that is running the lwm2m client (java based leshan client) 

Am i correct in saying that I need to do the following :

  • Set a correct value for Package URI (/5/0/1), representing a URI that will be used by the client during the firmware update. (ex: a URL where the firmware is located)
  • Execute the actual firmware update (/5/0/2). The LWM2M client needs to read the Package URI to download the new firmware and do what it needs to do to install the new firmware on the device.

I was looking at the LeshanClientExample (https://github.com/jvermillard/leshan/blob/master/leshan-client-example/src/main/java/org/eclipse/leshan/client/example/LeshanClientExample.java) and I can intercept the firmware update action using an ExecutableResource.

From within the ExecutableResource (/5/0/2) handleExecute method, I suppose I need to retrieve the Package URI ? Does Leshan provide a way to read that resource, do I need to execute a Coap call myself ? 

Are there some code samples out there that show how to do this ?

Thanks.



_______________________________________________
leshan-dev mailing list
leshan-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/leshan-dev

Back to the top