Wakaama_RIOT

Hey guys, sorry to worry you’ll. I just graduated, and I’m an intern. I need to update a STM32 device over the air using a Leshan Server, and a Wakaama Client (RIOT). I managed to send a .bin file from the Server to the RIOT_Wakaama client using the Linux native interface. I used the 2015 RIOT_Wakaama client example created by Robby14 (Github), as i do not know how to use the Wakaama pkg in the RIOT base. Any ideas on how i should proceed with this task? How do I use the wakaama pkg? Any advice would be greatly appreciated!

With thanks Brenton

Hello Brenton,

There's an open PR with a basic LWM2M Wakaama client for RIOT here [1]. You can maybe give it a look.

Does this solve your issue?

Cheers, José

[1]: https://github.com/RIOT-OS/RIOT/pull/11036

Thanks, José. I have been reviewing the PR, and I agree it definitely is usable. I think Leandro has addressed everything to this point.

Brenton, as you can see on the PR, you should be able to build and run the example. Please add your comments on that PR as well.

Thanks, Ken

Hi Brenton,

As José pointed out, that PR only implements some basic objects. To perform the update the device should expose a "Firmware Update Object" [2].

In the Wakaama repo there is an example of a basic structure for that object [3]. Take a look of how I added the Light Control object to have an idea on how the package can be extended with new objects, and how to instantiate them. The example application should work.

As Ken mentioned any comments or improvements on the PR are very welcome.

Cheers, Leandro.

[2]: http://www.openmobilealliance.org/tech/profiles/LWM2M_Firmware_Update-v1_0_2.xml

[3]: https://github.com/eclipse/wakaama/blob/master/examples/client/object_firmware.c

Hi

I’ve had a look at the implementation pointed out by José. I cannot get the Leshan server to register the client though. The client gets stuck with output

-> State: STATE_REGISTERING

I think the IP addresses or possibly some bootstrapping procedure might be the problem. I changed the IP address in the makefile to [::1]. Wireshark shows a packet being sent to port 53 over UDP. Should this not be all the client information sent to port 5683 using CoAP? What am I doing wrong?

Regards Brenton

Hi Brenton,

Are you trying to use a bootstrapping server as well as the a normal one? Are you testing this on native or on a board? I assume your server is listening on port 5683 right?

What I usually do for testing is:

- Run the local Leshan server - Use the tapsetup script to create the interfaces - Check the local IP for tapbr0 and use it as server URI - Compile and run the RIOT node

You should see the CoAP message of the node registering to the server. Please tell me if that works.

Cheers, Leandro.

Hi

I've had a look at the implementation pointed out by José. I cannot get the Leshan server to register the client though. The client gets stuck with output -> State: STATE_REGISTERING I think the IP addresses or possibly some bootstrapping procedure might be the problem. I changed the IP address in the makefile to [::1]. Wireshark shows a packet being sent to port 53 over UDP. Should this not be all the client information sent to port 5683 using CoAP? What am I doing wrong?

Regards Brenton

> Hi Brenton, > > As José pointed out, that PR only implements some basic objects. To > perform the update the device should expose a "Firmware Update > Object" > [2]. > > In the Wakaama repo there is an example of a basic structure for > that > object [3]. Take a look of how I added the Light Control object to > have > an idea on how the package can be extended with new objects, and > how to > instantiate them. The example application should work. > > As Ken mentioned any comments or improvements on the PR are very > welcome. > > Cheers, > Leandro. > > [2]: >

http://www.openmobilealliance.org/tech/profiles/LWM2M_Firmware_Update-v1_0_2.xml

> > [3]: >

Hey Leandro, it’s working now. Thank you so much.I had forgotten to create the tap interfaces😂. I don’t plan on using the bootstrap server for now, and i was testing on native. I will test on a board tomorrow, when i get back to work. Once again, thanks for all the help

Regards

Brenton

Hey guys, we tried putting the wakaama onto a STM32 nucleo-f746zg board which has ethernet functionality. How do we connect the board to the leshan server? I have searched a lot but can’t seem to find any documentation on what to do. How do we enable ethernet functionality in RIOT? Is ethernet over serial an option to consider? Also when using a Board, which Server URI should we use?

Regards Brenton

Hi Brenton,

From the point of view of LWM2M your server needs an IP that is

reachable by the node. That said, I believe we don't yet have support for the PHY chip on the nucleo-f746zg.

Ethos should work for you. Please check the README in dist/tools/ethos. The gnrc_border_router example applcation makes use of this. If you use the script for ethos, I think you should be able to use fd00:dead:beef::1 as the IP for your server URI.

Cheers, Leandro.

Hey guys, we tried putting the wakaama onto a STM32 nucleo-f746zg board which has ethernet functionality. How do we connect the board to the leshan server? I have searched a lot but can't seem to find any documentation on what to do. How do we enable ethernet functionality in RIOT? Is ethernet over serial an option to consider? Also when using a Board, which Server URI should we use?

Regards Brenton

> Hey Leandro, it's working now. Thank you so much.I had forgotten to > create the tap interfaces😂. I don't plan on using the bootstra > p server for now, and i was testing on native. I will test on a > board tomorrow, when i get back to work. Once again, thanks for all > the help > > Regards > Brenton > > > Hi Brenton, > > > > Are you trying to use a bootstrapping server as well as the a > > normal > > one? Are you testing this on native or on a board? I assume your > > server > > is listening on port 5683 right? > > > > What I usually do for testing is: > > > > - Run the local Leshan server > > - Use the tapsetup script to create the interfaces > > - Check the local IP for tapbr0 and use it as server URI > > - Compile and run the RIOT node > > > > You should see the CoAP message of the node registering to the > > server. > > Please tell me if that works. > > > > Cheers, > > Leandro. > > > > > Hi > > > > > > I've had a look at the implementation pointed out by José. I > > cannot > > > get the Leshan server to register the client though. The client > > gets > > > stuck with output > > > -> State: STATE_REGISTERING > > > I think the IP addresses or possibly some bootstrapping > > procedure > > > might be the problem. I changed the IP address in the makefile > > to > > > [::1]. Wireshark shows a packet being sent to port 53 over UDP. > > > Should this not be all the client information sent to port 5683 > > using > > > CoAP? What am I doing wrong? > > > > > > Regards > > > Brenton > > > > > > > Hi Brenton, > > > > > > > > As José pointed out, that PR only implements some basic > > objects. To > > > > perform the update the device should expose a "Firmware > > Update > > > > Object" > > > > [2]. > > > > > > > > In the Wakaama repo there is an example of a basic structure > > for > > > > that > > > > object [3]. Take a look of how I added the Light Control > > object to > > > > have > > > > an idea on how the package can be extended with new objects, > > and > > > > how to > > > > instantiate them. The example application should work. > > > > > > > > As Ken mentioned any comments or improvements on the PR are > > very > > > > welcome. > > > > > > > > Cheers, > > > > Leandro. > > > > > > > > [2]: > > > > > >

http://www.openmobilealliance.org/tech/profiles/LWM2M_Firmware_Update-v1_0_2.xml

> > > > > > > > [3]: > > > > > >