From 9b41b02de1f47215aeeed0d9e9929db10663efd7 Mon Sep 17 00:00:00 2001 From: fros4943 Date: Wed, 1 Apr 2009 18:09:20 +0000 Subject: [PATCH] added another ipv6 udp test: identical setup as the sky_ipv6_udp test, but with contiki motes (native ipv6) --- tools/cooja/contiki_tests/cooja_ipv6_udp.csc | 163 ++++++++++++++++++ tools/cooja/contiki_tests/cooja_ipv6_udp.info | 1 + tools/cooja/contiki_tests/cooja_ipv6_udp.js | 21 +++ 3 files changed, 185 insertions(+) create mode 100644 tools/cooja/contiki_tests/cooja_ipv6_udp.csc create mode 100644 tools/cooja/contiki_tests/cooja_ipv6_udp.info create mode 100644 tools/cooja/contiki_tests/cooja_ipv6_udp.js diff --git a/tools/cooja/contiki_tests/cooja_ipv6_udp.csc b/tools/cooja/contiki_tests/cooja_ipv6_udp.csc new file mode 100644 index 000000000..92dfc0b94 --- /dev/null +++ b/tools/cooja/contiki_tests/cooja_ipv6_udp.csc @@ -0,0 +1,163 @@ + + + + My simulation + 0 + 1 + 123456 + 1000 + + se.sics.cooja.radiomediums.UDGM + 50.0 + 100.0 + 1.0 + 1.0 + + + se.sics.cooja.contikimote.ContikiMoteType + mtype17 + Receiver + ../../../examples/udp-receiver-ipv6/example-udp-receiver.c + make example-udp-receiver.cooja TARGET=cooja DEFINES=WITH_UIP6=1,UIP_CONF_IPV6=1,UDP_ADDR_A=0xfe80,UDP_ADDR_B=0,UDP_ADDR_C=0,UDP_ADDR_D=0,UDP_ADDR_E=0x2,UDP_ADDR_F=0x2ff,UDP_ADDR_G=0xfe02,UDP_ADDR_H=0x0202 + se.sics.cooja.interfaces.Position + se.sics.cooja.interfaces.Battery + se.sics.cooja.contikimote.interfaces.ContikiVib + se.sics.cooja.contikimote.interfaces.ContikiMoteID + se.sics.cooja.contikimote.interfaces.ContikiRS232 + se.sics.cooja.contikimote.interfaces.ContikiBeeper + se.sics.cooja.contikimote.interfaces.ContikiIPAddress + se.sics.cooja.contikimote.interfaces.ContikiRadio + se.sics.cooja.contikimote.interfaces.ContikiButton + se.sics.cooja.contikimote.interfaces.ContikiPIR + se.sics.cooja.contikimote.interfaces.ContikiClock + se.sics.cooja.contikimote.interfaces.ContikiLED + se.sics.cooja.contikimote.interfaces.ContikiCFS + se.sics.cooja.interfaces.Mote2MoteRelations + false + uIPv6 + + + se.sics.cooja.contikimote.ContikiMoteType + mtype18 + Sender + ../../../examples/udp-sender-ipv6/example-udp-sender.c + make example-udp-sender.cooja TARGET=cooja DEFINES=WITH_UIP6=1,UIP_CONF_IPV6=1,UDP_ADDR_A=0xfe80,UDP_ADDR_B=0,UDP_ADDR_C=0,UDP_ADDR_D=0,UDP_ADDR_E=0x301,UDP_ADDR_F=0x1ff,UDP_ADDR_G=0xfe01,UDP_ADDR_H=0x101 + se.sics.cooja.interfaces.Position + se.sics.cooja.interfaces.Battery + se.sics.cooja.contikimote.interfaces.ContikiVib + se.sics.cooja.contikimote.interfaces.ContikiMoteID + se.sics.cooja.contikimote.interfaces.ContikiRS232 + se.sics.cooja.contikimote.interfaces.ContikiBeeper + se.sics.cooja.contikimote.interfaces.ContikiIPAddress + se.sics.cooja.contikimote.interfaces.ContikiRadio + se.sics.cooja.contikimote.interfaces.ContikiButton + se.sics.cooja.contikimote.interfaces.ContikiPIR + se.sics.cooja.contikimote.interfaces.ContikiClock + se.sics.cooja.contikimote.interfaces.ContikiLED + se.sics.cooja.contikimote.interfaces.ContikiCFS + se.sics.cooja.interfaces.Mote2MoteRelations + false + uIPv6 + + + se.sics.cooja.contikimote.ContikiMote + mtype17 + + se.sics.cooja.interfaces.Position + 98.76075470611741 + 30.469519951198897 + 0.0 + + + se.sics.cooja.interfaces.Battery + false + + + se.sics.cooja.contikimote.interfaces.ContikiMoteID + 1 + + + se.sics.cooja.contikimote.interfaces.ContikiIPAddress + fe80.0000.0000.0000.0301.01ff.fe01.0101 + + + + se.sics.cooja.contikimote.ContikiMote + mtype18 + + se.sics.cooja.interfaces.Position + 58.59043340181549 + 22.264557758786697 + 0.0 + + + se.sics.cooja.interfaces.Battery + false + + + se.sics.cooja.contikimote.interfaces.ContikiMoteID + 2 + + + se.sics.cooja.contikimote.interfaces.ContikiIPAddress + fe80.0000.0000.0000.0002.02ff.fe02.0202 + + + + + se.sics.cooja.plugins.SimControl + 248 + 5 + 200 + 0 + 0 + false + + + se.sics.cooja.plugins.Visualizer + + Radio environment (UDGM) + + 300 + 3 + 300 + 714 + 0 + false + + + se.sics.cooja.plugins.LogListener + + ID:1 + 256 + + 1014 + 1 + 284 + 0 + 564 + false + + + se.sics.cooja.plugins.Visualizer + + printf()'s + LEDs + + 300 + 4 + 300 + 414 + 1 + false + + + se.sics.cooja.plugins.RadioLogger + 1014 + 2 + 261 + 0 + 301 + false + + + diff --git a/tools/cooja/contiki_tests/cooja_ipv6_udp.info b/tools/cooja/contiki_tests/cooja_ipv6_udp.info new file mode 100644 index 000000000..1ade5ba13 --- /dev/null +++ b/tools/cooja/contiki_tests/cooja_ipv6_udp.info @@ -0,0 +1 @@ +Two COOJA nodes: examples/udp-receiver-ipv6/example-udp-receiver.c and examples/udp-sender-ipv6/example-udp-sender.c. Test success after 5 replies diff --git a/tools/cooja/contiki_tests/cooja_ipv6_udp.js b/tools/cooja/contiki_tests/cooja_ipv6_udp.js new file mode 100644 index 000000000..b32fa8c0c --- /dev/null +++ b/tools/cooja/contiki_tests/cooja_ipv6_udp.js @@ -0,0 +1,21 @@ +TIMEOUT(100000, log.log("last msg: " + msg + "\n")); /* print last msg at timeout */ + +WAIT_UNTIL(msg.contains("Created connection")); +YIELD_THEN_WAIT_UNTIL(msg.contains("Created connection")); + +log.log("Both nodes booted\n"); + +count = 0; +while (count++ < 5) { + /* Message from sender process to receiver process */ + YIELD_THEN_WAIT_UNTIL(msg.contains("Sender sending")); + YIELD_THEN_WAIT_UNTIL(msg.contains("Receiver received")); + log.log(count + ": Sender -> Receiver OK\n"); + + /* Message from receiver process to sender process */ + YIELD_THEN_WAIT_UNTIL(msg.contains("Receiver sending")); + YIELD_THEN_WAIT_UNTIL(msg.contains("Sender received")); + log.log(count + ": Receiver -> Sender OK\n"); +} + +log.testOK(); /* Report test success and quit */