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:
Fredrik Osterlind 2012-05-30 14:31:25 +02:00
parent f411da8bd8
commit 5788560946
2 changed files with 27 additions and 27 deletions

View file

@ -41,10 +41,10 @@
<motetype> <motetype>
se.sics.cooja.mspmote.SkyMoteType se.sics.cooja.mspmote.SkyMoteType
<identifier>skyweb</identifier> <identifier>skyweb</identifier>
<description>Rest</description> <description>Rest server</description>
<source EXPORT="discard">[CONTIKI_DIR]/examples/er-rest-example/rest-server-example.c</source> <source EXPORT="discard">[CONTIKI_DIR]/examples/er-rest-example/er-example-server.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> <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/rest-server-example.sky</firmware> <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.Position</moteinterface>
<moteinterface>se.sics.cooja.interfaces.RimeAddress</moteinterface> <moteinterface>se.sics.cooja.interfaces.RimeAddress</moteinterface>
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface> <moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
@ -121,11 +121,11 @@
<filter /> <filter />
<coloring /> <coloring />
</plugin_config> </plugin_config>
<width>582</width> <width>576</width>
<z>2</z> <z>0</z>
<height>393</height> <height>492</height>
<location_x>6</location_x> <location_x>12</location_x>
<location_y>259</location_y> <location_y>260</location_y>
</plugin> </plugin>
<plugin> <plugin>
se.sics.cooja.plugins.RadioLogger se.sics.cooja.plugins.RadioLogger
@ -160,15 +160,15 @@
<zoomfactor>24060.2737326431</zoomfactor> <zoomfactor>24060.2737326431</zoomfactor>
</plugin_config> </plugin_config>
<width>579</width> <width>579</width>
<z>3</z> <z>2</z>
<height>152</height> <height>152</height>
<location_x>13</location_x> <location_x>6</location_x>
<location_y>655</location_y> <location_y>758</location_y>
</plugin> </plugin>
<plugin> <plugin>
se.sics.cooja.plugins.Notes se.sics.cooja.plugins.Notes
<plugin_config> <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 * One REST server, and one RPL border router w. corresponding tun0 netif
* ContikiMAC is disabled to make firmwares fit on Tmote Sky nodes. * ContikiMAC is disabled to make firmwares fit on Tmote Sky nodes.
* Additional compile-time DEFINES used in this simulation: * 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 * $ ping6 -c 10 -I tun0 aaaa::212:7402:2:202
* $ wget -t 1 -T 10 -O - http://[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: The final test uses the CoAP Java implementation by Matthias Kovatsch, downloaded from:
See: https://github.com/dapaulid/JCoAP https://github.com/mkovatsc/Californium/blob/master/run/ExampleClient.jar
To download jar-file: $ wget --no-check-certificate http://github.com/dapaulid/JCoAP/raw/master/run/SampleClient.jar * $ java -jar ExampleClient.jar DISCOVER coap://[aaaa::212:7402:2:202]
</notes> * $ java -jar ExampleClient.jar GET coap://[aaaa::212:7402:2:202]/hello</notes>
<decorations>true</decorations> <decorations>true</decorations>
</plugin_config> </plugin_config>
<width>751</width> <width>751</width>
<z>1</z> <z>3</z>
<height>252</height> <height>369</height>
<location_x>439</location_x> <location_x>439</location_x>
<location_y>3</location_y> <location_y>3</location_y>
</plugin> </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> <scriptfile>[CONFIG_DIR]/rest_rpl_coap.js</scriptfile>
<active>true</active> <active>true</active>
</plugin_config> </plugin_config>
<width>600</width> <width>596</width>
<z>0</z> <z>1</z>
<height>584</height> <height>725</height>
<location_x>592</location_x> <location_x>591</location_x>
<location_y>260</location_y> <location_y>225</location_y>
</plugin> </plugin>
<plugin> <plugin>
PowerTracker PowerTracker

View file

@ -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_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_ROUTER = "wget -t 1 -T 10 -O - http:\/\/[" + ADDRESS_ROUTER + "]";
CMD_WGET_SERVER = "wget -t 1 -T 10 -O - http:\/\/[" + ADDRESS_SERVER + "]"; 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 */ /* delay */
msg = ""; msg = "";
@ -123,7 +123,7 @@ log.log(testname + "\n");
testSummary += testname; testSummary += testname;
processOutput = ""; processOutput = "";
executeAndWait("java -jar " + COAP_SAMPLECLIENT_JAR + " DISCOVER coap:\/\/[" + ADDRESS_SERVER + "]"); 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"; testSummary += ": OK\n";
} else { } else {
testSummary += ": FAILED\n"; testSummary += ": FAILED\n";