Merge pull request #423 from simonduq/contrib/example-lwm2m
Reworking examples directory structure
This commit is contained in:
commit
f6f081b67f
@ -1,48 +0,0 @@
|
||||
IPSO Objects Example
|
||||
============================================
|
||||
|
||||
This is an example of how to make use of the IPSO Object and LWM2M
|
||||
implementation in Contiki.
|
||||
|
||||
The LWM2M implementation is based on the Erbium CoAP implementation
|
||||
and consists of two apps: lwm2m-engine and ipso-objects. The
|
||||
lwm2m-engine handle the specifics of LWM2M including bootstrapping and
|
||||
how read/writes of objects and resources are handled. The ipso-objects
|
||||
contains implementations of some of the IPSO Smart Objects.
|
||||
|
||||
The implementation was used during the IPSO Interop in May 2015,
|
||||
Kista, Sweden, and was successfully tested with other
|
||||
implementations.
|
||||
|
||||
The examples use some of the basic IPSO object for controlling LEDs on
|
||||
Contiki devices and for reading out temperature.
|
||||
|
||||
##Testing IPSO-objects with Leshan
|
||||
|
||||
First program a device with the examples/ipso-objects/example-ipso-objects.c
|
||||
|
||||
```bash
|
||||
>make example-ipso-objects.upload TARGET=zoul
|
||||
>...
|
||||
```
|
||||
|
||||
After that start up a native-border router or other border router on fd00::1/64
|
||||
or another prefix - NOTE: if you use another prefix you will need to change LWM2M_SERVER_ADDRESS for which the device will register - in project-conf.h:
|
||||
```
|
||||
#define LWM2M_SERVER_ADDRESS "fd00::1"
|
||||
```
|
||||
|
||||
Then when everything is setup you can download a Leshan and use that to
|
||||
test controlling LEDs of the device.
|
||||
|
||||
###Starting Leshan
|
||||
```bash
|
||||
wget https://hudson.eclipse.org/leshan/job/leshan/lastSuccessfulBuild/artifact/leshan-standalone.jar
|
||||
java -jar ./leshan-standalone.jar
|
||||
```
|
||||
Browse to leshans device page with http://127.0.0.1:8080 .
|
||||
|
||||
When you have started the border-router and also Leshan you should now
|
||||
start (or reboot) your IPSO Object enabled device. Within 30 seconds
|
||||
you should be able to see it on the Leshan device page.
|
||||
|
@ -1,5 +1,5 @@
|
||||
CONTIKI_PROJECT = ipv6-hooks
|
||||
all: $(CONTIKI_PROJECT)
|
||||
|
||||
CONTIKI=../..
|
||||
CONTIKI=../../..
|
||||
include $(CONTIKI)/Makefile.include
|
10
examples/lwm2m-ipso-objects/README.md
Normal file
10
examples/lwm2m-ipso-objects/README.md
Normal file
@ -0,0 +1,10 @@
|
||||
LWM2M with IPSO Objects Example
|
||||
============================================
|
||||
|
||||
This is an OMA LWM2M example implementing IPSO Objects.
|
||||
It can connect to a Leshan server out-of-the-box.
|
||||
Important configuration paramters:
|
||||
* `LWM2M_SERVER_ADDRESS`: the address of the server to register to (or bosstrap from)
|
||||
* `REGISTER_WITH_LWM2M_BOOTSTRAP_SERVER`: set to bootstrap via `LWM2M_SERVER_ADDRESS` and then obtain the registration server address
|
||||
|
||||
A tutorial for setting up this example is provided on the wiki.
|
@ -14,13 +14,13 @@ libs/energest/sky \
|
||||
libs/data-structures/native \
|
||||
libs/data-structures/sky \
|
||||
libs/stack-check/sky \
|
||||
ipso-objects/native \
|
||||
ipso-objects/native:MAKE_WITH_DTLS=1 \
|
||||
lwm2m-ipso-objects/native \
|
||||
lwm2m-ipso-objects/native:MAKE_WITH_DTLS=1 \
|
||||
rpl-udp/sky \
|
||||
rpl-border-router/native \
|
||||
rpl-border-router/sky \
|
||||
slip-radio/sky \
|
||||
ipv6-hooks/sky \
|
||||
libs/ipv6-hooks/sky \
|
||||
nullnet/native \
|
||||
mqtt-client/native \
|
||||
|
||||
|
@ -40,7 +40,7 @@ sensniff/cc2538dk \
|
||||
rpl-udp/cc2538dk \
|
||||
coap/cc2538dk \
|
||||
slip-radio/cc2538dk \
|
||||
ipso-objects/cc2538dk \
|
||||
lwm2m-ipso-objects/cc2538dk \
|
||||
multicast/cc2538dk \
|
||||
dev/gpio-hal/cc2538dk \
|
||||
dev/leds/cc2538dk \
|
||||
|
@ -14,8 +14,8 @@ platform-specific/zoul/rtcc/zoul \
|
||||
platform-specific/zoul/zoul \
|
||||
coap/zoul \
|
||||
multicast/zoul \
|
||||
ipso-objects/zoul \
|
||||
ipso-objects/zoul:MAKE_WITH_DTLS=1 \
|
||||
lwm2m-ipso-objects/zoul \
|
||||
lwm2m-ipso-objects/zoul:MAKE_WITH_DTLS=1 \
|
||||
hello-world/zoul \
|
||||
sensniff/zoul \
|
||||
sensniff/zoul:ZOUL_CONF_SUB_GHZ_SNIFFER=1 \
|
||||
@ -28,7 +28,7 @@ libs/logging/zoul \
|
||||
6tisch/etsi-plugtest-2017/zoul:BOARD=remote \
|
||||
6tisch/6p-packet/zoul \
|
||||
6tisch/sixtop/zoul \
|
||||
http-socket/zoul \
|
||||
websocket/zoul \
|
||||
libs/timers/zoul \
|
||||
libs/energest/zoul \
|
||||
libs/trickle-library/zoul \
|
||||
@ -59,7 +59,7 @@ rpl-udp/openmote-cc2538 \
|
||||
dev/gpio-hal/openmote-cc2538 \
|
||||
dev/leds/openmote-cc2538 \
|
||||
rpl-border-router/openmote-cc2538 \
|
||||
ipv6-hooks/openmote-cc2538 \
|
||||
libs/ipv6-hooks/openmote-cc2538 \
|
||||
|
||||
TOOLS=
|
||||
|
||||
|
@ -9,9 +9,9 @@ IPADDR=fd00::302:304:506:708
|
||||
|
||||
# Starting Contiki-NG native node
|
||||
echo "Starting native node - lwm2m/ipso objects"
|
||||
make -C $CONTIKI/examples/ipso-objects clean >/dev/null
|
||||
make -C $CONTIKI/examples/ipso-objects > make.log 2> make.err
|
||||
sudo $CONTIKI/examples/ipso-objects/example-ipso-objects.native > node.log 2> node.err &
|
||||
make -C $CONTIKI/examples/lwm2m-ipso-objects clean >/dev/null
|
||||
make -C $CONTIKI/examples/lwm2m-ipso-objects > make.log 2> make.err
|
||||
sudo $CONTIKI/examples/lwm2m-ipso-objects/example-ipso-objects.native > node.log 2> node.err &
|
||||
CPID=$!
|
||||
sleep 10
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user