diff --git a/.travis.yml b/.travis.yml
index 16fb5abd3..d4060c893 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,6 +2,9 @@
# See https://github.com/travis-ci/travis-ci/issues/6928#issuecomment-264227708
group: deprecated
+before_install:
+ - sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0
+
notifications:
email: false
language: c #NOTE: this will set CC=gcc which might cause trouble
@@ -106,3 +109,5 @@ env:
- BUILD_TYPE='base' BUILD_CATEGORY='sim'
- BUILD_TYPE='ieee802154' BUILD_CATEGORY='sim'
- BUILD_TYPE='6tisch' BUILD_CATEGORY='sim'
+ - BUILD_TYPE='rpl-border-router' BUILD_CATEGORY='sim'
+ - BUILD_TYPE='native-networking' BUILD_CATEGORY='sim'
diff --git a/arch/cpu/cc2538/lpm.c b/arch/cpu/cc2538/lpm.c
index 9e21fe4dc..7892ff204 100644
--- a/arch/cpu/cc2538/lpm.c
+++ b/arch/cpu/cc2538/lpm.c
@@ -212,10 +212,14 @@ lpm_exit()
/* Restore system clock to the 32 MHz XOSC */
select_32_mhz_xosc();
+ if((REG(SYS_CTRL_PMCTL) & SYS_CTRL_PMCTL_PM3) == SYS_CTRL_PMCTL_PM1) {
+ ENERGEST_SWITCH(ENERGEST_TYPE_LPM, ENERGEST_TYPE_CPU);
+ } else {
+ ENERGEST_SWITCH(ENERGEST_TYPE_DEEP_LPM, ENERGEST_TYPE_CPU);
+ }
+
/* Restore PMCTL to PM0 for next pass */
REG(SYS_CTRL_PMCTL) = SYS_CTRL_PMCTL_PM0;
-
- ENERGEST_SWITCH(ENERGEST_TYPE_LPM, ENERGEST_TYPE_CPU);
}
/*---------------------------------------------------------------------------*/
void
@@ -286,8 +290,6 @@ lpm_enter()
REG(SYS_CTRL_PMCTL) = SYS_CTRL_PMCTL_PM1;
}
- ENERGEST_SWITCH(ENERGEST_TYPE_CPU, ENERGEST_TYPE_LPM);
-
/* Remember the current time so we can keep stats when we wake up */
if(LPM_CONF_STATS) {
sleep_enter_time = RTIMER_NOW();
@@ -310,9 +312,13 @@ lpm_enter()
REG(SYS_CTRL_PMCTL) = SYS_CTRL_PMCTL_PM0;
- ENERGEST_SWITCH(ENERGEST_TYPE_LPM, ENERGEST_TYPE_CPU);
} else {
/* All clear. Assert WFI and drop to PM1/2. This is now un-interruptible */
+ if((REG(SYS_CTRL_PMCTL) & SYS_CTRL_PMCTL_PM3) == SYS_CTRL_PMCTL_PM1) {
+ ENERGEST_SWITCH(ENERGEST_TYPE_CPU, ENERGEST_TYPE_LPM);
+ } else {
+ ENERGEST_SWITCH(ENERGEST_TYPE_CPU, ENERGEST_TYPE_DEEP_LPM);
+ }
assert_wfi();
}
diff --git a/arch/cpu/cc26xx-cc13xx/lpm.c b/arch/cpu/cc26xx-cc13xx/lpm.c
index 48ded636e..a5e746f24 100644
--- a/arch/cpu/cc26xx-cc13xx/lpm.c
+++ b/arch/cpu/cc26xx-cc13xx/lpm.c
@@ -185,7 +185,7 @@ wake_up(void)
{
lpm_registered_module_t *module;
- ENERGEST_SWITCH(ENERGEST_TYPE_LPM, ENERGEST_TYPE_CPU);
+ ENERGEST_SWITCH(ENERGEST_TYPE_DEEP_LPM, ENERGEST_TYPE_CPU);
/* Sync so that we get the latest values before adjusting recharge settings */
ti_lib_sys_ctrl_aon_sync();
@@ -485,7 +485,7 @@ deep_sleep(void)
ti_lib_pwr_ctrl_source_set(PWRCTRL_PWRSRC_ULDO);
}
- ENERGEST_SWITCH(ENERGEST_TYPE_CPU, ENERGEST_TYPE_LPM);
+ ENERGEST_SWITCH(ENERGEST_TYPE_CPU, ENERGEST_TYPE_DEEP_LPM);
/* Sync the AON interface to ensure all writes have gone through. */
ti_lib_sys_ctrl_aon_sync();
diff --git a/arch/platform/cc2538dk/dev/board.h b/arch/platform/cc2538dk/dev/board.h
index 3b3836c58..6e3021ceb 100644
--- a/arch/platform/cc2538dk/dev/board.h
+++ b/arch/platform/cc2538dk/dev/board.h
@@ -71,13 +71,6 @@
* @{
*/
/*---------------------------------------------------------------------------*/
-/* Some files include leds.h before us, so we need to get rid of defaults in
- * leds.h before we provide correct definitions */
-#undef LEDS_GREEN
-#undef LEDS_YELLOW
-#undef LEDS_RED
-#undef LEDS_CONF_ALL
-
#define LEDS_YELLOW 2 /**< LED2 (Yellow) -> PC1 */
#define LEDS_GREEN 4 /**< LED3 (Green) -> PC2 */
#define LEDS_ORANGE 8 /**< LED4 (Orange) -> PC3 */
diff --git a/arch/platform/cooja/contiki-conf.h b/arch/platform/cooja/contiki-conf.h
index 638297730..7dea26e17 100644
--- a/arch/platform/cooja/contiki-conf.h
+++ b/arch/platform/cooja/contiki-conf.h
@@ -87,8 +87,6 @@
#define NBR_TABLE_CONF_MAX_NEIGHBORS 300
#endif /* NBR_TABLE_CONF_MAX_NEIGHBORS */
-#define TCPIP_CONF_ANNOTATE_TRANSMISSIONS 1
-
#ifndef UIP_CONF_IPV6_QUEUE_PKT
#define UIP_CONF_IPV6_QUEUE_PKT 1
#endif /* UIP_CONF_IPV6_QUEUE_PKT */
diff --git a/arch/platform/openmote-cc2538/board.h b/arch/platform/openmote-cc2538/board.h
index e3ce027f2..56724a753 100644
--- a/arch/platform/openmote-cc2538/board.h
+++ b/arch/platform/openmote-cc2538/board.h
@@ -63,13 +63,6 @@
* @{
*/
/*---------------------------------------------------------------------------*/
-/* Some files include leds.h before us, so we need to get rid of defaults in
- * leds.h before we provide correct definitions */
-#undef LEDS_GREEN
-#undef LEDS_YELLOW
-#undef LEDS_RED
-#undef LEDS_CONF_ALL
-
#define LEDS_RED 16 /**< LED1 (Red) -> PC4 */
#define LEDS_YELLOW 64 /**< LED2 (Yellow) -> PC6 */
#define LEDS_GREEN 128 /**< LED3 (Green) -> PC7 */
diff --git a/arch/platform/srf06-cc26xx/launchpad/cc1310/board.h b/arch/platform/srf06-cc26xx/launchpad/cc1310/board.h
index a4b2efbba..1d56d776a 100644
--- a/arch/platform/srf06-cc26xx/launchpad/cc1310/board.h
+++ b/arch/platform/srf06-cc26xx/launchpad/cc1310/board.h
@@ -60,13 +60,6 @@
* Those values are not meant to be modified by the user
* @{
*/
-/* Some files include leds.h before us, so we need to get rid of defaults in
- * leds.h before we provide correct definitions */
-#undef LEDS_GREEN
-#undef LEDS_YELLOW
-#undef LEDS_RED
-#undef LEDS_CONF_ALL
-
#define LEDS_RED 1
#define LEDS_GREEN 2
#define LEDS_YELLOW LEDS_GREEN
diff --git a/arch/platform/srf06-cc26xx/launchpad/cc1350/board.h b/arch/platform/srf06-cc26xx/launchpad/cc1350/board.h
index e645b8b0b..9b5019179 100644
--- a/arch/platform/srf06-cc26xx/launchpad/cc1350/board.h
+++ b/arch/platform/srf06-cc26xx/launchpad/cc1350/board.h
@@ -60,13 +60,6 @@
* Those values are not meant to be modified by the user
* @{
*/
-/* Some files include leds.h before us, so we need to get rid of defaults in
- * leds.h before we provide correct definitions */
-#undef LEDS_GREEN
-#undef LEDS_YELLOW
-#undef LEDS_RED
-#undef LEDS_CONF_ALL
-
#define LEDS_RED 1
#define LEDS_GREEN 2
#define LEDS_YELLOW LEDS_GREEN
diff --git a/arch/platform/srf06-cc26xx/launchpad/cc2650/board.h b/arch/platform/srf06-cc26xx/launchpad/cc2650/board.h
index 9b9d00bf0..65a5bb766 100644
--- a/arch/platform/srf06-cc26xx/launchpad/cc2650/board.h
+++ b/arch/platform/srf06-cc26xx/launchpad/cc2650/board.h
@@ -60,13 +60,6 @@
* Those values are not meant to be modified by the user
* @{
*/
-/* Some files include leds.h before us, so we need to get rid of defaults in
- * leds.h before we provide correct definitions */
-#undef LEDS_GREEN
-#undef LEDS_YELLOW
-#undef LEDS_RED
-#undef LEDS_CONF_ALL
-
#define LEDS_RED 1
#define LEDS_GREEN 2
#define LEDS_YELLOW LEDS_GREEN
diff --git a/arch/platform/srf06-cc26xx/sensortag/cc1350/board.h b/arch/platform/srf06-cc26xx/sensortag/cc1350/board.h
index 7db4c9357..dbd64e538 100644
--- a/arch/platform/srf06-cc26xx/sensortag/cc1350/board.h
+++ b/arch/platform/srf06-cc26xx/sensortag/cc1350/board.h
@@ -63,13 +63,6 @@
* Those values are not meant to be modified by the user
* @{
*/
-/* Some files include leds.h before us, so we need to get rid of defaults in
- * leds.h before we provide correct definitions */
-#undef LEDS_GREEN
-#undef LEDS_YELLOW
-#undef LEDS_RED
-#undef LEDS_CONF_ALL
-
#define LEDS_RED 1
#define LEDS_GREEN LEDS_RED
#define LEDS_YELLOW LEDS_RED
diff --git a/arch/platform/srf06-cc26xx/sensortag/cc2650/board.h b/arch/platform/srf06-cc26xx/sensortag/cc2650/board.h
index 0cf828850..977712ef2 100644
--- a/arch/platform/srf06-cc26xx/sensortag/cc2650/board.h
+++ b/arch/platform/srf06-cc26xx/sensortag/cc2650/board.h
@@ -63,13 +63,6 @@
* Those values are not meant to be modified by the user
* @{
*/
-/* Some files include leds.h before us, so we need to get rid of defaults in
- * leds.h before we provide correct definitions */
-#undef LEDS_GREEN
-#undef LEDS_YELLOW
-#undef LEDS_RED
-#undef LEDS_CONF_ALL
-
#define LEDS_RED 1
#define LEDS_GREEN 2
#define LEDS_YELLOW LEDS_GREEN
diff --git a/arch/platform/srf06-cc26xx/srf06/cc13xx/board.h b/arch/platform/srf06-cc26xx/srf06/cc13xx/board.h
index 831c2ee33..e210d82d8 100644
--- a/arch/platform/srf06-cc26xx/srf06/cc13xx/board.h
+++ b/arch/platform/srf06-cc26xx/srf06/cc13xx/board.h
@@ -63,13 +63,6 @@
* Those values are not meant to be modified by the user
* @{
*/
-/* Some files include leds.h before us, so we need to get rid of defaults in
- * leds.h before we provide correct definitions */
-#undef LEDS_GREEN
-#undef LEDS_YELLOW
-#undef LEDS_RED
-#undef LEDS_CONF_ALL
-
#define LEDS_RED 1 /**< LED1 (Red) */
#define LEDS_YELLOW 2 /**< LED2 (Yellow) */
#define LEDS_GREEN 4 /**< LED3 (Green) */
diff --git a/arch/platform/srf06-cc26xx/srf06/cc26xx/board.h b/arch/platform/srf06-cc26xx/srf06/cc26xx/board.h
index 35080aea9..99f97fbf2 100644
--- a/arch/platform/srf06-cc26xx/srf06/cc26xx/board.h
+++ b/arch/platform/srf06-cc26xx/srf06/cc26xx/board.h
@@ -63,13 +63,6 @@
* Those values are not meant to be modified by the user
* @{
*/
-/* Some files include leds.h before us, so we need to get rid of defaults in
- * leds.h before we provide correct definitions */
-#undef LEDS_GREEN
-#undef LEDS_YELLOW
-#undef LEDS_RED
-#undef LEDS_CONF_ALL
-
#define LEDS_RED 1 /**< LED1 (Red) */
#define LEDS_YELLOW 2 /**< LED2 (Yellow) */
#define LEDS_GREEN 4 /**< LED3 (Green) */
diff --git a/arch/platform/zoul/firefly-reva/board.h b/arch/platform/zoul/firefly-reva/board.h
index fb72796c0..bea1fc746 100644
--- a/arch/platform/zoul/firefly-reva/board.h
+++ b/arch/platform/zoul/firefly-reva/board.h
@@ -98,14 +98,6 @@
* @{
*/
/*---------------------------------------------------------------------------*/
-/* Some files include leds.h before us, so we need to get rid of defaults in
- * leds.h before we provide correct definitions */
-#undef LEDS_GREEN
-#undef LEDS_YELLOW
-#undef LEDS_BLUE
-#undef LEDS_RED
-#undef LEDS_CONF_ALL
-
/* In leds.h the LEDS_BLUE is defined by LED_YELLOW definition */
#define LEDS_GREEN (1 << 4) /**< LED1 (Green) -> PD4 */
#define LEDS_BLUE (1 << 3) /**< LED2 (Blue) -> PD3 */
diff --git a/arch/platform/zoul/firefly/board.h b/arch/platform/zoul/firefly/board.h
index 0d90e4369..4a58fc0cc 100644
--- a/arch/platform/zoul/firefly/board.h
+++ b/arch/platform/zoul/firefly/board.h
@@ -98,14 +98,6 @@
* @{
*/
/*---------------------------------------------------------------------------*/
-/* Some files include leds.h before us, so we need to get rid of defaults in
- * leds.h before we provide correct definitions */
-#undef LEDS_GREEN
-#undef LEDS_YELLOW
-#undef LEDS_BLUE
-#undef LEDS_RED
-#undef LEDS_CONF_ALL
-
/* In leds.h the LEDS_BLUE is defined by LED_YELLOW definition */
#define LEDS_GREEN (1 << 4) /**< LED1 (Green) -> PD4 */
#define LEDS_BLUE (1 << 3) /**< LED2 (Blue) -> PD3 */
diff --git a/arch/platform/zoul/orion/board.h b/arch/platform/zoul/orion/board.h
index f0e7ba452..494d79372 100644
--- a/arch/platform/zoul/orion/board.h
+++ b/arch/platform/zoul/orion/board.h
@@ -67,14 +67,6 @@
* @{
*/
/*---------------------------------------------------------------------------*/
-/* Some files include leds.h before us, so we need to get rid of defaults in
- * leds.h before we provide correct definitions */
-#undef LEDS_GREEN
-#undef LEDS_YELLOW
-#undef LEDS_BLUE
-#undef LEDS_RED
-#undef LEDS_CONF_ALL
-
/* In leds.h the LEDS_BLUE is defined by LED_YELLOW definition */
#define LEDS_GREEN (1 << 4) /**< LED1 (Green) -> PD4 */
#define LEDS_BLUE (1 << 3) /**< LED2 (Blue) -> PD3 */
diff --git a/arch/platform/zoul/remote-reva/board.h b/arch/platform/zoul/remote-reva/board.h
index efb516c31..70a8ffdab 100644
--- a/arch/platform/zoul/remote-reva/board.h
+++ b/arch/platform/zoul/remote-reva/board.h
@@ -102,14 +102,6 @@
* @{
*/
/*---------------------------------------------------------------------------*/
-/* Some files include leds.h before us, so we need to get rid of defaults in
- * leds.h before we provide correct definitions */
-#undef LEDS_GREEN
-#undef LEDS_YELLOW
-#undef LEDS_BLUE
-#undef LEDS_RED
-#undef LEDS_CONF_ALL
-
/* In leds.h the LEDS_BLUE is defined by LED_YELLOW definition */
#define LEDS_GREEN (1 << 4) /**< LED1 (Green) -> PD4 */
#define LEDS_BLUE (1 << 3) /**< LED2 (Blue) -> PD3 */
diff --git a/arch/platform/zoul/remote-revb/board.h b/arch/platform/zoul/remote-revb/board.h
index fb50f13dc..432b4b062 100644
--- a/arch/platform/zoul/remote-revb/board.h
+++ b/arch/platform/zoul/remote-revb/board.h
@@ -105,12 +105,6 @@
* @{
*/
/*---------------------------------------------------------------------------*/
-#undef LEDS_GREEN
-#undef LEDS_YELLOW
-#undef LEDS_BLUE
-#undef LEDS_RED
-#undef LEDS_CONF_ALL
-
#define LEDS_RED 1 /**< LED1 (Red) -> PD4 */
#define LEDS_RED_PIN_MASK (1 << 4)
#define LEDS_RED_PORT_BASE GPIO_D_BASE
diff --git a/examples/6tisch/etsi-plugtest-2017/project-conf.h b/examples/6tisch/etsi-plugtest-2017/project-conf.h
index 751ccf977..7cb8158f0 100644
--- a/examples/6tisch/etsi-plugtest-2017/project-conf.h
+++ b/examples/6tisch/etsi-plugtest-2017/project-conf.h
@@ -121,6 +121,4 @@
#define LOG_CONF_LEVEL_6TOP LOG_LEVEL_DBG
#define TSCH_LOG_CONF_PER_SLOT 1
-#define TCPIP_CONF_ANNOTATE_TRANSMISSIONS 0
-
#endif /* __PROJECT_CONF_H__ */
diff --git a/os/dev/leds.c b/os/dev/leds.c
index 9273ad9ca..f7028f0c2 100644
--- a/os/dev/leds.c
+++ b/os/dev/leds.c
@@ -33,19 +33,11 @@
#include "dev/leds.h"
#include "sys/clock.h"
-static unsigned char leds;
-/*---------------------------------------------------------------------------*/
-static inline void
-show_leds(unsigned char new_leds)
-{
- leds_arch_set(new_leds);
-}
/*---------------------------------------------------------------------------*/
void
leds_init(void)
{
leds_arch_init();
- leds = 0;
}
/*---------------------------------------------------------------------------*/
void
@@ -53,7 +45,7 @@ leds_blink(void)
{
/* Blink all leds that were initially off. */
unsigned char blink;
- blink = ~leds;
+ blink = ~leds_arch_get();
leds_toggle(blink);
clock_delay(400);
@@ -69,24 +61,24 @@ leds_get(void) {
void
leds_set(unsigned char ledv)
{
- show_leds(ledv);
+ leds_arch_set(ledv);
}
/*---------------------------------------------------------------------------*/
void
leds_on(unsigned char ledv)
{
- show_leds(leds | ledv);
+ leds_arch_set(leds_arch_get() | ledv);
}
/*---------------------------------------------------------------------------*/
void
leds_off(unsigned char ledv)
{
- show_leds(leds & ~ledv);
+ leds_arch_set(leds_arch_get() & ~ledv);
}
/*---------------------------------------------------------------------------*/
void
leds_toggle(unsigned char ledv)
{
- show_leds(leds ^ ledv);
+ leds_arch_set(leds_arch_get() ^ ledv);
}
/*---------------------------------------------------------------------------*/
diff --git a/os/net/ipv6/sicslowpan.c b/os/net/ipv6/sicslowpan.c
index 2f239f77e..492dfe444 100644
--- a/os/net/ipv6/sicslowpan.c
+++ b/os/net/ipv6/sicslowpan.c
@@ -1504,6 +1504,17 @@ output(const linkaddr_t *localdest)
set_packet_attrs();
}
+#if UIP_WITH_VARIABLE_RETRANSMISSIONS
+ {
+ uint8_t traffic_class = (UIP_IP_BUF->vtc << 4) | (UIP_IP_BUF->tcflow >> 4);
+ if(traffic_class & UIP_TC_MAC_TRANSMISSION_COUNTER_BIT) {
+ uint8_t max_mac_transmissions = traffic_class & UIP_TC_MAC_TRANSMISSION_COUNTER_MASK;
+ /* propagate the MAC transmission limit to lower layers */
+ packetbuf_set_attr(PACKETBUF_ATTR_MAX_MAC_TRANSMISSIONS, max_mac_transmissions);
+ }
+ }
+#endif /* UIP_WITH_VARIABLE_RETRANSMISSIONS */
+
/*
* The destination address will be tagged to each outbound
* packet. If the argument localdest is NULL, we are sending a
diff --git a/os/net/ipv6/uip.h b/os/net/ipv6/uip.h
index 809f4b4bc..69888445e 100755
--- a/os/net/ipv6/uip.h
+++ b/os/net/ipv6/uip.h
@@ -820,6 +820,18 @@ CCIF void uip_send(const void *data, int len);
*/
#define uip_mss() (uip_conn->mss)
+/**
+ * Set the maximal number of MAC transmissions.
+ *
+ * \hideinitializer
+ */
+#if UIP_WITH_VARIABLE_RETRANSMISSIONS
+#define uip_set_max_mac_transmissions(conn, value) ((conn)->max_mac_transmissions = (value))
+#else
+#define uip_set_max_mac_transmissions(conn, value)
+#endif
+
+
/**
* Set up a new UDP connection.
*
@@ -883,6 +895,7 @@ struct uip_udp_conn *uip_udp_new(const uip_ipaddr_t *ripaddr, uint16_t rport);
*/
#define uip_udp_send(len) uip_send((char *)uip_appdata, len)
+
/** @} */
/* uIP convenience and converting functions. */
@@ -1352,6 +1365,9 @@ struct uip_conn {
uint8_t timer; /**< The retransmission timer. */
uint8_t nrtx; /**< The number of retransmissions for the last
segment sent. */
+#if UIP_WITH_VARIABLE_RETRANSMISSIONS
+ uint8_t max_mac_transmissions; /**< Number of max MAC-layer transmissions. */
+#endif
uip_tcp_appstate_t appstate; /** The application state. */
};
@@ -1389,6 +1405,9 @@ struct uip_udp_conn {
uint16_t lport; /**< The local port number in network byte order. */
uint16_t rport; /**< The remote port number in network byte order. */
uint8_t ttl; /**< Default time-to-live. */
+#if UIP_WITH_VARIABLE_RETRANSMISSIONS
+ uint8_t max_mac_transmissions; /**< Number of max MAC-layer transmissions. */
+#endif
/** The application state. */
uip_udp_appstate_t appstate;
diff --git a/os/net/ipv6/uip6.c b/os/net/ipv6/uip6.c
index b0cab3ebd..7a29c90bb 100644
--- a/os/net/ipv6/uip6.c
+++ b/os/net/ipv6/uip6.c
@@ -508,6 +508,9 @@ uip_connect(const uip_ipaddr_t *ripaddr, uint16_t rport)
conn->rto = UIP_RTO;
conn->sa = 0;
conn->sv = 16; /* Initial value of the RTT variance. */
+#if UIP_WITH_VARIABLE_RETRANSMISSIONS
+ conn->max_mac_transmissions = UIP_MAX_MAC_TRANSMISSIONS_UNDEFINED;
+#endif
conn->lport = uip_htons(lastport);
conn->rport = rport;
uip_ipaddr_copy(&conn->ripaddr, ripaddr);
@@ -581,6 +584,9 @@ uip_udp_new(const uip_ipaddr_t *ripaddr, uint16_t rport)
uip_ipaddr_copy(&conn->ripaddr, ripaddr);
}
conn->ttl = uip_ds6_if.cur_hop_limit;
+#if UIP_WITH_VARIABLE_RETRANSMISSIONS
+ conn->max_mac_transmissions = UIP_MAX_MAC_TRANSMISSIONS_UNDEFINED;
+#endif
return conn;
}
@@ -1224,7 +1230,7 @@ uip_process(uint8_t flag)
}
UIP_IP_BUF->ttl = UIP_IP_BUF->ttl - 1;
- LOG_INFO("Forwarding packet to ");
+ LOG_INFO("Forwarding packet towards ");
LOG_INFO_6ADDR(&UIP_IP_BUF->destipaddr);
LOG_INFO_("\n");
UIP_STAT(++uip_stat.ip.forwarded);
@@ -1358,6 +1364,31 @@ uip_process(uint8_t flag)
if(UIP_ROUTING_BUF->seg_left > 0) {
#if UIP_CONF_IPV6_RPL && RPL_WITH_NON_STORING
if(rpl_ext_header_srh_update()) {
+
+ /* With routing header, the detination address is us and will
+ * be swapped later to the next hop. Because of this, the MTU
+ * and TTL were not checked and updated yet. Do this now. */
+
+ /* Check MTU */
+ if(uip_len > UIP_LINK_MTU) {
+ uip_icmp6_error_output(ICMP6_PACKET_TOO_BIG, 0, UIP_LINK_MTU);
+ UIP_STAT(++uip_stat.ip.drop);
+ goto send;
+ }
+ /* Check Hop Limit */
+ if(UIP_IP_BUF->ttl <= 1) {
+ uip_icmp6_error_output(ICMP6_TIME_EXCEEDED,
+ ICMP6_TIME_EXCEED_TRANSIT, 0);
+ UIP_STAT(++uip_stat.ip.drop);
+ goto send;
+ }
+ UIP_IP_BUF->ttl = UIP_IP_BUF->ttl - 1;
+
+ LOG_INFO("Forwarding packet to next hop ");
+ LOG_INFO_6ADDR(&UIP_IP_BUF->destipaddr);
+ LOG_INFO_("\n");
+ UIP_STAT(++uip_stat.ip.forwarded);
+
goto send; /* Proceed to forwarding */
}
#endif /* UIP_CONF_IPV6_RPL && RPL_WITH_NON_STORING */
@@ -1545,6 +1576,16 @@ uip_process(uint8_t flag)
UIP_IP_BUF->len[0] = ((uip_len - UIP_IPH_LEN) >> 8);
UIP_IP_BUF->len[1] = ((uip_len - UIP_IPH_LEN) & 0xff);
+ UIP_IP_BUF->vtc = 0x60;
+ UIP_IP_BUF->tcflow = 0x00;
+#if UIP_WITH_VARIABLE_RETRANSMISSIONS
+ if(uip_udp_conn->max_mac_transmissions != UIP_MAX_MAC_TRANSMISSIONS_UNDEFINED) {
+ /* Encapsulate the MAC transmission limit in the Traffic Class field */
+ UIP_IP_BUF->vtc = 0x60 | (UIP_TC_MAC_TRANSMISSION_COUNTER_BIT >> 4);
+ UIP_IP_BUF->tcflow = uip_udp_conn->max_mac_transmissions << 4;
+ }
+#endif /* UIP_WITH_VARIABLE_RETRANSMISSIONS */
+
UIP_IP_BUF->ttl = uip_udp_conn->ttl;
UIP_IP_BUF->proto = UIP_PROTO_UDP;
@@ -2249,6 +2290,16 @@ uip_process(uint8_t flag)
UIP_TCP_BUF->srcport = uip_connr->lport;
UIP_TCP_BUF->destport = uip_connr->rport;
+ UIP_IP_BUF->vtc = 0x60;
+ UIP_IP_BUF->tcflow = 0x00;
+#if UIP_WITH_VARIABLE_RETRANSMISSIONS
+ if(uip_connr->max_mac_transmissions != UIP_MAX_MAC_TRANSMISSIONS_UNDEFINED) {
+ /* Encapsulate the MAC transmission limit in the Traffic Class field */
+ UIP_IP_BUF->vtc = 0x60 | (UIP_TC_MAC_TRANSMISSION_COUNTER_BIT >> 4);
+ UIP_IP_BUF->tcflow = uip_connr->max_mac_transmissions << 4;
+ }
+#endif /* UIP_WITH_VARIABLE_RETRANSMISSIONS */
+
uip_ipaddr_copy(&UIP_IP_BUF->destipaddr, &uip_connr->ripaddr);
uip_ds6_select_src(&UIP_IP_BUF->srcipaddr, &UIP_IP_BUF->destipaddr);
LOG_INFO("Sending TCP packet to ");
@@ -2284,8 +2335,6 @@ uip_process(uint8_t flag)
#if UIP_UDP
ip_send_nolen:
#endif
- UIP_IP_BUF->vtc = 0x60;
- UIP_IP_BUF->tcflow = 0x00;
UIP_IP_BUF->flow = 0x00;
send:
LOG_INFO("Sending packet with length %d (%d)\n", uip_len,
diff --git a/os/net/ipv6/uipopt.h b/os/net/ipv6/uipopt.h
index 84b7fd023..d668133a8 100644
--- a/os/net/ipv6/uipopt.h
+++ b/os/net/ipv6/uipopt.h
@@ -518,6 +518,35 @@ void uip_log(char *msg);
#define UIP_DEFAULT_PREFIX_LEN 64
+/**
+ * Enables selection of maximal MAC-layer transmission count at application layer
+ */
+#ifdef UIP_CONF_WITH_VARIABLE_RETRANSMISSIONS
+#define UIP_WITH_VARIABLE_RETRANSMISSIONS UIP_CONF_WITH_VARIABLE_RETRANSMISSIONS
+#else
+#define UIP_WITH_VARIABLE_RETRANSMISSIONS 0
+#endif
+
+/**
+ * This is the default value of MAC-layer transmissons for uIPv6
+ *
+ * It means that the limit is selected by the MAC protocol instead of uIPv6.
+ */
+#define UIP_MAX_MAC_TRANSMISSIONS_UNDEFINED 0
+
+/**
+ * The MAC-layer transmissons limit is encapslated in "Traffic Class" field
+ *
+ * In Contiki, if the Traffic Class field in the IPv6 header has this bit set,
+ * the low-order bits are used as the MAC-layer transmissons limit.
+ */
+#define UIP_TC_MAC_TRANSMISSION_COUNTER_BIT 0x40
+
+/**
+ * The bits in the "Traffic Class" field that describe the MAC transmission limit
+ */
+#define UIP_TC_MAC_TRANSMISSION_COUNTER_MASK 0x3F
+
/** @} */
/*------------------------------------------------------------------------------*/
diff --git a/os/net/mac/csma/csma-output.c b/os/net/mac/csma/csma-output.c
index 167d4374c..532b4ae7a 100644
--- a/os/net/mac/csma/csma-output.c
+++ b/os/net/mac/csma/csma-output.c
@@ -85,9 +85,9 @@
/* macMaxFrameRetries: Maximum number of re-transmissions attampts. Range 0--7 */
#ifdef CSMA_CONF_MAX_FRAME_RETRIES
-#define CSMA_MAX_MAX_FRAME_RETRIES CSMA_CONF_MAX_FRAME_RETRIES
+#define CSMA_MAX_FRAME_RETRIES CSMA_MAX_FRAME_RETRIES
#else
-#define CSMA_MAX_MAX_FRAME_RETRIES 7
+#define CSMA_MAX_FRAME_RETRIES 7
#endif
/* Packet metadata */
@@ -506,7 +506,15 @@ csma_output_packet(mac_callback_t sent, void *ptr)
if(q->buf != NULL) {
struct qbuf_metadata *metadata = (struct qbuf_metadata *)q->ptr;
/* Neighbor and packet successfully allocated */
- metadata->max_transmissions = CSMA_MAX_MAX_FRAME_RETRIES + 1;
+#if UIP_WITH_VARIABLE_RETRANSMISSIONS
+ metadata->max_transmissions = packetbuf_attr(PACKETBUF_ATTR_MAX_MAC_TRANSMISSIONS);
+ if(metadata->max_transmissions == 0) {
+ /* If not set by the application, use the default CSMA value */
+ metadata->max_transmissions = CSMA_MAX_FRAME_RETRIES + 1;
+ }
+#else
+ metadata->max_transmissions = CSMA_MAX_FRAME_RETRIES + 1;
+#endif
metadata->sent = sent;
metadata->cptr = ptr;
list_add(n->packet_queue, q);
diff --git a/os/net/mac/tsch/tsch-queue.c b/os/net/mac/tsch/tsch-queue.c
index 388953a60..7aee0d66a 100644
--- a/os/net/mac/tsch/tsch-queue.c
+++ b/os/net/mac/tsch/tsch-queue.c
@@ -230,7 +230,8 @@ tsch_queue_remove_nbr(struct tsch_neighbor *n)
/*---------------------------------------------------------------------------*/
/* Add packet to neighbor queue. Use same lockfree implementation as ringbuf.c (put is atomic) */
struct tsch_packet *
-tsch_queue_add_packet(const linkaddr_t *addr, mac_callback_t sent, void *ptr)
+tsch_queue_add_packet(const linkaddr_t *addr, uint8_t max_transmissions,
+ mac_callback_t sent, void *ptr)
{
struct tsch_neighbor *n = NULL;
int16_t put_index = -1;
@@ -252,6 +253,7 @@ tsch_queue_add_packet(const linkaddr_t *addr, mac_callback_t sent, void *ptr)
p->ptr = ptr;
p->ret = MAC_TX_DEFERRED;
p->transmissions = 0;
+ p->max_transmissions = max_transmissions;
/* Add to ringbuf (actual add committed through atomic operation) */
n->tx_array[put_index] = p;
ringbufindex_put(&n->tx_ringbuf);
@@ -342,7 +344,7 @@ tsch_queue_packet_sent(struct tsch_neighbor *n, struct tsch_packet *p,
}
} else {
/* Failed transmission */
- if(p->transmissions >= TSCH_MAC_MAX_FRAME_RETRIES + 1) {
+ if(p->transmissions >= p->max_transmissions) {
/* Drop packet */
tsch_queue_remove_packet_from_queue(n);
in_queue = 0;
diff --git a/os/net/mac/tsch/tsch-queue.h b/os/net/mac/tsch/tsch-queue.h
index 037461e7d..0d77a6105 100644
--- a/os/net/mac/tsch/tsch-queue.h
+++ b/os/net/mac/tsch/tsch-queue.h
@@ -135,6 +135,7 @@ struct tsch_packet {
mac_callback_t sent; /* callback for this packet */
void *ptr; /* MAC callback parameter */
uint8_t transmissions; /* #transmissions performed for this packet */
+ uint8_t max_transmissions; /* maximal number of Tx before dropping the packet */
uint8_t ret; /* status -- MAC return code */
uint8_t header_len; /* length of header and header IEs (needed for link-layer security) */
uint8_t tsch_sync_ie_offset; /* Offset within the frame used for quick update of EB ASN and join priority */
@@ -176,7 +177,8 @@ struct tsch_neighbor *tsch_queue_get_time_source(void);
/* Update TSCH time source */
int tsch_queue_update_time_source(const linkaddr_t *new_addr);
/* Add packet to neighbor queue. Use same lockfree implementation as ringbuf.c (put is atomic) */
-struct tsch_packet *tsch_queue_add_packet(const linkaddr_t *addr, mac_callback_t sent, void *ptr);
+struct tsch_packet *tsch_queue_add_packet(const linkaddr_t *addr, uint8_t max_transmissions,
+ mac_callback_t sent, void *ptr);
/* Returns the number of packets currently in any TSCH queue */
int tsch_queue_global_packet_count(void);
/* Returns the number of packets currently a given neighbor queue */
diff --git a/os/net/mac/tsch/tsch.c b/os/net/mac/tsch/tsch.c
index 017f6542c..bbaed827a 100644
--- a/os/net/mac/tsch/tsch.c
+++ b/os/net/mac/tsch/tsch.c
@@ -832,8 +832,8 @@ PROCESS_THREAD(tsch_send_eb_process, ev, data)
/* Prepare the EB packet and schedule it to be sent */
if(tsch_packet_create_eb(&hdr_len, &tsch_sync_ie_offset) > 0) {
struct tsch_packet *p;
- /* Enqueue EB packet */
- if(!(p = tsch_queue_add_packet(&tsch_eb_address, NULL, NULL))) {
+ /* Enqueue EB packet, for a single transmission only */
+ if(!(p = tsch_queue_add_packet(&tsch_eb_address, 1, NULL, NULL))) {
LOG_ERR("! could not enqueue EB packet\n");
} else {
LOG_INFO("TSCH: enqueue EB packet %u %u\n",
@@ -958,6 +958,7 @@ send_packet(mac_callback_t sent, void *ptr)
int ret = MAC_TX_DEFERRED;
int hdr_len = 0;
const linkaddr_t *addr = packetbuf_addr(PACKETBUF_ADDR_RECEIVER);
+ uint8_t max_transmissions = 0;
if(!tsch_is_associated) {
if(!tsch_is_initialized) {
@@ -1006,13 +1007,21 @@ send_packet(mac_callback_t sent, void *ptr)
packetbuf_set_addr(PACKETBUF_ADDR_SENDER, &linkaddr_node_addr);
#endif
+#if UIP_WITH_VARIABLE_RETRANSMISSIONS
+ max_transmissions = packetbuf_attr(PACKETBUF_ATTR_MAX_MAC_TRANSMISSIONS);
+#endif
+ if(max_transmissions == 0) {
+ /* If not set by the application, use the default TSCH value */
+ max_transmissions = TSCH_MAC_MAX_FRAME_RETRIES + 1;
+ }
+
if((hdr_len = NETSTACK_FRAMER.create()) < 0) {
LOG_ERR("! can't send packet due to framer error\n");
ret = MAC_TX_ERR;
} else {
struct tsch_packet *p;
/* Enqueue packet */
- p = tsch_queue_add_packet(addr, sent, ptr);
+ p = tsch_queue_add_packet(addr, max_transmissions, sent, ptr);
if(p == NULL) {
LOG_ERR("! can't send packet to ");
LOG_ERR_LLADDR(addr);
diff --git a/os/net/packetbuf.h b/os/net/packetbuf.h
index c16a3f8f1..706fe51d6 100644
--- a/os/net/packetbuf.h
+++ b/os/net/packetbuf.h
@@ -217,6 +217,9 @@ enum {
PACKETBUF_ATTR_LINK_QUALITY,
PACKETBUF_ATTR_RSSI,
PACKETBUF_ATTR_TIMESTAMP,
+#if UIP_WITH_VARIABLE_RETRANSMISSIONS
+ PACKETBUF_ATTR_MAX_MAC_TRANSMISSIONS,
+#endif /* UIP_WITH_VARIABLE_RETRANSMISSIONS */
PACKETBUF_ATTR_MAC_SEQNO,
PACKETBUF_ATTR_MAC_ACK,
PACKETBUF_ATTR_MAC_METADATA,
diff --git a/tests/13-ieee802154/code-flush-nbr-queue/test-flush-nbr-queue.c b/tests/13-ieee802154/code-flush-nbr-queue/test-flush-nbr-queue.c
index 9045f77e4..d8be606ac 100644
--- a/tests/13-ieee802154/code-flush-nbr-queue/test-flush-nbr-queue.c
+++ b/tests/13-ieee802154/code-flush-nbr-queue/test-flush-nbr-queue.c
@@ -58,7 +58,7 @@ UNIT_TEST(test)
UNIT_TEST_BEGIN();
- packet = tsch_queue_add_packet(TEST_PEER_ADDR, NULL, NULL);
+ packet = tsch_queue_add_packet(TEST_PEER_ADDR, 1, NULL, NULL);
UNIT_TEST_ASSERT(packet != NULL);
nbr = tsch_queue_get_nbr(TEST_PEER_ADDR);
@@ -68,14 +68,14 @@ UNIT_TEST(test)
* QUEUEBUF_CONF_NUM is set with 1; so another addition should fail due to
* lack of memory.
*/
- packet = tsch_queue_add_packet(TEST_PEER_ADDR, NULL, NULL);
+ packet = tsch_queue_add_packet(TEST_PEER_ADDR, 1, NULL, NULL);
UNIT_TEST_ASSERT(packet == NULL);
/* tsch_queue_flush_nbr_queue() is called inside of tsch_queue_reset(). */
tsch_queue_reset();
/* After flushing the nbr queue, we should be able to add a new packet */
- packet = tsch_queue_add_packet(TEST_PEER_ADDR, NULL, NULL);
+ packet = tsch_queue_add_packet(TEST_PEER_ADDR, 1, NULL, NULL);
UNIT_TEST_ASSERT(packet != NULL);
UNIT_TEST_END();
diff --git a/tests/14-rpl-lite/07-rpl-random-rearrangement.csc b/tests/14-rpl-lite/07-rpl-random-rearrangement.csc
index cdb62c420..16ba26e20 100644
--- a/tests/14-rpl-lite/07-rpl-random-rearrangement.csc
+++ b/tests/14-rpl-lite/07-rpl-random-rearrangement.csc
@@ -544,7 +544,7 @@ make receiver-node.cooja TARGET=cooja
}
function getRandom(min, max) {
- return Math.random() * (max - min) + min;
+ return r.nextFloat() * (max - min) + min;
}
// From: http://bost.ocks.org/mike/shuffle/
@@ -555,7 +555,7 @@ function shuffle(array) {
while (m) {
// Pick a remaining element…
- i = Math.floor(Math.random() * m--);
+ i = Math.floor(r.nextFloat() * m--);
// And swap it with the current element.
t = array[m];
@@ -571,6 +571,7 @@ GENERATE_MSG(1200000, 'randomize-nodes');
GENERATE_MSG(2400000, 'randomize-nodes');
GENERATE_MSG(3600000, 'randomize-nodes');
+var r = new java.util.Random(sim.getRandomSeed());
var numForwarders = 20;
var forwardIDStart = 4;
packetsReceived = [];
diff --git a/tests/15-rpl-classic/07-rpl-random-rearrangement.csc b/tests/15-rpl-classic/07-rpl-random-rearrangement.csc
index cdb62c420..16ba26e20 100644
--- a/tests/15-rpl-classic/07-rpl-random-rearrangement.csc
+++ b/tests/15-rpl-classic/07-rpl-random-rearrangement.csc
@@ -544,7 +544,7 @@ make receiver-node.cooja TARGET=cooja
}
function getRandom(min, max) {
- return Math.random() * (max - min) + min;
+ return r.nextFloat() * (max - min) + min;
}
// From: http://bost.ocks.org/mike/shuffle/
@@ -555,7 +555,7 @@ function shuffle(array) {
while (m) {
// Pick a remaining element…
- i = Math.floor(Math.random() * m--);
+ i = Math.floor(r.nextFloat() * m--);
// And swap it with the current element.
t = array[m];
@@ -571,6 +571,7 @@ GENERATE_MSG(1200000, 'randomize-nodes');
GENERATE_MSG(2400000, 'randomize-nodes');
GENERATE_MSG(3600000, 'randomize-nodes');
+var r = new java.util.Random(sim.getRandomSeed());
var numForwarders = 20;
var forwardIDStart = 4;
packetsReceived = [];
diff --git a/tests/17-rpl-border-router/01-border-router-cooja.csc b/tests/17-rpl-border-router/01-border-router-cooja.csc
new file mode 100644
index 000000000..a010d5ef2
--- /dev/null
+++ b/tests/17-rpl-border-router/01-border-router-cooja.csc
@@ -0,0 +1,252 @@
+
+
+ [APPS_DIR]/mrm
+ [APPS_DIR]/mspsim
+ [APPS_DIR]/avrora
+ [APPS_DIR]/serial_socket
+ [APPS_DIR]/collect-view
+ [APPS_DIR]/powertracker
+
+ My simulation
+ 1.0
+ 123456
+ 1000000
+
+ org.contikios.cooja.radiomediums.UDGM
+ 50.0
+ 100.0
+ 1.0
+ 1.0
+
+
+ 40000
+
+
+ org.contikios.cooja.contikimote.ContikiMoteType
+ mtype295
+ Cooja Mote Type #1
+
+ make TARGET=cooja clean
+make border-router.cooja TARGET=cooja
+ org.contikios.cooja.interfaces.Position
+ org.contikios.cooja.interfaces.Battery
+ org.contikios.cooja.contikimote.interfaces.ContikiVib
+ org.contikios.cooja.contikimote.interfaces.ContikiMoteID
+ org.contikios.cooja.contikimote.interfaces.ContikiRS232
+ org.contikios.cooja.contikimote.interfaces.ContikiBeeper
+ org.contikios.cooja.interfaces.RimeAddress
+ org.contikios.cooja.contikimote.interfaces.ContikiIPAddress
+ org.contikios.cooja.contikimote.interfaces.ContikiRadio
+ org.contikios.cooja.contikimote.interfaces.ContikiButton
+ org.contikios.cooja.contikimote.interfaces.ContikiPIR
+ org.contikios.cooja.contikimote.interfaces.ContikiClock
+ org.contikios.cooja.contikimote.interfaces.ContikiLED
+ org.contikios.cooja.contikimote.interfaces.ContikiCFS
+ org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
+ org.contikios.cooja.interfaces.Mote2MoteRelations
+ org.contikios.cooja.interfaces.MoteAttributes
+ false
+
+
+ org.contikios.cooja.contikimote.ContikiMoteType
+ mtype686
+ Cooja Mote Type #2
+
+ make TARGET=cooja clean
+make hello-world.cooja TARGET=cooja
+ org.contikios.cooja.interfaces.Position
+ org.contikios.cooja.interfaces.Battery
+ org.contikios.cooja.contikimote.interfaces.ContikiVib
+ org.contikios.cooja.contikimote.interfaces.ContikiMoteID
+ org.contikios.cooja.contikimote.interfaces.ContikiRS232
+ org.contikios.cooja.contikimote.interfaces.ContikiBeeper
+ org.contikios.cooja.interfaces.RimeAddress
+ org.contikios.cooja.contikimote.interfaces.ContikiIPAddress
+ org.contikios.cooja.contikimote.interfaces.ContikiRadio
+ org.contikios.cooja.contikimote.interfaces.ContikiButton
+ org.contikios.cooja.contikimote.interfaces.ContikiPIR
+ org.contikios.cooja.contikimote.interfaces.ContikiClock
+ org.contikios.cooja.contikimote.interfaces.ContikiLED
+ org.contikios.cooja.contikimote.interfaces.ContikiCFS
+ org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
+ org.contikios.cooja.interfaces.Mote2MoteRelations
+ org.contikios.cooja.interfaces.MoteAttributes
+ false
+
+
+
+ org.contikios.cooja.interfaces.Position
+ 54.36775767371176
+ 24.409055040864118
+ 0.0
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiMoteID
+ 1
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiRadio
+ 250.0
+
+
+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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
+
+ mtype295
+
+
+
+ org.contikios.cooja.interfaces.Position
+ 83.54989222799365
+ 52.63050856506214
+ 0.0
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiMoteID
+ 2
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiRadio
+ 250.0
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
+
+ mtype686
+
+
+
+ org.contikios.cooja.interfaces.Position
+ 139.91021061864723
+ 98.34190023350419
+ 0.0
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiMoteID
+ 4
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiRadio
+ 250.0
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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 true
+ org.contikios.cooja.plugins.skins.UDGMVisualizerSkin
+ org.contikios.cooja.plugins.skins.IDVisualizerSkin
+ 1.9798610460263038 0.0 0.0 1.9798610460263038 -61.112037797038525 -1.2848438586294648
+
+ 400
+ 4
+ 400
+ 1
+ 1
+
+
+ org.contikios.cooja.plugins.LogListener
+
+ ID:4
+
+
+
+ 1404
+ 2
+ 240
+ 400
+ 160
+
+
+ org.contikios.cooja.plugins.TimeLine
+
+ 0
+ 1
+ 2
+ 3
+
+
+
+ 500.0
+
+ 1804
+ 6
+ 166
+ 0
+ 753
+
+
+ org.contikios.cooja.plugins.Notes
+
+ Enter notes here
+ true
+
+ 1124
+ 5
+ 160
+ 680
+ 0
+
+
+ org.contikios.cooja.serialsocket.SerialSocketServer
+ 0
+
+ 60001
+ true
+
+ 362
+ 3
+ 116
+ 13
+ 414
+
+
+ org.contikios.cooja.plugins.ScriptRunner
+
+
+ true
+
+ 600
+ 0
+ 700
+ 1037
+ 40
+
+
diff --git a/tests/17-rpl-border-router/01-border-router-cooja.sh b/tests/17-rpl-border-router/01-border-router-cooja.sh
new file mode 100755
index 000000000..6a781583d
--- /dev/null
+++ b/tests/17-rpl-border-router/01-border-router-cooja.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+# Contiki directory
+CONTIKI=$1
+
+# Simulation file
+BASENAME=01-border-router-cooja
+
+bash test-border-router.sh $CONTIKI $BASENAME fd00::204:4:4:4
diff --git a/tests/17-rpl-border-router/02-border-router-cooja-tsch.csc b/tests/17-rpl-border-router/02-border-router-cooja-tsch.csc
new file mode 100644
index 000000000..011da9df3
--- /dev/null
+++ b/tests/17-rpl-border-router/02-border-router-cooja-tsch.csc
@@ -0,0 +1,252 @@
+
+
+ [APPS_DIR]/mrm
+ [APPS_DIR]/mspsim
+ [APPS_DIR]/avrora
+ [APPS_DIR]/serial_socket
+ [APPS_DIR]/collect-view
+ [APPS_DIR]/powertracker
+
+ My simulation
+ 1.0
+ 123456
+ 1000000
+
+ org.contikios.cooja.radiomediums.UDGM
+ 50.0
+ 100.0
+ 1.0
+ 1.0
+
+
+ 40000
+
+
+ org.contikios.cooja.contikimote.ContikiMoteType
+ mtype295
+ Cooja Mote Type #1
+
+ make TARGET=cooja clean
+make border-router.cooja TARGET=cooja MAKE_MAC=MAKE_MAC_TSCH
+ org.contikios.cooja.interfaces.Position
+ org.contikios.cooja.interfaces.Battery
+ org.contikios.cooja.contikimote.interfaces.ContikiVib
+ org.contikios.cooja.contikimote.interfaces.ContikiMoteID
+ org.contikios.cooja.contikimote.interfaces.ContikiRS232
+ org.contikios.cooja.contikimote.interfaces.ContikiBeeper
+ org.contikios.cooja.interfaces.RimeAddress
+ org.contikios.cooja.contikimote.interfaces.ContikiIPAddress
+ org.contikios.cooja.contikimote.interfaces.ContikiRadio
+ org.contikios.cooja.contikimote.interfaces.ContikiButton
+ org.contikios.cooja.contikimote.interfaces.ContikiPIR
+ org.contikios.cooja.contikimote.interfaces.ContikiClock
+ org.contikios.cooja.contikimote.interfaces.ContikiLED
+ org.contikios.cooja.contikimote.interfaces.ContikiCFS
+ org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
+ org.contikios.cooja.interfaces.Mote2MoteRelations
+ org.contikios.cooja.interfaces.MoteAttributes
+ false
+
+
+ org.contikios.cooja.contikimote.ContikiMoteType
+ mtype686
+ Cooja Mote Type #2
+
+ make TARGET=cooja clean
+make hello-world.cooja TARGET=cooja MAKE_MAC=MAKE_MAC_TSCH
+ org.contikios.cooja.interfaces.Position
+ org.contikios.cooja.interfaces.Battery
+ org.contikios.cooja.contikimote.interfaces.ContikiVib
+ org.contikios.cooja.contikimote.interfaces.ContikiMoteID
+ org.contikios.cooja.contikimote.interfaces.ContikiRS232
+ org.contikios.cooja.contikimote.interfaces.ContikiBeeper
+ org.contikios.cooja.interfaces.RimeAddress
+ org.contikios.cooja.contikimote.interfaces.ContikiIPAddress
+ org.contikios.cooja.contikimote.interfaces.ContikiRadio
+ org.contikios.cooja.contikimote.interfaces.ContikiButton
+ org.contikios.cooja.contikimote.interfaces.ContikiPIR
+ org.contikios.cooja.contikimote.interfaces.ContikiClock
+ org.contikios.cooja.contikimote.interfaces.ContikiLED
+ org.contikios.cooja.contikimote.interfaces.ContikiCFS
+ org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
+ org.contikios.cooja.interfaces.Mote2MoteRelations
+ org.contikios.cooja.interfaces.MoteAttributes
+ false
+
+
+
+ org.contikios.cooja.interfaces.Position
+ 54.36775767371176
+ 24.409055040864118
+ 0.0
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiMoteID
+ 1
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiRadio
+ 250.0
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
+
+ mtype295
+
+
+
+ org.contikios.cooja.interfaces.Position
+ 83.54989222799365
+ 52.63050856506214
+ 0.0
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiMoteID
+ 2
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiRadio
+ 250.0
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
+
+ mtype686
+
+
+
+ org.contikios.cooja.interfaces.Position
+ 108.91767775240822
+ 78.59778809170032
+ 0.0
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiMoteID
+ 3
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiRadio
+ 250.0
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
+
+ mtype686
+
+
+
+ org.contikios.cooja.interfaces.Position
+ 139.91021061864723
+ 98.34190023350419
+ 0.0
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiMoteID
+ 4
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiRadio
+ 250.0
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
+
+ mtype686
+
+
+
+ org.contikios.cooja.plugins.SimControl
+ 280
+ 1
+ 160
+ 400
+ 0
+
+
+ org.contikios.cooja.plugins.Visualizer
+
+ true
+ org.contikios.cooja.plugins.skins.UDGMVisualizerSkin
+ org.contikios.cooja.plugins.skins.IDVisualizerSkin
+ 1.9798610460263038 0.0 0.0 1.9798610460263038 -61.112037797038525 -1.2848438586294648
+
+ 400
+ 4
+ 400
+ 1
+ 1
+
+
+ org.contikios.cooja.plugins.LogListener
+
+ ID:4
+
+
+
+ 1404
+ 2
+ 240
+ 400
+ 160
+
+
+ org.contikios.cooja.plugins.TimeLine
+
+ 0
+ 1
+ 2
+ 3
+
+
+
+ 500.0
+
+ 1804
+ 6
+ 166
+ 0
+ 753
+
+
+ org.contikios.cooja.plugins.Notes
+
+ Enter notes here
+ true
+
+ 1124
+ 5
+ 160
+ 680
+ 0
+
+
+ org.contikios.cooja.serialsocket.SerialSocketServer
+ 0
+
+ 60001
+ true
+
+ 362
+ 3
+ 116
+ 13
+ 414
+
+
+ org.contikios.cooja.plugins.ScriptRunner
+
+
+ true
+
+ 600
+ 0
+ 700
+ 1037
+ 40
+
+
diff --git a/tests/17-rpl-border-router/02-border-router-cooja-tsch.sh b/tests/17-rpl-border-router/02-border-router-cooja-tsch.sh
new file mode 100755
index 000000000..b91a8d5c7
--- /dev/null
+++ b/tests/17-rpl-border-router/02-border-router-cooja-tsch.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+# Contiki directory
+CONTIKI=$1
+
+# Simulation file
+BASENAME=02-border-router-cooja-tsch
+
+bash test-border-router.sh $CONTIKI $BASENAME fd00::204:4:4:4
diff --git a/tests/17-rpl-border-router/03-border-router-sky.csc b/tests/17-rpl-border-router/03-border-router-sky.csc
new file mode 100644
index 000000000..d707dde17
--- /dev/null
+++ b/tests/17-rpl-border-router/03-border-router-sky.csc
@@ -0,0 +1,236 @@
+
+
+ [APPS_DIR]/mrm
+ [APPS_DIR]/mspsim
+ [APPS_DIR]/avrora
+ [APPS_DIR]/serial_socket
+ [APPS_DIR]/collect-view
+ [APPS_DIR]/powertracker
+
+ My simulation
+ 1.0
+ 123456
+ 1000000
+
+ org.contikios.cooja.radiomediums.UDGM
+ 50.0
+ 100.0
+ 1.0
+ 1.0
+
+
+ 40000
+
+
+ org.contikios.cooja.mspmote.SkyMoteType
+ sky1
+ Sky Mote Type #sky1
+
+ make clean TARGET=sky
+make border-router.sky TARGET=sky
+ [CONTIKI_DIR]/examples/rpl-border-router/border-router.sky
+ org.contikios.cooja.interfaces.Position
+ org.contikios.cooja.interfaces.RimeAddress
+ org.contikios.cooja.interfaces.IPAddress
+ org.contikios.cooja.interfaces.Mote2MoteRelations
+ org.contikios.cooja.interfaces.MoteAttributes
+ org.contikios.cooja.mspmote.interfaces.MspClock
+ org.contikios.cooja.mspmote.interfaces.MspMoteID
+ org.contikios.cooja.mspmote.interfaces.SkyButton
+ org.contikios.cooja.mspmote.interfaces.SkyFlash
+ org.contikios.cooja.mspmote.interfaces.SkyCoffeeFilesystem
+ org.contikios.cooja.mspmote.interfaces.Msp802154Radio
+ org.contikios.cooja.mspmote.interfaces.MspSerial
+ org.contikios.cooja.mspmote.interfaces.SkyLED
+ org.contikios.cooja.mspmote.interfaces.MspDebugOutput
+ org.contikios.cooja.mspmote.interfaces.SkyTemperature
+
+
+ org.contikios.cooja.mspmote.SkyMoteType
+ sky2
+ Sky Mote Type #sky2
+
+ make clean TARGET=sky
+make hello-world.sky TARGET=sky
+ [CONTIKI_DIR]/examples/hello-world/hello-world.sky
+ org.contikios.cooja.interfaces.Position
+ org.contikios.cooja.interfaces.RimeAddress
+ org.contikios.cooja.interfaces.IPAddress
+ org.contikios.cooja.interfaces.Mote2MoteRelations
+ org.contikios.cooja.interfaces.MoteAttributes
+ org.contikios.cooja.mspmote.interfaces.MspClock
+ org.contikios.cooja.mspmote.interfaces.MspMoteID
+ org.contikios.cooja.mspmote.interfaces.SkyButton
+ org.contikios.cooja.mspmote.interfaces.SkyFlash
+ org.contikios.cooja.mspmote.interfaces.SkyCoffeeFilesystem
+ org.contikios.cooja.mspmote.interfaces.Msp802154Radio
+ org.contikios.cooja.mspmote.interfaces.MspSerial
+ org.contikios.cooja.mspmote.interfaces.SkyLED
+ org.contikios.cooja.mspmote.interfaces.MspDebugOutput
+ org.contikios.cooja.mspmote.interfaces.SkyTemperature
+
+
+
+
+ org.contikios.cooja.interfaces.Position
+ -24.750327773354453
+ 17.688901393447438
+ 0.0
+
+
+ org.contikios.cooja.mspmote.interfaces.MspClock
+ 1.0
+
+
+ org.contikios.cooja.mspmote.interfaces.MspMoteID
+ 1
+
+ sky1
+
+
+
+
+ org.contikios.cooja.interfaces.Position
+ 1.091493067677618
+ 40.943504236660225
+ 0.0
+
+
+ org.contikios.cooja.mspmote.interfaces.MspClock
+ 1.0
+
+
+ org.contikios.cooja.mspmote.interfaces.MspMoteID
+ 2
+
+ sky2
+
+
+
+
+ org.contikios.cooja.interfaces.Position
+ 22.647678967805337
+ 61.6365018442491
+ 0.0
+
+
+ org.contikios.cooja.mspmote.interfaces.MspClock
+ 1.0
+
+
+ org.contikios.cooja.mspmote.interfaces.MspMoteID
+ 3
+
+ sky2
+
+
+
+
+ org.contikios.cooja.interfaces.Position
+ 44.02005813888037
+ 93.02398317771755
+ 0.0
+
+
+ org.contikios.cooja.mspmote.interfaces.MspClock
+ 1.0
+
+
+ org.contikios.cooja.mspmote.interfaces.MspMoteID
+ 4
+
+ sky2
+
+
+
+ org.contikios.cooja.plugins.SimControl
+ 280
+ 1
+ 160
+ 400
+ 0
+
+
+ org.contikios.cooja.plugins.Visualizer
+
+ true
+ org.contikios.cooja.plugins.skins.IDVisualizerSkin
+ org.contikios.cooja.plugins.skins.UDGMVisualizerSkin
+ 2.3610941331949244 0.0 0.0 2.3610941331949244 119.38219749746548 -4.52452305190821
+
+ 400
+ 3
+ 400
+ 1
+ 1
+
+
+ org.contikios.cooja.plugins.LogListener
+
+
+
+
+
+ 1404
+ 6
+ 240
+ 400
+ 160
+
+
+ org.contikios.cooja.plugins.TimeLine
+
+ 0
+ 1
+ 2
+ 3
+
+
+
+ 500.0
+
+ 1804
+ 5
+ 166
+ 0
+ 742
+
+
+ org.contikios.cooja.plugins.Notes
+
+ Enter notes here
+ true
+
+ 1124
+ 4
+ 160
+ 680
+ 0
+
+
+ org.contikios.cooja.serialsocket.SerialSocketServer
+ 0
+
+ 60001
+ true
+
+ 362
+ 2
+ 116
+ 30
+ 403
+
+
+ org.contikios.cooja.plugins.ScriptRunner
+
+
+ true
+
+ 600
+ 0
+ 700
+ 850
+ 13
+
+
+
diff --git a/tests/17-rpl-border-router/03-border-router-sky.sh b/tests/17-rpl-border-router/03-border-router-sky.sh
new file mode 100755
index 000000000..798e0242b
--- /dev/null
+++ b/tests/17-rpl-border-router/03-border-router-sky.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+# Contiki directory
+CONTIKI=$1
+
+# Simulation file
+BASENAME=03-border-router-sky
+
+bash test-border-router.sh $CONTIKI $BASENAME fd00::0212:7404:0004:0404
diff --git a/tests/17-rpl-border-router/04-border-router-traceroute.csc b/tests/17-rpl-border-router/04-border-router-traceroute.csc
new file mode 100644
index 000000000..a010d5ef2
--- /dev/null
+++ b/tests/17-rpl-border-router/04-border-router-traceroute.csc
@@ -0,0 +1,252 @@
+
+
+ [APPS_DIR]/mrm
+ [APPS_DIR]/mspsim
+ [APPS_DIR]/avrora
+ [APPS_DIR]/serial_socket
+ [APPS_DIR]/collect-view
+ [APPS_DIR]/powertracker
+
+ My simulation
+ 1.0
+ 123456
+ 1000000
+
+ org.contikios.cooja.radiomediums.UDGM
+ 50.0
+ 100.0
+ 1.0
+ 1.0
+
+
+ 40000
+
+
+ org.contikios.cooja.contikimote.ContikiMoteType
+ mtype295
+ Cooja Mote Type #1
+
+ make TARGET=cooja clean
+make border-router.cooja TARGET=cooja
+ org.contikios.cooja.interfaces.Position
+ org.contikios.cooja.interfaces.Battery
+ org.contikios.cooja.contikimote.interfaces.ContikiVib
+ org.contikios.cooja.contikimote.interfaces.ContikiMoteID
+ org.contikios.cooja.contikimote.interfaces.ContikiRS232
+ org.contikios.cooja.contikimote.interfaces.ContikiBeeper
+ org.contikios.cooja.interfaces.RimeAddress
+ org.contikios.cooja.contikimote.interfaces.ContikiIPAddress
+ org.contikios.cooja.contikimote.interfaces.ContikiRadio
+ org.contikios.cooja.contikimote.interfaces.ContikiButton
+ org.contikios.cooja.contikimote.interfaces.ContikiPIR
+ org.contikios.cooja.contikimote.interfaces.ContikiClock
+ org.contikios.cooja.contikimote.interfaces.ContikiLED
+ org.contikios.cooja.contikimote.interfaces.ContikiCFS
+ org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
+ org.contikios.cooja.interfaces.Mote2MoteRelations
+ org.contikios.cooja.interfaces.MoteAttributes
+ false
+
+
+ org.contikios.cooja.contikimote.ContikiMoteType
+ mtype686
+ Cooja Mote Type #2
+
+ make TARGET=cooja clean
+make hello-world.cooja TARGET=cooja
+ org.contikios.cooja.interfaces.Position
+ org.contikios.cooja.interfaces.Battery
+ org.contikios.cooja.contikimote.interfaces.ContikiVib
+ org.contikios.cooja.contikimote.interfaces.ContikiMoteID
+ org.contikios.cooja.contikimote.interfaces.ContikiRS232
+ org.contikios.cooja.contikimote.interfaces.ContikiBeeper
+ org.contikios.cooja.interfaces.RimeAddress
+ org.contikios.cooja.contikimote.interfaces.ContikiIPAddress
+ org.contikios.cooja.contikimote.interfaces.ContikiRadio
+ org.contikios.cooja.contikimote.interfaces.ContikiButton
+ org.contikios.cooja.contikimote.interfaces.ContikiPIR
+ org.contikios.cooja.contikimote.interfaces.ContikiClock
+ org.contikios.cooja.contikimote.interfaces.ContikiLED
+ org.contikios.cooja.contikimote.interfaces.ContikiCFS
+ org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
+ org.contikios.cooja.interfaces.Mote2MoteRelations
+ org.contikios.cooja.interfaces.MoteAttributes
+ false
+
+
+
+ org.contikios.cooja.interfaces.Position
+ 54.36775767371176
+ 24.409055040864118
+ 0.0
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiMoteID
+ 1
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiRadio
+ 250.0
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
+
+ mtype295
+
+
+
+ org.contikios.cooja.interfaces.Position
+ 83.54989222799365
+ 52.63050856506214
+ 0.0
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiMoteID
+ 2
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiRadio
+ 250.0
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
+
+ mtype686
+
+
+
+ org.contikios.cooja.interfaces.Position
+ 108.91767775240822
+ 78.59778809170032
+ 0.0
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiMoteID
+ 3
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiRadio
+ 250.0
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
+
+ mtype686
+
+
+
+ org.contikios.cooja.interfaces.Position
+ 139.91021061864723
+ 98.34190023350419
+ 0.0
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiMoteID
+ 4
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiRadio
+ 250.0
+
+
+ org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
+
+ mtype686
+
+
+
+ org.contikios.cooja.plugins.SimControl
+ 280
+ 1
+ 160
+ 400
+ 0
+
+
+ org.contikios.cooja.plugins.Visualizer
+
+ true
+ org.contikios.cooja.plugins.skins.UDGMVisualizerSkin
+ org.contikios.cooja.plugins.skins.IDVisualizerSkin
+ 1.9798610460263038 0.0 0.0 1.9798610460263038 -61.112037797038525 -1.2848438586294648
+
+ 400
+ 4
+ 400
+ 1
+ 1
+
+
+ org.contikios.cooja.plugins.LogListener
+
+ ID:4
+
+
+
+ 1404
+ 2
+ 240
+ 400
+ 160
+
+
+ org.contikios.cooja.plugins.TimeLine
+
+ 0
+ 1
+ 2
+ 3
+
+
+
+ 500.0
+
+ 1804
+ 6
+ 166
+ 0
+ 753
+
+
+ org.contikios.cooja.plugins.Notes
+
+ Enter notes here
+ true
+
+ 1124
+ 5
+ 160
+ 680
+ 0
+
+
+ org.contikios.cooja.serialsocket.SerialSocketServer
+ 0
+
+ 60001
+ true
+
+ 362
+ 3
+ 116
+ 13
+ 414
+
+
+ org.contikios.cooja.plugins.ScriptRunner
+
+
+ true
+
+ 600
+ 0
+ 700
+ 1037
+ 40
+
+
diff --git a/tests/17-rpl-border-router/04-border-router-traceroute.sh b/tests/17-rpl-border-router/04-border-router-traceroute.sh
new file mode 100755
index 000000000..96278e7d5
--- /dev/null
+++ b/tests/17-rpl-border-router/04-border-router-traceroute.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+# Contiki directory
+CONTIKI=$1
+
+# Simulation file
+BASENAME=04-border-router-traceroute
+
+# Destination IPv6
+IPADDR=fd00::204:4:4:4
+# The expected hop count
+TARGETHOPS=4
+
+# Start simulation
+echo "Starting Cooja simulation $BASENAME.csc"
+java -Xshare:on -jar $CONTIKI/tools/cooja/dist/cooja.jar -nogui=$BASENAME.csc -contiki=$CONTIKI > $BASENAME.coojalog &
+JPID=$!
+sleep 20
+
+# Connect to the simlation
+echo "Starting tunslip6"
+make -C $CONTIKI/tools tunslip6
+make -C $CONTIKI/examples/rpl-border-router/ connect-router-cooja TARGET=zoul >> $BASENAME.tunsliplog 2>&1 &
+MPID=$!
+echo "Waiting for network formation"
+sleep 5
+
+# Do ping
+echo "Running Traceroute"
+traceroute6 $IPADDR -m 5 | tee $BASENAME.scriptlog
+# Fetch traceroute6 status code (not $? because this is piped)
+STATUS=${PIPESTATUS[0]}
+HOPS=`wc $BASENAME.scriptlog -l | cut -f 1 -d ' '`
+
+echo "Closing simulation and tunslip6"
+sleep 1
+kill -9 $JPID
+kill -9 $MPID
+sleep 1
+rm COOJA.testlog
+rm COOJA.log
+
+if [ $STATUS -eq 0 ] && [ $HOPS -eq $TARGETHOPS ] ; then
+ printf "%-32s TEST OK\n" "$BASENAME" | tee $BASENAME.testlog;
+else
+ # Verbose output when using CI
+ if [ "$CI" = "true" ]; then
+ echo "==== $BASENAME.coojalog ====" ; cat $BASENAME.coojalog;
+ echo "==== $BASENAME.tunsliplog ====" ; cat $BASENAME.tunsliplog;
+ echo "==== $BASENAME.scriptlog ====" ; cat $BASENAME.scriptlog;
+ else
+ echo "==== Check $BASENAME.coojalog, $BASENAME.tunsliplog, and $BASENAME.scriptlog for details ====";
+ fi;
+
+ printf "%-32s TEST FAIL\n" "$BASENAME" | tee $BASENAME.testlog;
+fi
+
+# We do not want Make to stop -> Return 0
+# The Makefile will check if a log contains FAIL at the end
+
+exit 0
diff --git a/tests/17-rpl-border-router/Makefile b/tests/17-rpl-border-router/Makefile
new file mode 100644
index 000000000..c46e5271d
--- /dev/null
+++ b/tests/17-rpl-border-router/Makefile
@@ -0,0 +1 @@
+include ../Makefile.script-test
diff --git a/tests/17-rpl-border-router/test-border-router.sh b/tests/17-rpl-border-router/test-border-router.sh
new file mode 100755
index 000000000..db399ca70
--- /dev/null
+++ b/tests/17-rpl-border-router/test-border-router.sh
@@ -0,0 +1,58 @@
+#!/bin/bash
+
+# Contiki directory
+CONTIKI=$1
+
+# Simulation file
+BASENAME=$2
+
+# Destination IPv6
+IPADDR=$3
+
+# Start simulation
+echo "Starting Cooja simulation $BASENAME.csc"
+java -Xshare:on -jar $CONTIKI/tools/cooja/dist/cooja.jar -nogui=$BASENAME.csc -contiki=$CONTIKI > $BASENAME.coojalog &
+JPID=$!
+sleep 20
+
+# Connect to the simlation
+echo "Starting tunslip6"
+make -C $CONTIKI/tools tunslip6
+make -C $CONTIKI/examples/rpl-border-router/ connect-router-cooja TARGET=zoul >> $BASENAME.tunsliplog 2>&1 &
+MPID=$!
+echo "Waiting for network formation"
+sleep 5
+
+# Do ping
+echo "Pinging"
+ping6 $IPADDR -c 5 | tee $BASENAME.scriptlog
+# Fetch ping6 status code (not $? because this is piped)
+STATUS=${PIPESTATUS[0]}
+
+echo "Closing simulation and tunslip6"
+sleep 1
+kill -9 $JPID
+kill -9 $MPID
+sleep 1
+rm COOJA.testlog
+rm COOJA.log
+
+if [ $STATUS -eq 0 ] ; then
+ printf "%-32s TEST OK\n" "$BASENAME" | tee $BASENAME.testlog;
+else
+ # Verbose output when using CI
+ if [ "$CI" = "true" ]; then
+ echo "==== $BASENAME.coojalog ====" ; cat $BASENAME.coojalog;
+ echo "==== $BASENAME.tunsliplog ====" ; cat $BASENAME.tunsliplog;
+ echo "==== $BASENAME.scriptlog ====" ; cat $BASENAME.scriptlog;
+ else
+ echo "==== Check $BASENAME.coojalog, $BASENAME.tunsliplog, and $BASENAME.scriptlog for details ====";
+ fi;
+
+ printf "%-32s TEST FAIL\n" "$BASENAME" | tee $BASENAME.testlog;
+fi
+
+# We do not want Make to stop -> Return 0
+# The Makefile will check if a log contains FAIL at the end
+
+exit 0
diff --git a/tests/18-native-networking/01-native-ping.sh b/tests/18-native-networking/01-native-ping.sh
new file mode 100755
index 000000000..fa7fe49e7
--- /dev/null
+++ b/tests/18-native-networking/01-native-ping.sh
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+# Contiki directory
+CONTIKI=$1
+# Test basename
+BASENAME=01-native-ping
+
+IPADDR=fd00::302:304:506:708
+
+# Starting Contiki-NG native node
+echo "Starting native node"
+make -C $CONTIKI/examples/hello-world
+sudo $CONTIKI/examples/hello-world/hello-world.native > node.log 2> node.err &
+CPID=$!
+sleep 2
+
+# Do ping
+echo "Pinging"
+ping6 $IPADDR -c 5 | tee $BASENAME.log
+# Fetch ping6 status code (not $? because this is piped)
+STATUS=${PIPESTATUS[0]}
+
+echo "Closing native node"
+sleep 2
+pgrep hello-world | sudo xargs kill -9
+
+if [ $STATUS -eq 0 ] ; then
+ cp $BASENAME.log $BASENAME.testlog
+ printf "%-32s TEST OK\n" "$BASENAME" | tee -a $BASENAME.testlog;
+else
+ mv $BASENAME.log $BASENAME.faillog
+
+ echo ""
+ echo "---- node.log"
+ cat node.log
+
+ echo ""
+ echo "---- node.err"
+ cat node.err
+
+ cp $BASENAME.log $BASENAME.faillog
+ printf "%-32s TEST FAIL\n" "$BASENAME" | tee -a $BASENAME.testlog;
+fi
+
+rm node.log
+rm node.err
+
+# We do not want Make to stop -> Return 0
+# The Makefile will check if a log contains FAIL at the end
+exit 0
diff --git a/tests/18-native-networking/Makefile b/tests/18-native-networking/Makefile
new file mode 100644
index 000000000..c46e5271d
--- /dev/null
+++ b/tests/18-native-networking/Makefile
@@ -0,0 +1 @@
+include ../Makefile.script-test
diff --git a/tests/Makefile.script-test b/tests/Makefile.script-test
new file mode 100644
index 000000000..26d60737f
--- /dev/null
+++ b/tests/Makefile.script-test
@@ -0,0 +1,25 @@
+TESTS=$(wildcard ??-*.sh)
+TESTLOGS=$(sort $(patsubst %.sh,%.testlog,$(TESTS)))
+
+CONTIKI=../..
+
+tests: $(TESTLOGS)
+
+summary: clean tests
+ifeq ($(TESTS),)
+ @echo No tests > $@
+else
+ @cat $(TESTLOGS) > $@
+endif
+
+all: cooja clean tests
+
+%.testlog: %.sh cooja
+ @bash "$(basename $@).sh" "$(CONTIKI)"
+
+clean:
+ @rm -f *.*log report summary
+
+cooja: $(CONTIKI)/tools/cooja/dist/cooja.jar
+$(CONTIKI)/tools/cooja/dist/cooja.jar:
+ (cd $(CONTIKI)/tools/cooja; ant jar)