mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
updated to use the renamed examples under /examples/er-rest-example,
using Californium CoAP to perform CoAP tests (DISCOVER and GET)
This commit is contained in:
parent
f411da8bd8
commit
5788560946
@ -41,10 +41,10 @@
|
||||
<motetype>
|
||||
se.sics.cooja.mspmote.SkyMoteType
|
||||
<identifier>skyweb</identifier>
|
||||
<description>Rest</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/er-rest-example/rest-server-example.c</source>
|
||||
<commands EXPORT="discard">make rest-server-example.sky TARGET=sky DEFINES=NETSTACK_MAC=nullmac_driver,NETSTACK_RDC=nullrdc_driver,NULLRDC_CONF_802154_AUTOACK=0,CC2420_CONF_AUTOACK=0,ENERGEST_CONF_ON=0,PROCESS_CONF_NO_PROCESS_NAMES=1</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/er-rest-example/rest-server-example.sky</firmware>
|
||||
<description>Rest server</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/er-rest-example/er-example-server.c</source>
|
||||
<commands EXPORT="discard">make er-example-server.sky TARGET=sky DEFINES=NETSTACK_MAC=nullmac_driver,NETSTACK_RDC=nullrdc_driver,NULLRDC_CONF_802154_AUTOACK=0,CC2420_CONF_AUTOACK=0,ENERGEST_CONF_ON=0,PROCESS_CONF_NO_PROCESS_NAMES=1</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/er-rest-example/er-example-server.sky</firmware>
|
||||
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
|
||||
@ -121,11 +121,11 @@
|
||||
<filter />
|
||||
<coloring />
|
||||
</plugin_config>
|
||||
<width>582</width>
|
||||
<z>2</z>
|
||||
<height>393</height>
|
||||
<location_x>6</location_x>
|
||||
<location_y>259</location_y>
|
||||
<width>576</width>
|
||||
<z>0</z>
|
||||
<height>492</height>
|
||||
<location_x>12</location_x>
|
||||
<location_y>260</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.RadioLogger
|
||||
@ -160,15 +160,15 @@
|
||||
<zoomfactor>24060.2737326431</zoomfactor>
|
||||
</plugin_config>
|
||||
<width>579</width>
|
||||
<z>3</z>
|
||||
<z>2</z>
|
||||
<height>152</height>
|
||||
<location_x>13</location_x>
|
||||
<location_y>655</location_y>
|
||||
<location_x>6</location_x>
|
||||
<location_y>758</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.Notes
|
||||
<plugin_config>
|
||||
<notes>Nightly test based on simulation in examples/er-rest-example/rest-server-example.csc:
|
||||
<notes>Nightly test exercising Contiki's Erbium CoAP implementation:
|
||||
* One REST server, and one RPL border router w. corresponding tun0 netif
|
||||
* ContikiMAC is disabled to make firmwares fit on Tmote Sky nodes.
|
||||
* Additional compile-time DEFINES used in this simulation:
|
||||
@ -185,15 +185,15 @@ The test script communicates with the REST server via the RPL border router usin
|
||||
* $ ping6 -c 10 -I tun0 aaaa::212:7402:2:202
|
||||
* $ wget -t 1 -T 10 -O - http://[aaaa::212:7402:2:202]
|
||||
|
||||
The final test uses CoAP to talk to the server, and requires an external Java library:
|
||||
See: https://github.com/dapaulid/JCoAP
|
||||
To download jar-file: $ wget --no-check-certificate http://github.com/dapaulid/JCoAP/raw/master/run/SampleClient.jar
|
||||
</notes>
|
||||
<decorations>true</decorations>
|
||||
The final test uses the CoAP Java implementation by Matthias Kovatsch, downloaded from:
|
||||
https://github.com/mkovatsc/Californium/blob/master/run/ExampleClient.jar
|
||||
* $ java -jar ExampleClient.jar DISCOVER coap://[aaaa::212:7402:2:202]
|
||||
* $ java -jar ExampleClient.jar GET coap://[aaaa::212:7402:2:202]/hello</notes>
|
||||
<decorations>true</decorations>
|
||||
</plugin_config>
|
||||
<width>751</width>
|
||||
<z>1</z>
|
||||
<height>252</height>
|
||||
<z>3</z>
|
||||
<height>369</height>
|
||||
<location_x>439</location_x>
|
||||
<location_y>3</location_y>
|
||||
</plugin>
|
||||
@ -203,11 +203,11 @@ To download jar-file: $ wget --no-check-certificate http://github.com/dapaulid/J
|
||||
<scriptfile>[CONFIG_DIR]/rest_rpl_coap.js</scriptfile>
|
||||
<active>true</active>
|
||||
</plugin_config>
|
||||
<width>600</width>
|
||||
<z>0</z>
|
||||
<height>584</height>
|
||||
<location_x>592</location_x>
|
||||
<location_y>260</location_y>
|
||||
<width>596</width>
|
||||
<z>1</z>
|
||||
<height>725</height>
|
||||
<location_x>591</location_x>
|
||||
<location_y>225</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
PowerTracker
|
||||
|
@ -8,7 +8,7 @@ CMD_PING_PREFIX = "ping6 -c " + NR_PINGS + " -I tun0 ";
|
||||
CMD_TUNNEL = "./tunslip6 -a 127.0.0.1 aaaa::1/64"; // "make connect-router-cooja";
|
||||
CMD_WGET_ROUTER = "wget -t 1 -T 10 -O - http:\/\/[" + ADDRESS_ROUTER + "]";
|
||||
CMD_WGET_SERVER = "wget -t 1 -T 10 -O - http:\/\/[" + ADDRESS_SERVER + "]";
|
||||
COAP_SAMPLECLIENT_JAR = "/home/user/JCoAP/SampleClient.jar";
|
||||
COAP_SAMPLECLIENT_JAR = "/home/user/Californium/ExampleClient.jar";
|
||||
|
||||
/* delay */
|
||||
msg = "";
|
||||
@ -123,7 +123,7 @@ log.log(testname + "\n");
|
||||
testSummary += testname;
|
||||
processOutput = "";
|
||||
executeAndWait("java -jar " + COAP_SAMPLECLIENT_JAR + " DISCOVER coap:\/\/[" + ADDRESS_SERVER + "]");
|
||||
if (processOutput.indexOf("+[.well-known]") != -1) {
|
||||
if (processOutput.indexOf("+[.well-known/core]") != -1) {
|
||||
testSummary += ": OK\n";
|
||||
} else {
|
||||
testSummary += ": FAILED\n";
|
||||
|
Loading…
Reference in New Issue
Block a user