Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [leshan-dev] Ability to send over Firmware update to Wakamma device using Block2 option.

Hi Kai,

Yes I do have Leshan server pushing/writing firmware update to the device. The device is implemented in Wakaama. But the device is throwing an error saying :  "Block1 NOT IMPLEMENTED"
Looking at the code the embedded team has informed me that 'Block2' is implemented, and if I can send in firmware update to device using 'Block2' option. But I do not see an option to select or specify 'Block2'.
Here is the part of the code:

       byte[] fileInBytes = null;
         try {
             fileInBytes = Files.readAllBytes(path);
         } catch (IOException e) {
             e.printStackTrace();
         }
         Collection<Client> clients = lwServer.getClientRegistry().allClients();
         Iterator<Client> iterator = clients.iterator();
         Client client = null;
         while (iterator.hasNext()){
             client = iterator.next();
             if (client.getEndpoint().equals("DEVICE1")){
                 break;
             }
         }
 
         LwM2mResource resource = LwM2mSingleResource.newBinaryResource(0, fileInBytes);
         WriteRequest writeRequest = new WriteRequest(5,0,0, resource, null, true);
         lwServer.send(client, writeRequest);
        
        
Thanks !    
 

From: Hudalla Kai (INST/ESY) <Kai.Hudalla@xxxxxxxxxxxx>
To: Joey Smith <talkjoey@xxxxxxxxx>; leshan developer discussions <leshan-dev@xxxxxxxxxxx>
Sent: Sunday, November 22, 2015 11:42 PM
Subject: AW: [leshan-dev] Ability to send over Firmware update to Wakamma device using Block2 option.

Hi,

let my try to understand the use case a little better. I am assuming that you would like to write the "package" resource of the Firmware object from the server side in order to "push" a firmware update to the device, right?

Mit freundlichen Grüßen / Best regards

Kai Hudalla

Chief Software Architect
Technology Strategy

Bosch Software Innovations GmbH
Schöneberger Ufer 89-91
10785 Berlin
GERMANY
www.bosch-si.com

Phone +49 (30) 726112-159
Mobile +49 (151) 54336335
kai.hudalla@xxxxxxxxxxxx

Registered office: Berlin, Register court: Amtsgericht Charlottenburg, HRB 148411 B;
Executives: Dr.-Ing. Rainer Kallenbach, Michael Hahn

________________________________________



Von: leshan-dev-bounces@xxxxxxxxxxx [leshan-dev-bounces@xxxxxxxxxxx]&quot; im Auftrag von &quot;Joey Smith [talkjoey@xxxxxxxxx]
Gesendet: Montag, 23. November 2015 7:09
An: Leshan Developer Discussions
Betreff: [leshan-dev] Ability to send over Firmware update to Wakamma device using Block2 option.

Hi,

Is it possible to send a request of type BLOCK2 from the Leshan server ?

Thanks !



Back to the top