Contiki-coap

From Glacsweb Wiki
Jump to: navigation, search

initial tests on z1 alone from er-rest-examples from contiki master tree

Patch needed: in platform/z1/contiki-conf.h change UIP_CONF_BUFFER_SIZE to 240

contiki/examples/er-rest-example$ make TARGET=z1 er-example-server.upload

to put the simple example on one node:

then run the usual rpl-border-router.

Load Copper add-in to Firefox

browse something like coap://[aaaa::c30c:0:0:1290]:5683

press Discover: GET the hello as an example or POST the toggle to flip the led

Linux-side client

californium Java code - can be tested with a URL arg like:

java -jar cf-helloworld-client-1.0.0-SNAPSHOT.jar  coap://[aaaa::c30c:0:0:1290]:5683/test/hello

libcoap C code also works well:

coap-client -m get coap://[aaaa::c30c:0:0:1290]:5683/test/hello
coap-client -m post coap://[aaaa::c30c:0:0:1290]:5683/actuators/toggle

TxThings python: works OK

test the GET example by editing the host IP and resource in the code


openwsn python library:

I needed to install Pydispatcher and Pylint (sudo pip install ...) and edit IP and port in the example client..

no luck so far though - with any contiki er- example there is some waiting for ACK confusion