RFC: LwM2M subsystem + sample client for Zephyr


Michael Scott <michael.scott@...>
 

Hi all,

I'm currently working on a pull request to introduce a Lightweight Machine-to-Machine (LwM2M) library to Zephyr. If you are interested, please see:
https://github.com/zephyrproject-rtos/zephyr/pull/712

You can pull the Zephyr branch that this PR is based on from:
https://github.com/mike-scott/zephyr/tree/lwm2m-new
(NOTE: this branch will get force pushed as further revisions happen to the PR)

Brief instructions for testing:

The sample for LWM2M can be run via QEMU by following the instructions here:
https://github.com/zephyrproject-rtos/zephyr/blob/master/doc/subsystems/networking/qemu_setup.rst

To start with you will want to use Leshan LWM2M demo server:
[terminal window #1]
$ wget https://hudson.eclipse.org/leshan/job/leshan/lastSuccessfulBuild/artifact/leshan-server-demo.jar
$ java -jar ./leshan-server-demo.jar
(You can now open a web browser to http://localhost:8080/ to watch connections)

Next, checkout https://github.com/zephyrproject-rtos/net-tools and follow the build instructions referenced above. After they are built, start up the slip tools:
[terminal window #2]
$ ./loop-socat.sh

[terminal window #3]
$ sudo ./loop-slip-tap.sh

Now you can cd to your checkout of Zephyr (with LwM2M) and build the sample for QEMU target:
[terminal window #4]
$ export ZEPHYR_SDK_INSTALL_DIR=<path to Zephyr SDK>
$ export ZEPHYR_GCC_VARIANT=zephyr
$ . zephyr-env.sh
$ make -C samples/net/lwm2m_client qemu

You should see the sample app connect to Leshan and register twice (IPv4 connection and IPv6 connection). Feel free to navigate around Leshan and play with the QEMU LWM2M client.

I look forward to your comments and if you get a chance please take a look at the PR: https://github.com/zephyrproject-rtos/zephyr/pull/712

- Mike

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