diff --git a/examples/ipso-objects/README.md b/examples/ipso-objects/README.md deleted file mode 100644 index e9be82dcb..000000000 --- a/examples/ipso-objects/README.md +++ /dev/null @@ -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. - diff --git a/examples/ipv6-hooks/Makefile b/examples/libs/ipv6-hooks/Makefile similarity index 84% rename from examples/ipv6-hooks/Makefile rename to examples/libs/ipv6-hooks/Makefile index be8cc953e..63085face 100644 --- a/examples/ipv6-hooks/Makefile +++ b/examples/libs/ipv6-hooks/Makefile @@ -1,5 +1,5 @@ CONTIKI_PROJECT = ipv6-hooks all: $(CONTIKI_PROJECT) -CONTIKI=../.. +CONTIKI=../../.. include $(CONTIKI)/Makefile.include diff --git a/examples/ipv6-hooks/README.md b/examples/libs/ipv6-hooks/README.md similarity index 100% rename from examples/ipv6-hooks/README.md rename to examples/libs/ipv6-hooks/README.md diff --git a/examples/ipv6-hooks/ipv6-hooks.c b/examples/libs/ipv6-hooks/ipv6-hooks.c similarity index 100% rename from examples/ipv6-hooks/ipv6-hooks.c rename to examples/libs/ipv6-hooks/ipv6-hooks.c diff --git a/examples/ipso-objects/Makefile b/examples/lwm2m-ipso-objects/Makefile similarity index 100% rename from examples/ipso-objects/Makefile rename to examples/lwm2m-ipso-objects/Makefile diff --git a/examples/lwm2m-ipso-objects/README.md b/examples/lwm2m-ipso-objects/README.md new file mode 100644 index 000000000..30cc5832f --- /dev/null +++ b/examples/lwm2m-ipso-objects/README.md @@ -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. diff --git a/examples/ipso-objects/example-ipso-objects.c b/examples/lwm2m-ipso-objects/example-ipso-objects.c similarity index 100% rename from examples/ipso-objects/example-ipso-objects.c rename to examples/lwm2m-ipso-objects/example-ipso-objects.c diff --git a/examples/ipso-objects/example-ipso-temperature.c b/examples/lwm2m-ipso-objects/example-ipso-temperature.c similarity index 100% rename from examples/ipso-objects/example-ipso-temperature.c rename to examples/lwm2m-ipso-objects/example-ipso-temperature.c diff --git a/examples/ipso-objects/example-server.c b/examples/lwm2m-ipso-objects/example-server.c similarity index 100% rename from examples/ipso-objects/example-server.c rename to examples/lwm2m-ipso-objects/example-server.c diff --git a/examples/ipso-objects/project-conf.h b/examples/lwm2m-ipso-objects/project-conf.h similarity index 100% rename from examples/ipso-objects/project-conf.h rename to examples/lwm2m-ipso-objects/project-conf.h diff --git a/examples/ipso-objects/serial-protocol.c b/examples/lwm2m-ipso-objects/serial-protocol.c similarity index 100% rename from examples/ipso-objects/serial-protocol.c rename to examples/lwm2m-ipso-objects/serial-protocol.c diff --git a/examples/ipso-objects/serial-protocol.h b/examples/lwm2m-ipso-objects/serial-protocol.h similarity index 100% rename from examples/ipso-objects/serial-protocol.h rename to examples/lwm2m-ipso-objects/serial-protocol.h diff --git a/examples/http-socket/Makefile b/examples/websocket/Makefile similarity index 100% rename from examples/http-socket/Makefile rename to examples/websocket/Makefile diff --git a/examples/http-socket/http-example.c b/examples/websocket/http-example.c similarity index 100% rename from examples/http-socket/http-example.c rename to examples/websocket/http-example.c diff --git a/examples/http-socket/project-conf.h b/examples/websocket/project-conf.h similarity index 100% rename from examples/http-socket/project-conf.h rename to examples/websocket/project-conf.h diff --git a/examples/http-socket/websocket-example.c b/examples/websocket/websocket-example.c similarity index 100% rename from examples/http-socket/websocket-example.c rename to examples/websocket/websocket-example.c diff --git a/examples/http-socket/websocket-node/Makefile b/examples/websocket/websocket-node/Makefile similarity index 100% rename from examples/http-socket/websocket-node/Makefile rename to examples/websocket/websocket-node/Makefile diff --git a/examples/http-socket/websocket-node/example-server.js b/examples/websocket/websocket-node/example-server.js similarity index 100% rename from examples/http-socket/websocket-node/example-server.js rename to examples/websocket/websocket-node/example-server.js diff --git a/tests/01-compile-base/Makefile b/tests/01-compile-base/Makefile index 17ee36bf4..1d09fd3a0 100644 --- a/tests/01-compile-base/Makefile +++ b/tests/01-compile-base/Makefile @@ -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 \ diff --git a/tests/02-compile-arm-ports-01/Makefile b/tests/02-compile-arm-ports-01/Makefile index 51b232173..1ecf59fe4 100644 --- a/tests/02-compile-arm-ports-01/Makefile +++ b/tests/02-compile-arm-ports-01/Makefile @@ -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 \ diff --git a/tests/03-compile-arm-ports-02/Makefile b/tests/03-compile-arm-ports-02/Makefile index a69ec44a0..a4e1947e8 100644 --- a/tests/03-compile-arm-ports-02/Makefile +++ b/tests/03-compile-arm-ports-02/Makefile @@ -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= diff --git a/tests/18-coap-lwm2m/06-lwm2m-ipso-test.sh b/tests/18-coap-lwm2m/06-lwm2m-ipso-test.sh index 7684044a8..9aacc2976 100755 --- a/tests/18-coap-lwm2m/06-lwm2m-ipso-test.sh +++ b/tests/18-coap-lwm2m/06-lwm2m-ipso-test.sh @@ -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