Merge branch 'osd' into ico
Conflicts resolved: core/net/mac/contikimac/contikimac.c
This commit is contained in:
commit
7d63a0f487
1020 changed files with 70078 additions and 10930 deletions
|
@ -78,7 +78,7 @@
|
|||
static const char http_content_type_json[] = "application/json";
|
||||
|
||||
/* Maximum 40 chars in host name?: 5 x 8 */
|
||||
static char callback_host[40] = "[aaaa::1]";
|
||||
static char callback_host[40] = "[fd00::1]";
|
||||
static uint16_t callback_port = CALLBACK_PORT;
|
||||
static uint16_t callback_interval = SEND_INTERVAL;
|
||||
static char callback_path[80] = "/debug/";
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
#include "contiki-net.h"
|
||||
#include "net/ipv6/multicast/uip-mcast6.h"
|
||||
|
||||
#if !NETSTACK_CONF_WITH_IPV6 || !UIP_CONF_ROUTER || !UIP_CONF_IPV6_MULTICAST || !UIP_CONF_IPV6_RPL
|
||||
#if !NETSTACK_CONF_WITH_IPV6 || !UIP_CONF_ROUTER || !UIP_IPV6_MULTICAST || !UIP_CONF_IPV6_RPL
|
||||
#error "This example can not work with the current contiki configuration"
|
||||
#error "Check the values of: NETSTACK_CONF_WITH_IPV6, UIP_CONF_ROUTER, UIP_CONF_IPV6_RPL"
|
||||
#endif
|
||||
|
|
|
@ -63,7 +63,7 @@ static struct uip_udp_conn * mcast_conn;
|
|||
static char buf[MAX_PAYLOAD_LEN];
|
||||
static uint32_t seq_id;
|
||||
|
||||
#if !NETSTACK_CONF_WITH_IPV6 || !UIP_CONF_ROUTER || !UIP_CONF_IPV6_MULTICAST || !UIP_CONF_IPV6_RPL
|
||||
#if !NETSTACK_CONF_WITH_IPV6 || !UIP_CONF_ROUTER || !UIP_IPV6_MULTICAST || !UIP_CONF_IPV6_RPL
|
||||
#error "This example can not work with the current contiki configuration"
|
||||
#error "Check the values of: NETSTACK_CONF_WITH_IPV6, UIP_CONF_ROUTER, UIP_CONF_IPV6_RPL"
|
||||
#endif
|
||||
|
@ -111,7 +111,7 @@ set_own_addresses(void)
|
|||
rpl_dag_t *dag;
|
||||
uip_ipaddr_t ipaddr;
|
||||
|
||||
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
|
||||
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0);
|
||||
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
|
||||
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ static uint16_t count;
|
|||
|
||||
#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
|
||||
|
||||
#if !NETSTACK_CONF_WITH_IPV6 || !UIP_CONF_ROUTER || !UIP_CONF_IPV6_MULTICAST || !UIP_CONF_IPV6_RPL
|
||||
#if !NETSTACK_CONF_WITH_IPV6 || !UIP_CONF_ROUTER || !UIP_IPV6_MULTICAST || !UIP_CONF_IPV6_RPL
|
||||
#error "This example can not work with the current contiki configuration"
|
||||
#error "Check the values of: NETSTACK_CONF_WITH_IPV6, UIP_CONF_ROUTER, UIP_CONF_IPV6_RPL"
|
||||
#endif
|
||||
|
@ -84,7 +84,7 @@ join_mcast_group(void)
|
|||
uip_ds6_maddr_t *rv;
|
||||
|
||||
/* First, set our v6 global */
|
||||
uip_ip6addr(&addr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
|
||||
uip_ip6addr(&addr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0);
|
||||
uip_ds6_set_addr_iid(&addr, &uip_lladdr);
|
||||
uip_ds6_addr_add(&addr, 0, ADDR_AUTOCONF);
|
||||
|
||||
|
|
|
@ -24,4 +24,4 @@ CONTIKI_WITH_IPV6 = 1
|
|||
include $(CONTIKI)/Makefile.include
|
||||
|
||||
connect-router: border-router.native
|
||||
sudo ./border-router.native aaaa::1/64
|
||||
sudo ./border-router.native fd00::1/64
|
||||
|
|
|
@ -67,7 +67,7 @@ int
|
|||
slip_config_handle_arguments(int argc, char **argv)
|
||||
{
|
||||
const char *prog;
|
||||
char c;
|
||||
int c;
|
||||
int baudrate = 115200;
|
||||
|
||||
slip_config_verbose = 0;
|
||||
|
@ -125,7 +125,7 @@ slip_config_handle_arguments(int argc, char **argv)
|
|||
case 'h':
|
||||
default:
|
||||
fprintf(stderr,"usage: %s [options] ipaddress\n", prog);
|
||||
fprintf(stderr,"example: border-router.native -L -v2 -s ttyUSB1 aaaa::1/64\n");
|
||||
fprintf(stderr,"example: border-router.native -L -v2 -s ttyUSB1 fd00::1/64\n");
|
||||
fprintf(stderr,"Options are:\n");
|
||||
#ifdef linux
|
||||
fprintf(stderr," -B baudrate 9600,19200,38400,57600,115200,921600 (default 115200)\n");
|
||||
|
|
|
@ -21,6 +21,10 @@ PROJECT_SOURCEFILES += slip-bridge.c
|
|||
#of the slip connection. Large MSS together with low baud rates without flow
|
||||
#control will overrun the transmit buffer when the style sheet is requested.
|
||||
|
||||
ifeq ($(MAKE_WITH_NON_STORING),1)
|
||||
CFLAGS += -DWITH_NON_STORING=1
|
||||
endif
|
||||
|
||||
WITH_WEBSERVER=1
|
||||
ifeq ($(WITH_WEBSERVER),1)
|
||||
CFLAGS += -DUIP_CONF_TCP=1
|
||||
|
@ -33,7 +37,7 @@ CFLAGS += -DWEBSERVER=2
|
|||
endif
|
||||
|
||||
ifeq ($(PREFIX),)
|
||||
PREFIX = aaaa::1/64
|
||||
PREFIX = fd00::1/64
|
||||
endif
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
|
|
|
@ -31,6 +31,19 @@
|
|||
#ifndef PROJECT_ROUTER_CONF_H_
|
||||
#define PROJECT_ROUTER_CONF_H_
|
||||
|
||||
#ifndef WITH_NON_STORING
|
||||
#define WITH_NON_STORING 0 /* Set this to run with non-storing mode */
|
||||
#endif /* WITH_NON_STORING */
|
||||
|
||||
#if WITH_NON_STORING
|
||||
#undef RPL_NS_CONF_LINK_NUM
|
||||
#define RPL_NS_CONF_LINK_NUM 40 /* Number of links maintained at the root */
|
||||
#undef UIP_CONF_MAX_ROUTES
|
||||
#define UIP_CONF_MAX_ROUTES 0 /* No need for routes */
|
||||
#undef RPL_CONF_MOP
|
||||
#define RPL_CONF_MOP RPL_MOP_NON_STORING /* Mode of operation*/
|
||||
#endif /* WITH_NON_STORING */
|
||||
|
||||
#ifndef UIP_FALLBACK_INTERFACE
|
||||
#define UIP_FALLBACK_INTERFACE rpl_interface
|
||||
#endif
|
||||
|
|
|
@ -3,6 +3,12 @@ APPS = powertrace collect-view
|
|||
CONTIKI_PROJECT = udp-sender udp-sink
|
||||
PROJECT_SOURCEFILES += collect-common.c
|
||||
|
||||
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
|
||||
|
||||
ifeq ($(MAKE_WITH_NON_STORING),1)
|
||||
CFLAGS += -DWITH_NON_STORING=1
|
||||
endif
|
||||
|
||||
ifdef PERIOD
|
||||
CFLAGS=-DPERIOD=$(PERIOD)
|
||||
endif
|
||||
|
|
79
examples/ipv6/rpl-collect/project-conf.h
Normal file
79
examples/ipv6/rpl-collect/project-conf.h
Normal file
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* Copyright (c) 2015, Swedish Institute of Computer Science.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the Institute nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef PROJECT_CONF_H_
|
||||
#define PROJECT_CONF_H_
|
||||
|
||||
#ifndef WITH_NON_STORING
|
||||
#define WITH_NON_STORING 0 /* Set this to run with non-storing mode */
|
||||
#endif /* WITH_NON_STORING */
|
||||
|
||||
#undef NBR_TABLE_CONF_MAX_NEIGHBORS
|
||||
#undef UIP_CONF_MAX_ROUTES
|
||||
|
||||
#ifdef TEST_MORE_ROUTES
|
||||
/* configure number of neighbors and routes */
|
||||
#define NBR_TABLE_CONF_MAX_NEIGHBORS 10
|
||||
#define UIP_CONF_MAX_ROUTES 30
|
||||
#else
|
||||
/* configure number of neighbors and routes */
|
||||
#define NBR_TABLE_CONF_MAX_NEIGHBORS 10
|
||||
#define UIP_CONF_MAX_ROUTES 10
|
||||
#endif /* TEST_MORE_ROUTES */
|
||||
|
||||
#undef NETSTACK_CONF_RDC
|
||||
#define NETSTACK_CONF_RDC nullrdc_driver
|
||||
#undef NULLRDC_CONF_802154_AUTOACK
|
||||
#define NULLRDC_CONF_802154_AUTOACK 1
|
||||
|
||||
/* Define as minutes */
|
||||
#define RPL_CONF_DEFAULT_LIFETIME_UNIT 60
|
||||
|
||||
/* 10 minutes lifetime of routes */
|
||||
#define RPL_CONF_DEFAULT_LIFETIME 10
|
||||
|
||||
#define RPL_CONF_DEFAULT_ROUTE_INFINITE_LIFETIME 1
|
||||
|
||||
/* Save some ROM */
|
||||
#undef UIP_CONF_TCP
|
||||
#define UIP_CONF_TCP 0
|
||||
|
||||
#undef SICSLOWPAN_CONF_FRAG
|
||||
#define SICSLOWPAN_CONF_FRAG 0
|
||||
|
||||
#if WITH_NON_STORING
|
||||
#undef RPL_NS_CONF_LINK_NUM
|
||||
#define RPL_NS_CONF_LINK_NUM 40 /* Number of links maintained at the root. Can be set to 0 at non-root nodes. */
|
||||
#undef UIP_CONF_MAX_ROUTES
|
||||
#define UIP_CONF_MAX_ROUTES 0 /* No need for routes */
|
||||
#undef RPL_CONF_MOP
|
||||
#define RPL_CONF_MOP RPL_MOP_NON_STORING /* Mode of operation*/
|
||||
#endif /* WITH_NON_STORING */
|
||||
|
||||
#endif /* PROJECT_CONF_H_ */
|
|
@ -195,12 +195,12 @@ set_global_address(void)
|
|||
{
|
||||
uip_ipaddr_t ipaddr;
|
||||
|
||||
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
|
||||
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0);
|
||||
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
|
||||
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);
|
||||
|
||||
/* set server address */
|
||||
uip_ip6addr(&server_ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 1);
|
||||
uip_ip6addr(&server_ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 1);
|
||||
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
|
|
@ -145,14 +145,14 @@ PROCESS_THREAD(udp_server_process, ev, data)
|
|||
PRINTF("UDP server started\n");
|
||||
|
||||
#if UIP_CONF_ROUTER
|
||||
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 1);
|
||||
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 1);
|
||||
/* uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr); */
|
||||
uip_ds6_addr_add(&ipaddr, 0, ADDR_MANUAL);
|
||||
root_if = uip_ds6_addr_lookup(&ipaddr);
|
||||
if(root_if != NULL) {
|
||||
rpl_dag_t *dag;
|
||||
dag = rpl_set_root(RPL_DEFAULT_INSTANCE,(uip_ip6addr_t *)&ipaddr);
|
||||
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
|
||||
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0);
|
||||
rpl_set_prefix(dag, &ipaddr, 64);
|
||||
PRINTF("created a new RPL dag\n");
|
||||
} else {
|
||||
|
|
|
@ -71,7 +71,7 @@ print_network_status(void)
|
|||
uip_ds6_route_t *route;
|
||||
|
||||
PRINTA("--- Network status ---\n");
|
||||
|
||||
|
||||
/* Our IPv6 addresses */
|
||||
PRINTA("- Server IPv6 addresses:\n");
|
||||
for(i = 0; i < UIP_DS6_ADDR_NB; i++) {
|
||||
|
@ -83,13 +83,13 @@ print_network_status(void)
|
|||
PRINTA("\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Our default route */
|
||||
PRINTA("- Default route:\n");
|
||||
default_route = uip_ds6_defrt_lookup(uip_ds6_defrt_choose());
|
||||
if(default_route != NULL) {
|
||||
PRINTA("-- ");
|
||||
uip_debug_ipaddr_print(&default_route->ipaddr);;
|
||||
uip_debug_ipaddr_print(&default_route->ipaddr);
|
||||
PRINTA(" (lifetime: %lu seconds)\n", (unsigned long)default_route->lifetime.interval);
|
||||
} else {
|
||||
PRINTA("-- None\n");
|
||||
|
@ -104,9 +104,9 @@ print_network_status(void)
|
|||
PRINTA(" via ");
|
||||
uip_debug_ipaddr_print(uip_ds6_route_nexthop(route));
|
||||
PRINTA(" (lifetime: %lu seconds)\n", (unsigned long)route->state.lifetime);
|
||||
route = uip_ds6_route_next(route);
|
||||
route = uip_ds6_route_next(route);
|
||||
}
|
||||
|
||||
|
||||
PRINTA("----------------------\n");
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
@ -134,17 +134,24 @@ PROCESS_THREAD(node_process, ev, data)
|
|||
PROCESS_BEGIN();
|
||||
|
||||
/* 3 possible roles:
|
||||
* - role_6ln: simple node, will join any network, secured or not
|
||||
* - role_6dr: DAG root, will advertise (unsecured) beacons
|
||||
* - role_6dr_sec: DAG root, will advertise secured beacons
|
||||
* */
|
||||
* - role_6ln: simple node, will join any network, secured or not
|
||||
* - role_6dr: DAG root, will advertise (unsecured) beacons
|
||||
* - role_6dr_sec: DAG root, will advertise secured beacons
|
||||
* */
|
||||
static int is_coordinator = 0;
|
||||
static enum { role_6ln, role_6dr, role_6dr_sec } node_role;
|
||||
node_role = role_6ln;
|
||||
|
||||
/* Set node with ID == 1 as coordinator, convenient in Cooja. */
|
||||
if(node_id == 1) {
|
||||
if(LLSEC802154_CONF_SECURITY_LEVEL) {
|
||||
|
||||
/* Set node with MAC address c1:0c:00:00:00:00:01 as coordinator,
|
||||
* convenient in cooja for regression tests using z1 nodes
|
||||
* */
|
||||
|
||||
#ifdef CONTIKI_TARGET_Z1
|
||||
extern unsigned char node_mac[8];
|
||||
unsigned char coordinator_mac[8] = { 0xc1, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 };
|
||||
|
||||
if(memcmp(node_mac, coordinator_mac, 8) == 0) {
|
||||
if(LLSEC802154_ENABLED) {
|
||||
node_role = role_6dr_sec;
|
||||
} else {
|
||||
node_role = role_6dr;
|
||||
|
@ -152,6 +159,7 @@ PROCESS_THREAD(node_process, ev, data)
|
|||
} else {
|
||||
node_role = role_6ln;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_VIA_BUTTON
|
||||
{
|
||||
|
@ -162,14 +170,14 @@ PROCESS_THREAD(node_process, ev, data)
|
|||
|
||||
while(!etimer_expired(&et)) {
|
||||
printf("Init: current role: %s. Will start in %u seconds. Press user button to toggle mode.\n",
|
||||
node_role == role_6ln ? "6ln" : (node_role == role_6dr) ? "6dr" : "6dr-sec",
|
||||
CONFIG_WAIT_TIME);
|
||||
node_role == role_6ln ? "6ln" : (node_role == role_6dr) ? "6dr" : "6dr-sec",
|
||||
CONFIG_WAIT_TIME);
|
||||
PROCESS_WAIT_EVENT_UNTIL(((ev == sensors_event) &&
|
||||
(data == &button_sensor) && button_sensor.value(0) > 0)
|
||||
|| etimer_expired(&et));
|
||||
if(ev == sensors_event && data == &button_sensor && button_sensor.value(0) > 0) {
|
||||
node_role = (node_role + 1) % 3;
|
||||
if(LLSEC802154_CONF_SECURITY_LEVEL == 0 && node_role == role_6dr_sec) {
|
||||
if(LLSEC802154_ENABLED == 0 && node_role == role_6dr_sec) {
|
||||
node_role = (node_role + 1) % 3;
|
||||
}
|
||||
etimer_restart(&et);
|
||||
|
@ -180,31 +188,31 @@ PROCESS_THREAD(node_process, ev, data)
|
|||
#endif /* CONFIG_VIA_BUTTON */
|
||||
|
||||
printf("Init: node starting with role %s\n",
|
||||
node_role == role_6ln ? "6ln" : (node_role == role_6dr) ? "6dr" : "6dr-sec");
|
||||
node_role == role_6ln ? "6ln" : (node_role == role_6dr) ? "6dr" : "6dr-sec");
|
||||
|
||||
tsch_set_pan_secured(LLSEC802154_CONF_SECURITY_LEVEL && (node_role == role_6dr_sec));
|
||||
tsch_set_pan_secured(LLSEC802154_ENABLED && (node_role == role_6dr_sec));
|
||||
is_coordinator = node_role > role_6ln;
|
||||
|
||||
if(is_coordinator) {
|
||||
uip_ipaddr_t prefix;
|
||||
uip_ip6addr(&prefix, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
|
||||
uip_ip6addr(&prefix, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0);
|
||||
net_init(&prefix);
|
||||
} else {
|
||||
net_init(NULL);
|
||||
}
|
||||
|
||||
|
||||
#if WITH_ORCHESTRA
|
||||
orchestra_init();
|
||||
#endif /* WITH_ORCHESTRA */
|
||||
|
||||
|
||||
/* Print out routing tables every minute */
|
||||
etimer_set(&et, CLOCK_SECOND * 60);
|
||||
while(1) {
|
||||
while(1) {
|
||||
print_network_status();
|
||||
PROCESS_YIELD_UNTIL(etimer_expired(&et));
|
||||
etimer_reset(&et);
|
||||
}
|
||||
|
||||
|
||||
PROCESS_END();
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
|
|
@ -67,13 +67,19 @@
|
|||
#define TSCH_CALLBACK_JOINING_NETWORK tsch_rpl_callback_joining_network
|
||||
#define TSCH_CALLBACK_LEAVING_NETWORK tsch_rpl_callback_leaving_network
|
||||
|
||||
/* Needed for CC2538 platforms only */
|
||||
/* For TSCH we have to use the more accurate crystal oscillator
|
||||
* by default the RC oscillator is activated */
|
||||
#undef SYS_CTRL_CONF_OSC32K_USE_XTAL
|
||||
#define SYS_CTRL_CONF_OSC32K_USE_XTAL 1
|
||||
|
||||
/* Needed for cc2420 platforms only */
|
||||
/* Disable DCO calibration (uses timerB) */
|
||||
#undef DCOSYNCH_CONF_ENABLED
|
||||
#define DCOSYNCH_CONF_ENABLED 0
|
||||
#define DCOSYNCH_CONF_ENABLED 0
|
||||
/* Enable SFD timestamps (uses timerB) */
|
||||
#undef CC2420_CONF_SFD_TIMESTAMPS
|
||||
#define CC2420_CONF_SFD_TIMESTAMPS 1
|
||||
#define CC2420_CONF_SFD_TIMESTAMPS 1
|
||||
|
||||
/*******************************************************/
|
||||
/******************* Configure TSCH ********************/
|
||||
|
@ -100,8 +106,8 @@
|
|||
#if WITH_SECURITY
|
||||
|
||||
/* Enable security */
|
||||
#undef LLSEC802154_CONF_SECURITY_LEVEL
|
||||
#define LLSEC802154_CONF_SECURITY_LEVEL 1
|
||||
#undef LLSEC802154_CONF_ENABLED
|
||||
#define LLSEC802154_CONF_ENABLED 1
|
||||
/* TSCH uses explicit keys to identify k1 and k2 */
|
||||
#undef LLSEC802154_CONF_USES_EXPLICIT_KEYS
|
||||
#define LLSEC802154_CONF_USES_EXPLICIT_KEYS 1
|
||||
|
@ -133,7 +139,7 @@
|
|||
#undef UIP_CONF_TCP
|
||||
#define UIP_CONF_TCP 0
|
||||
#undef QUEUEBUF_CONF_NUM
|
||||
#define QUEUEBUF_CONF_NUM 4
|
||||
#define QUEUEBUF_CONF_NUM 3
|
||||
#undef UIP_CONF_MAX_ROUTES
|
||||
#define UIP_CONF_MAX_ROUTES 8
|
||||
#undef NBR_TABLE_CONF_MAX_NEIGHBORS
|
||||
|
@ -153,7 +159,7 @@
|
|||
#define TSCH_SCHEDULE_CONF_DEFAULT_LENGTH 2
|
||||
/* Reduce log level to make space for security on z1 */
|
||||
#undef TSCH_LOG_CONF_LEVEL
|
||||
#define TSCH_LOG_CONF_LEVEL 1
|
||||
#define TSCH_LOG_CONF_LEVEL 0
|
||||
#endif /* WITH_SECURITY */
|
||||
|
||||
#endif /* CONTIKI_TARGET_Z1 */
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
all: udp-client udp-server
|
||||
APPS=servreg-hack
|
||||
CONTIKI=../../..
|
||||
|
||||
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
|
||||
|
||||
ifdef WITH_COMPOWER
|
||||
APPS+=powertrace
|
||||
CFLAGS+= -DCONTIKIMAC_CONF_COMPOWER=1 -DWITH_COMPOWER=1 -DQUEUEBUF_CONF_NUM=4
|
||||
|
@ -14,5 +15,9 @@ ifdef PERIOD
|
|||
CFLAGS+=-DPERIOD=$(PERIOD)
|
||||
endif
|
||||
|
||||
ifeq ($(MAKE_WITH_NON_STORING),1)
|
||||
CFLAGS += -DWITH_NON_STORING=1
|
||||
endif
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
|
76
examples/ipv6/rpl-udp/project-conf.h
Normal file
76
examples/ipv6/rpl-udp/project-conf.h
Normal file
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* Copyright (c) 2015, Swedish Institute of Computer Science.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the Institute nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef PROJECT_CONF_H_
|
||||
#define PROJECT_CONF_H_
|
||||
|
||||
#ifndef WITH_NON_STORING
|
||||
#define WITH_NON_STORING 0 /* Set this to run with non-storing mode */
|
||||
#endif /* WITH_NON_STORING */
|
||||
|
||||
#undef NBR_TABLE_CONF_MAX_NEIGHBORS
|
||||
#undef UIP_CONF_MAX_ROUTES
|
||||
|
||||
#ifdef TEST_MORE_ROUTES
|
||||
/* configure number of neighbors and routes */
|
||||
#define NBR_TABLE_CONF_MAX_NEIGHBORS 10
|
||||
#define UIP_CONF_MAX_ROUTES 30
|
||||
#else
|
||||
/* configure number of neighbors and routes */
|
||||
#define NBR_TABLE_CONF_MAX_NEIGHBORS 10
|
||||
#define UIP_CONF_MAX_ROUTES 10
|
||||
#endif /* TEST_MORE_ROUTES */
|
||||
|
||||
#undef NETSTACK_CONF_RDC
|
||||
#define NETSTACK_CONF_RDC nullrdc_driver
|
||||
#undef NULLRDC_CONF_802154_AUTOACK
|
||||
#define NULLRDC_CONF_802154_AUTOACK 1
|
||||
|
||||
/* Define as minutes */
|
||||
#define RPL_CONF_DEFAULT_LIFETIME_UNIT 60
|
||||
|
||||
/* 10 minutes lifetime of routes */
|
||||
#define RPL_CONF_DEFAULT_LIFETIME 10
|
||||
|
||||
#define RPL_CONF_DEFAULT_ROUTE_INFINITE_LIFETIME 1
|
||||
|
||||
#ifndef RPL_CONF_WITH_NON_STORING
|
||||
#define RPL_CONF_WITH_NON_STORING 0 /* Set this to run with non-storing mode */
|
||||
#endif /* RPL_CONF_WITH_NON_STORING */
|
||||
|
||||
#if WITH_NON_STORING
|
||||
#undef RPL_NS_CONF_LINK_NUM
|
||||
#define RPL_NS_CONF_LINK_NUM 40 /* Number of links maintained at the root. Can be set to 0 at non-root nodes. */
|
||||
#undef UIP_CONF_MAX_ROUTES
|
||||
#define UIP_CONF_MAX_ROUTES 0 /* No need for routes */
|
||||
#undef RPL_CONF_MOP
|
||||
#define RPL_CONF_MOP RPL_MOP_NON_STORING /* Mode of operation*/
|
||||
#endif /* WITH_NON_STORING */
|
||||
|
||||
#endif
|
721
examples/ipv6/rpl-udp/rpl-udp-scale-wismote.csc
Normal file
721
examples/ipv6/rpl-udp/rpl-udp-scale-wismote.csc
Normal file
|
@ -0,0 +1,721 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<simconf>
|
||||
<project EXPORT="discard">[APPS_DIR]/mrm</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/mspsim</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/avrora</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/serial_socket</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/collect-view</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/powertracker</project>
|
||||
<simulation>
|
||||
<title>RPL up and downstream scaleability test network using IPv6 and RPL</title>
|
||||
<randomseed>generated</randomseed>
|
||||
<motedelay_us>5000000</motedelay_us>
|
||||
<radiomedium>
|
||||
org.contikios.cooja.radiomediums.UDGM
|
||||
<transmitting_range>150.0</transmitting_range>
|
||||
<interference_range>150.0</interference_range>
|
||||
<success_ratio_tx>1.0</success_ratio_tx>
|
||||
<success_ratio_rx>1.0</success_ratio_rx>
|
||||
</radiomedium>
|
||||
<events>
|
||||
<logoutput>40000</logoutput>
|
||||
</events>
|
||||
<motetype>
|
||||
org.contikios.cooja.mspmote.WismoteMoteType
|
||||
<identifier>sky1</identifier>
|
||||
<description>WisMote Type #sky1</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/ipv6/rpl-udp/udp-server.c</source>
|
||||
<commands EXPORT="discard">make SERVER_REPLY=1 clean udp-server.wismote TARGET=wismote DEFINES=TEST_MORE_ROUTES=1</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/ipv6/rpl-udp/udp-server.wismote</firmware>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspButton</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.Msp802154Radio</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDefaultSerial</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspLED</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
|
||||
</motetype>
|
||||
<motetype>
|
||||
org.contikios.cooja.mspmote.WismoteMoteType
|
||||
<identifier>sky2</identifier>
|
||||
<description>WisMote Type #sky2</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/ipv6/rpl-udp/udp-client.c</source>
|
||||
<commands EXPORT="discard">make SERVER_REPLY=1 clean udp-client.wismote TARGET=wismote</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/ipv6/rpl-udp/udp-client.wismote</firmware>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspButton</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.Msp802154Radio</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDefaultSerial</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspLED</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
|
||||
</motetype>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>48.435974731198804</x>
|
||||
<y>-66.16503914182063</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>1</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky1</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>-65.3176930733124</x>
|
||||
<y>17.4304162608286</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>2</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>127.9689727848476</x>
|
||||
<y>91.71883780610729</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>3</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>154.92605604103275</x>
|
||||
<y>40.97896551774433</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>4</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>47.34887596588397</x>
|
||||
<y>-30.341495695501195</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>5</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>47.13486576528276</x>
|
||||
<y>32.944481932122315</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>6</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>-11.42091423859419</x>
|
||||
<y>17.879870626121914</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>7</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>118.92746659954325</x>
|
||||
<y>57.05973076244069</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>8</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>56.66768196114595</x>
|
||||
<y>74.35652008990945</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>9</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>16.45706316609417</x>
|
||||
<y>23.9075414163248</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>10</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>-13.423161364506493</x>
|
||||
<y>-38.483037144768275</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>11</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>-9.034961217472201</x>
|
||||
<y>44.411389162165406</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>12</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>35.60049910164592</x>
|
||||
<y>87.95154356223047</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>13</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>66.93880603404335</x>
|
||||
<y>-42.39683727590697</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>14</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>94.81678343873172</x>
|
||||
<y>26.921376811426246</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>15</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>-49.449656689283934</x>
|
||||
<y>57.924813144367945</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>16</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>-34.02467970185502</x>
|
||||
<y>-24.313824905298304</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>17</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>-28.750467760427494</x>
|
||||
<y>48.01822457713635</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>18</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>124.95513738974614</x>
|
||||
<y>20.140247172447996</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>19</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>14.85247487703553</x>
|
||||
<y>-34.478542892943686</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>20</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>154.43072661267115</x>
|
||||
<y>-3.279765376986134</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>21</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>99.90960713878738</x>
|
||||
<y>-21.76043658444847</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>22</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>88.4612185198951</x>
|
||||
<y>-49.763990463932714</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>23</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>24.745110502623138</x>
|
||||
<y>-1.7100594420374744</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>24</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>94.06332458995635</x>
|
||||
<y>-2.4635182908128352</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>25</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>-4.639784599615941</x>
|
||||
<y>-10.849236218849724</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>26</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>2.4901685804620115</x>
|
||||
<y>-60.89843789583528</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>27</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>100.55144245441083</x>
|
||||
<y>97.41861446767646</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>28</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>-12.355761328741393</x>
|
||||
<y>82.72616691655692</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>29</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>57.79962925723111</x>
|
||||
<y>0.6828700499064966</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>30</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>76.5550413097159</x>
|
||||
<y>77.33875258624342</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>31</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
</simulation>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.SimControl
|
||||
<width>289</width>
|
||||
<z>4</z>
|
||||
<height>184</height>
|
||||
<location_x>31</location_x>
|
||||
<location_y>41</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.Visualizer
|
||||
<plugin_config>
|
||||
<moterelations>true</moterelations>
|
||||
<skin>org.contikios.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.AttributeVisualizerSkin</skin>
|
||||
<viewport>2.349818846983307 0.0 0.0 2.349818846983307 187.19773526533345 190.95275613586946</viewport>
|
||||
</plugin_config>
|
||||
<width>659</width>
|
||||
<z>2</z>
|
||||
<height>622</height>
|
||||
<location_x>296</location_x>
|
||||
<location_y>11</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.LogListener
|
||||
<plugin_config>
|
||||
<filter>ID:22.*DAO</filter>
|
||||
<formatted_time />
|
||||
<coloring />
|
||||
</plugin_config>
|
||||
<width>937</width>
|
||||
<z>3</z>
|
||||
<height>442</height>
|
||||
<location_x>20</location_x>
|
||||
<location_y>297</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.ScriptRunner
|
||||
<plugin_config>
|
||||
<script>TIMEOUT(12000000, log.log("Total PRR " + totalPRR + "\n"));
|
||||
packetsReceived= new Array();
|
||||
packetsSent = new Array();
|
||||
serverID = 1;
|
||||
nodeCount = 31;
|
||||
totalPRR = 0;
|
||||
|
||||
for(i = 0; i <= nodeCount; i++) {
|
||||
packetsReceived[i] = 0;
|
||||
packetsSent[i] = 0;
|
||||
}
|
||||
|
||||
while(1) {
|
||||
YIELD();
|
||||
|
||||
msgArray = msg.split(' ');
|
||||
if(msgArray[0].equals("#A")) {
|
||||
if(msgArray[1].charAt(0) == 'r') {
|
||||
// Received packet
|
||||
senderID = id;
|
||||
arr2 = msgArray[1].split(',')[0].slice(2).split('/');
|
||||
recv = parseInt(arr2[0]);
|
||||
sent = parseInt(arr2[1]);
|
||||
log.log("Sent:" + sent + " Recv:" + recv + "\n");
|
||||
packetsSent[senderID] = sent;
|
||||
packetsReceived[senderID] = recv;
|
||||
|
||||
log.log("SenderID " + senderID + " PRR " + packetsReceived[senderID] / packetsSent[senderID] + "\n");
|
||||
totalReceived = totalSent = 0;
|
||||
for(i = serverID + 1; i <= nodeCount; i++) {
|
||||
totalReceived += packetsReceived[i];
|
||||
totalSent += packetsSent[i];
|
||||
}
|
||||
totalPRR = totalReceived / totalSent;
|
||||
log.log("Total PRR " + totalPRR + " recv " + totalReceived + " sent " + totalSent + "\n");
|
||||
}
|
||||
}
|
||||
}</script>
|
||||
<active>true</active>
|
||||
</plugin_config>
|
||||
<width>600</width>
|
||||
<z>5</z>
|
||||
<height>700</height>
|
||||
<location_x>946</location_x>
|
||||
<location_y>6</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.MoteInterfaceViewer
|
||||
<mote_arg>3</mote_arg>
|
||||
<plugin_config>
|
||||
<interface>Position</interface>
|
||||
<scrollpos>0,0</scrollpos>
|
||||
</plugin_config>
|
||||
<width>350</width>
|
||||
<z>6</z>
|
||||
<height>300</height>
|
||||
<location_x>976</location_x>
|
||||
<location_y>36</location_y>
|
||||
</plugin>
|
||||
</simconf>
|
||||
|
729
examples/ipv6/rpl-udp/rpl-udp-scale.csc
Normal file
729
examples/ipv6/rpl-udp/rpl-udp-scale.csc
Normal file
|
@ -0,0 +1,729 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<simconf>
|
||||
<project EXPORT="discard">[APPS_DIR]/mrm</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/mspsim</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/avrora</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/serial_socket</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/collect-view</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/powertracker</project>
|
||||
<simulation>
|
||||
<title>RPL up and downstream scaleability test network using IPv6 and RPL</title>
|
||||
<randomseed>generated</randomseed>
|
||||
<motedelay_us>5000000</motedelay_us>
|
||||
<radiomedium>
|
||||
org.contikios.cooja.radiomediums.UDGM
|
||||
<transmitting_range>50.0</transmitting_range>
|
||||
<interference_range>50.0</interference_range>
|
||||
<success_ratio_tx>1.0</success_ratio_tx>
|
||||
<success_ratio_rx>1.0</success_ratio_rx>
|
||||
</radiomedium>
|
||||
<events>
|
||||
<logoutput>40000</logoutput>
|
||||
</events>
|
||||
<motetype>
|
||||
org.contikios.cooja.mspmote.SkyMoteType
|
||||
<identifier>sky1</identifier>
|
||||
<description>Sky Mote Type #sky1</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/ipv6/rpl-udp/udp-server.c</source>
|
||||
<commands EXPORT="discard">make SERVER_REPLY=1 clean udp-server.sky TARGET=sky DEFINES=TEST_MORE_ROUTES=1</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/ipv6/rpl-udp/udp-server.sky</firmware>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyCoffeeFilesystem</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.Msp802154Radio</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyTemperature</moteinterface>
|
||||
</motetype>
|
||||
<motetype>
|
||||
org.contikios.cooja.mspmote.SkyMoteType
|
||||
<identifier>sky2</identifier>
|
||||
<description>Sky Mote Type #sky2</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/ipv6/rpl-udp/udp-client.c</source>
|
||||
<commands EXPORT="discard">make SERVER_REPLY=1 clean udp-client.sky TARGET=sky</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/ipv6/rpl-udp/udp-client.sky</firmware>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyCoffeeFilesystem</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.Msp802154Radio</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyTemperature</moteinterface>
|
||||
</motetype>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>48.435974731198804</x>
|
||||
<y>-66.16503914182063</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>1</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky1</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>-39.78380986481406</x>
|
||||
<y>-48.10655064098382</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>2</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>127.9689727848476</x>
|
||||
<y>91.71883780610729</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>3</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>154.92605604103275</x>
|
||||
<y>40.97896551774433</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>4</id>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspSerial
|
||||
<history>r~;</history>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>47.34887596588397</x>
|
||||
<y>-30.341495695501195</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>5</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>47.13486576528276</x>
|
||||
<y>32.944481932122315</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>6</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>-11.42091423859419</x>
|
||||
<y>17.879870626121914</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>7</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>118.92746659954325</x>
|
||||
<y>57.05973076244069</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>8</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>53.68872892015448</x>
|
||||
<y>59.887319605093715</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>9</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>16.45706316609417</x>
|
||||
<y>23.9075414163248</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>10</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>-13.423161364506493</x>
|
||||
<y>-38.483037144768275</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>11</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>-9.034961217472201</x>
|
||||
<y>44.411389162165406</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>12</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>-39.298891643282545</x>
|
||||
<y>-3.9704359883635574</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>13</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>66.93880603404335</x>
|
||||
<y>-42.39683727590697</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>14</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>94.81678343873172</x>
|
||||
<y>26.921376811426246</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>15</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>-43.06618588715935</x>
|
||||
<y>30.68867105530305</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>16</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>-34.02467970185502</x>
|
||||
<y>-24.313824905298304</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>17</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>-28.750467760427494</x>
|
||||
<y>48.01822457713635</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>18</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>124.95513738974614</x>
|
||||
<y>20.140247172447996</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>19</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>15.703604317318808</x>
|
||||
<y>-47.6710492173345</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>20</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>154.43072661267115</x>
|
||||
<y>-3.279765376986134</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>21</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>121.18784314586934</x>
|
||||
<y>-24.313824905298304</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>22</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>88.4612185198951</x>
|
||||
<y>-49.763990463932714</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>23</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>24.745110502623138</x>
|
||||
<y>-1.7100594420374744</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>24</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>94.06332458995635</x>
|
||||
<y>-2.4635182908128352</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>25</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>-4.639784599615941</x>
|
||||
<y>-9.998106778566445</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>26</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>2.4901685804620115</x>
|
||||
<y>-60.89843789583528</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>27</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>103.10483077526068</x>
|
||||
<y>96.99304974753483</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>28</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>8.922474678340558</x>
|
||||
<y>59.320107308766765</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>29</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>58.650758697514384</x>
|
||||
<y>2.8106936506146916</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>30</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>90.59867707439</x>
|
||||
<y>67.97632874312737</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>31</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
</simulation>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.SimControl
|
||||
<width>289</width>
|
||||
<z>1</z>
|
||||
<height>184</height>
|
||||
<location_x>31</location_x>
|
||||
<location_y>41</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.Visualizer
|
||||
<plugin_config>
|
||||
<skin>org.contikios.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.AttributeVisualizerSkin</skin>
|
||||
<viewport>2.349818846983307 0.0 0.0 2.349818846983307 187.19773526533345 190.95275613586946</viewport>
|
||||
</plugin_config>
|
||||
<width>659</width>
|
||||
<z>3</z>
|
||||
<height>523</height>
|
||||
<location_x>296</location_x>
|
||||
<location_y>11</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.LogListener
|
||||
<plugin_config>
|
||||
<filter />
|
||||
<formatted_time />
|
||||
<coloring />
|
||||
</plugin_config>
|
||||
<width>937</width>
|
||||
<z>4</z>
|
||||
<height>349</height>
|
||||
<location_x>21</location_x>
|
||||
<location_y>464</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.ScriptRunner
|
||||
<plugin_config>
|
||||
<script>TIMEOUT(12000000, log.log("Total PRR " + totalPRR + "\n"));
|
||||
packetsReceived= new Array();
|
||||
packetsSent = new Array();
|
||||
serverID = 1;
|
||||
nodeCount = 31;
|
||||
totalPRR = 0;
|
||||
|
||||
for(i = 0; i <= nodeCount; i++) {
|
||||
packetsReceived[i] = 0;
|
||||
packetsSent[i] = 0;
|
||||
}
|
||||
|
||||
while(1) {
|
||||
YIELD();
|
||||
|
||||
msgArray = msg.split(' ');
|
||||
if(msgArray[0].equals("#A")) {
|
||||
if(msgArray[1].charAt(0) == 'r') {
|
||||
// Received packet
|
||||
senderID = id;
|
||||
arr2 = msgArray[1].split(',')[0].slice(2).split('/');
|
||||
recv = parseInt(arr2[0]);
|
||||
sent = parseInt(arr2[1]);
|
||||
log.log("Sent:" + sent + " Recv:" + recv + "\n");
|
||||
packetsSent[senderID] = sent;
|
||||
packetsReceived[senderID] = recv;
|
||||
|
||||
log.log("SenderID " + senderID + " PRR " + packetsReceived[senderID] / packetsSent[senderID] + "\n");
|
||||
totalReceived = totalSent = 0;
|
||||
for(i = serverID + 1; i <= nodeCount; i++) {
|
||||
totalReceived += packetsReceived[i];
|
||||
totalSent += packetsSent[i];
|
||||
}
|
||||
totalPRR = totalReceived / totalSent;
|
||||
log.log("Total PRR " + totalPRR + " recv " + totalReceived + " sent " + totalSent + "\n");
|
||||
}
|
||||
}
|
||||
}</script>
|
||||
<active>true</active>
|
||||
</plugin_config>
|
||||
<width>600</width>
|
||||
<z>0</z>
|
||||
<height>700</height>
|
||||
<location_x>946</location_x>
|
||||
<location_y>6</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.MoteInterfaceViewer
|
||||
<mote_arg>3</mote_arg>
|
||||
<plugin_config>
|
||||
<interface>Serial port</interface>
|
||||
<scrollpos>0,0</scrollpos>
|
||||
</plugin_config>
|
||||
<width>350</width>
|
||||
<z>2</z>
|
||||
<height>300</height>
|
||||
<location_x>976</location_x>
|
||||
<location_y>36</location_y>
|
||||
</plugin>
|
||||
</simconf>
|
|
@ -1,12 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<simconf>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/mrm</project>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/mspsim</project>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/avrora</project>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/mobility</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/mrm</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/mspsim</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/avrora</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/serial_socket</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/collect-view</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/powertracker</project>
|
||||
<simulation>
|
||||
<title>Data collection network using IPv6 and RPL</title>
|
||||
<delaytime>0</delaytime>
|
||||
<randomseed>generated</randomseed>
|
||||
<motedelay_us>5000000</motedelay_us>
|
||||
<radiomedium>
|
||||
|
@ -24,7 +25,7 @@
|
|||
<identifier>sky1</identifier>
|
||||
<description>Sky Mote Type #sky1</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/ipv6/rpl-udp/udp-server.c</source>
|
||||
<commands EXPORT="discard">make udp-server.sky TARGET=sky</commands>
|
||||
<commands EXPORT="discard">make clean udp-server.sky TARGET=sky DEFINES=TEST_MORE_ROUTES=1</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/ipv6/rpl-udp/udp-server.sky</firmware>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
|
@ -47,7 +48,7 @@
|
|||
<identifier>sky2</identifier>
|
||||
<description>Sky Mote Type #sky2</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/ipv6/rpl-udp/udp-client.c</source>
|
||||
<commands EXPORT="discard">make udp-client.sky TARGET=sky</commands>
|
||||
<commands EXPORT="discard">make clean udp-client.sky TARGET=sky</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/ipv6/rpl-udp/udp-client.sky</firmware>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
|
@ -73,6 +74,10 @@
|
|||
<y>-66.16503914182063</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>1</id>
|
||||
|
@ -87,6 +92,10 @@
|
|||
<y>98.28771308774003</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>2</id>
|
||||
|
@ -101,6 +110,10 @@
|
|||
<y>91.71883780610729</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>3</id>
|
||||
|
@ -115,6 +128,10 @@
|
|||
<y>92.47229665488265</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>4</id>
|
||||
|
@ -129,6 +146,10 @@
|
|||
<y>-30.341495695501195</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>5</id>
|
||||
|
@ -143,6 +164,10 @@
|
|||
<y>32.944481932122315</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>6</id>
|
||||
|
@ -157,6 +182,10 @@
|
|||
<y>17.879870626121914</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>7</id>
|
||||
|
@ -171,6 +200,10 @@
|
|||
<y>57.05973076244069</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>8</id>
|
||||
|
@ -185,6 +218,10 @@
|
|||
<y>59.887319605093715</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>9</id>
|
||||
|
@ -199,6 +236,10 @@
|
|||
<y>23.9075414163248</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>10</id>
|
||||
|
@ -213,6 +254,10 @@
|
|||
<y>75.14274313304935</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>11</id>
|
||||
|
@ -227,6 +272,10 @@
|
|||
<y>85.6911670159044</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>12</id>
|
||||
|
@ -241,6 +290,10 @@
|
|||
<y>-3.9704359883635574</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>13</id>
|
||||
|
@ -255,6 +308,10 @@
|
|||
<y>-42.39683727590697</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>14</id>
|
||||
|
@ -269,6 +326,10 @@
|
|||
<y>26.921376811426246</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>15</id>
|
||||
|
@ -283,6 +344,10 @@
|
|||
<y>30.68867105530305</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>16</id>
|
||||
|
@ -297,6 +362,10 @@
|
|||
<y>-24.313824905298304</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>17</id>
|
||||
|
@ -311,6 +380,10 @@
|
|||
<y>48.01822457713635</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>18</id>
|
||||
|
@ -325,6 +398,10 @@
|
|||
<y>20.140247172447996</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>19</id>
|
||||
|
@ -339,6 +416,10 @@
|
|||
<y>-47.6710492173345</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>20</id>
|
||||
|
@ -353,6 +434,10 @@
|
|||
<y>92.47229665488265</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>21</id>
|
||||
|
@ -367,6 +452,10 @@
|
|||
<y>-24.313824905298304</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>22</id>
|
||||
|
@ -381,6 +470,10 @@
|
|||
<y>-44.657213822233054</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>23</id>
|
||||
|
@ -395,6 +488,10 @@
|
|||
<y>-1.7100594420374744</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>24</id>
|
||||
|
@ -409,6 +506,10 @@
|
|||
<y>-2.4635182908128352</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>25</id>
|
||||
|
@ -423,6 +524,10 @@
|
|||
<y>-9.998106778566445</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>26</id>
|
||||
|
@ -437,6 +542,10 @@
|
|||
<y>-50.684884612435944</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>27</id>
|
||||
|
@ -451,6 +560,10 @@
|
|||
<y>96.99304974753483</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>28</id>
|
||||
|
@ -465,6 +578,10 @@
|
|||
<y>59.320107308766765</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>29</id>
|
||||
|
@ -479,6 +596,10 @@
|
|||
<y>2.8106936506146916</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>30</id>
|
||||
|
@ -493,6 +614,10 @@
|
|||
<y>67.97632874312737</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspClock
|
||||
<deviation>1.0</deviation>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>31</id>
|
||||
|
@ -503,10 +628,10 @@
|
|||
<plugin>
|
||||
org.contikios.cooja.plugins.SimControl
|
||||
<width>259</width>
|
||||
<z>1</z>
|
||||
<z>3</z>
|
||||
<height>184</height>
|
||||
<location_x>0</location_x>
|
||||
<location_y>0</location_y>
|
||||
<location_x>3</location_x>
|
||||
<location_y>15</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.Visualizer
|
||||
|
@ -517,21 +642,23 @@
|
|||
<viewport>2.349818846983307 0.0 0.0 2.349818846983307 150.19773526533348 176.95275613586946</viewport>
|
||||
</plugin_config>
|
||||
<width>520</width>
|
||||
<z>3</z>
|
||||
<z>2</z>
|
||||
<height>523</height>
|
||||
<location_x>269</location_x>
|
||||
<location_y>14</location_y>
|
||||
<location_x>14</location_x>
|
||||
<location_y>210</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.LogListener
|
||||
<plugin_config>
|
||||
<filter />
|
||||
<formatted_time />
|
||||
<coloring />
|
||||
</plugin_config>
|
||||
<width>937</width>
|
||||
<z>0</z>
|
||||
<height>213</height>
|
||||
<location_x>21</location_x>
|
||||
<location_y>464</location_y>
|
||||
<location_x>265</location_x>
|
||||
<location_y>16</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.ScriptRunner
|
||||
|
@ -574,11 +701,11 @@ while(1) {
|
|||
}</script>
|
||||
<active>true</active>
|
||||
</plugin_config>
|
||||
<width>600</width>
|
||||
<z>2</z>
|
||||
<height>700</height>
|
||||
<location_x>665</location_x>
|
||||
<location_y>6</location_y>
|
||||
<width>651</width>
|
||||
<z>1</z>
|
||||
<height>550</height>
|
||||
<location_x>547</location_x>
|
||||
<location_y>181</location_y>
|
||||
</plugin>
|
||||
</simconf>
|
||||
|
||||
|
|
|
@ -40,12 +40,17 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
/* Only for TMOTE Sky? */
|
||||
#include "dev/serial-line.h"
|
||||
#include "dev/uart1.h"
|
||||
#include "net/ipv6/uip-ds6-route.h"
|
||||
|
||||
#define UDP_CLIENT_PORT 8765
|
||||
#define UDP_SERVER_PORT 5678
|
||||
|
||||
#define UDP_EXAMPLE_ID 190
|
||||
|
||||
#define DEBUG DEBUG_PRINT
|
||||
#define DEBUG DEBUG_FULL
|
||||
#include "net/ip/uip-debug.h"
|
||||
|
||||
#ifndef PERIOD
|
||||
|
@ -64,6 +69,9 @@ static uip_ipaddr_t server_ipaddr;
|
|||
PROCESS(udp_client_process, "UDP client process");
|
||||
AUTOSTART_PROCESSES(&udp_client_process);
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int seq_id;
|
||||
static int reply;
|
||||
|
||||
static void
|
||||
tcpip_handler(void)
|
||||
{
|
||||
|
@ -72,16 +80,32 @@ tcpip_handler(void)
|
|||
if(uip_newdata()) {
|
||||
str = uip_appdata;
|
||||
str[uip_datalen()] = '\0';
|
||||
printf("DATA recv '%s'\n", str);
|
||||
reply++;
|
||||
printf("DATA recv '%s' (s:%d, r:%d)\n", str, seq_id, reply);
|
||||
}
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
send_packet(void *ptr)
|
||||
{
|
||||
static int seq_id;
|
||||
char buf[MAX_PAYLOAD_LEN];
|
||||
|
||||
#ifdef SERVER_REPLY
|
||||
uint8_t num_used = 0;
|
||||
uip_ds6_nbr_t *nbr;
|
||||
|
||||
nbr = nbr_table_head(ds6_neighbors);
|
||||
while(nbr != NULL) {
|
||||
nbr = nbr_table_next(ds6_neighbors, nbr);
|
||||
num_used++;
|
||||
}
|
||||
|
||||
if(seq_id > 0) {
|
||||
ANNOTATE("#A r=%d/%d,color=%s,n=%d %d\n", reply, seq_id,
|
||||
reply == seq_id ? "GREEN" : "RED", uip_ds6_route_num_routes(), num_used);
|
||||
}
|
||||
#endif /* SERVER_REPLY */
|
||||
|
||||
seq_id++;
|
||||
PRINTF("DATA send to %d 'Hello %d'\n",
|
||||
server_ipaddr.u8[sizeof(server_ipaddr.u8) - 1], seq_id);
|
||||
|
@ -116,7 +140,7 @@ set_global_address(void)
|
|||
{
|
||||
uip_ipaddr_t ipaddr;
|
||||
|
||||
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
|
||||
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0);
|
||||
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
|
||||
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);
|
||||
|
||||
|
@ -125,21 +149,21 @@ set_global_address(void)
|
|||
* Obviously the choice made here must also be selected in udp-server.c.
|
||||
*
|
||||
* For correct Wireshark decoding using a sniffer, add the /64 prefix to the 6LowPAN protocol preferences,
|
||||
* e.g. set Context 0 to aaaa::. At present Wireshark copies Context/128 and then overwrites it.
|
||||
* (Setting Context 0 to aaaa::1111:2222:3333:4444 will report a 16 bit compressed address of aaaa::1111:22ff:fe33:xxxx)
|
||||
* e.g. set Context 0 to fd00::. At present Wireshark copies Context/128 and then overwrites it.
|
||||
* (Setting Context 0 to fd00::1111:2222:3333:4444 will report a 16 bit compressed address of fd00::1111:22ff:fe33:xxxx)
|
||||
*
|
||||
* Note the IPCMV6 checksum verification depends on the correct uncompressed addresses.
|
||||
*/
|
||||
|
||||
#if 0
|
||||
/* Mode 1 - 64 bits inline */
|
||||
uip_ip6addr(&server_ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 1);
|
||||
uip_ip6addr(&server_ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 1);
|
||||
#elif 1
|
||||
/* Mode 2 - 16 bits inline */
|
||||
uip_ip6addr(&server_ipaddr, 0xaaaa, 0, 0, 0, 0, 0x00ff, 0xfe00, 1);
|
||||
uip_ip6addr(&server_ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0x00ff, 0xfe00, 1);
|
||||
#else
|
||||
/* Mode 3 - derived from server link-local (MAC) address */
|
||||
uip_ip6addr(&server_ipaddr, 0xaaaa, 0, 0, 0, 0x0250, 0xc2ff, 0xfea8, 0xcd1a); //redbee-econotag
|
||||
uip_ip6addr(&server_ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0x0250, 0xc2ff, 0xfea8, 0xcd1a); //redbee-econotag
|
||||
#endif
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
@ -156,8 +180,9 @@ PROCESS_THREAD(udp_client_process, ev, data)
|
|||
PROCESS_PAUSE();
|
||||
|
||||
set_global_address();
|
||||
|
||||
PRINTF("UDP client process started\n");
|
||||
|
||||
PRINTF("UDP client process started nbr:%d routes:%d\n",
|
||||
NBR_TABLE_CONF_MAX_NEIGHBORS, UIP_CONF_MAX_ROUTES);
|
||||
|
||||
print_local_addresses();
|
||||
|
||||
|
@ -174,6 +199,11 @@ PROCESS_THREAD(udp_client_process, ev, data)
|
|||
PRINTF(" local/remote port %u/%u\n",
|
||||
UIP_HTONS(client_conn->lport), UIP_HTONS(client_conn->rport));
|
||||
|
||||
/* initialize serial line */
|
||||
uart1_set_input(serial_line_input_byte);
|
||||
serial_line_init();
|
||||
|
||||
|
||||
#if WITH_COMPOWER
|
||||
powertrace_sniff(POWERTRACE_ON);
|
||||
#endif
|
||||
|
@ -184,7 +214,41 @@ PROCESS_THREAD(udp_client_process, ev, data)
|
|||
if(ev == tcpip_event) {
|
||||
tcpip_handler();
|
||||
}
|
||||
|
||||
|
||||
if(ev == serial_line_event_message && data != NULL) {
|
||||
char *str;
|
||||
str = data;
|
||||
if(str[0] == 'r') {
|
||||
uip_ds6_route_t *r;
|
||||
uip_ipaddr_t *nexthop;
|
||||
uip_ds6_defrt_t *defrt;
|
||||
uip_ipaddr_t *ipaddr;
|
||||
defrt = NULL;
|
||||
if((ipaddr = uip_ds6_defrt_choose()) != NULL) {
|
||||
defrt = uip_ds6_defrt_lookup(ipaddr);
|
||||
}
|
||||
if(defrt != NULL) {
|
||||
PRINTF("DefRT: :: -> %02d", defrt->ipaddr.u8[15]);
|
||||
PRINTF(" lt:%lu inf:%d\n", stimer_remaining(&defrt->lifetime),
|
||||
defrt->isinfinite);
|
||||
} else {
|
||||
PRINTF("DefRT: :: -> NULL\n");
|
||||
}
|
||||
|
||||
for(r = uip_ds6_route_head();
|
||||
r != NULL;
|
||||
r = uip_ds6_route_next(r)) {
|
||||
nexthop = uip_ds6_route_nexthop(r);
|
||||
PRINTF("Route: %02d -> %02d", r->ipaddr.u8[15], nexthop->u8[15]);
|
||||
/* PRINT6ADDR(&r->ipaddr); */
|
||||
/* PRINTF(" -> "); */
|
||||
/* PRINT6ADDR(nexthop); */
|
||||
PRINTF(" lt:%lu\n", r->state.lifetime);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(etimer_expired(&periodic)) {
|
||||
etimer_reset(&periodic);
|
||||
ctimer_set(&backoff_timer, SEND_TIME, send_packet, NULL);
|
||||
|
|
|
@ -107,27 +107,28 @@ PROCESS_THREAD(udp_server_process, ev, data)
|
|||
|
||||
SENSORS_ACTIVATE(button_sensor);
|
||||
|
||||
PRINTF("UDP server started\n");
|
||||
PRINTF("UDP server started. nbr:%d routes:%d\n",
|
||||
NBR_TABLE_CONF_MAX_NEIGHBORS, UIP_CONF_MAX_ROUTES);
|
||||
|
||||
#if UIP_CONF_ROUTER
|
||||
/* The choice of server address determines its 6LoPAN header compression.
|
||||
* Obviously the choice made here must also be selected in udp-client.c.
|
||||
*
|
||||
* For correct Wireshark decoding using a sniffer, add the /64 prefix to the 6LowPAN protocol preferences,
|
||||
* e.g. set Context 0 to aaaa::. At present Wireshark copies Context/128 and then overwrites it.
|
||||
* (Setting Context 0 to aaaa::1111:2222:3333:4444 will report a 16 bit compressed address of aaaa::1111:22ff:fe33:xxxx)
|
||||
* e.g. set Context 0 to fd00::. At present Wireshark copies Context/128 and then overwrites it.
|
||||
* (Setting Context 0 to fd00::1111:2222:3333:4444 will report a 16 bit compressed address of fd00::1111:22ff:fe33:xxxx)
|
||||
* Note Wireshark's IPCMV6 checksum verification depends on the correct uncompressed addresses.
|
||||
*/
|
||||
|
||||
#if 0
|
||||
/* Mode 1 - 64 bits inline */
|
||||
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 1);
|
||||
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 1);
|
||||
#elif 1
|
||||
/* Mode 2 - 16 bits inline */
|
||||
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0x00ff, 0xfe00, 1);
|
||||
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0x00ff, 0xfe00, 1);
|
||||
#else
|
||||
/* Mode 3 - derived from link local (MAC) address */
|
||||
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
|
||||
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0);
|
||||
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
|
||||
#endif
|
||||
|
||||
|
@ -136,7 +137,7 @@ PROCESS_THREAD(udp_server_process, ev, data)
|
|||
if(root_if != NULL) {
|
||||
rpl_dag_t *dag;
|
||||
dag = rpl_set_root(RPL_DEFAULT_INSTANCE,(uip_ip6addr_t *)&ipaddr);
|
||||
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
|
||||
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0);
|
||||
rpl_set_prefix(dag, &ipaddr, 64);
|
||||
PRINTF("created a new RPL dag\n");
|
||||
} else {
|
||||
|
|
|
@ -80,7 +80,7 @@ set_global_address(void)
|
|||
int i;
|
||||
uint8_t state;
|
||||
|
||||
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
|
||||
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0);
|
||||
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
|
||||
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);
|
||||
|
||||
|
@ -109,7 +109,7 @@ create_rpl_dag(uip_ipaddr_t *ipaddr)
|
|||
|
||||
rpl_set_root(RPL_DEFAULT_INSTANCE, ipaddr);
|
||||
dag = rpl_get_any_dag();
|
||||
uip_ip6addr(&prefix, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
|
||||
uip_ip6addr(&prefix, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0);
|
||||
rpl_set_prefix(dag, &prefix, 64);
|
||||
PRINTF("created a new RPL dag\n");
|
||||
} else {
|
||||
|
|
|
@ -78,7 +78,7 @@ set_global_address(void)
|
|||
int i;
|
||||
uint8_t state;
|
||||
|
||||
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
|
||||
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0);
|
||||
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
|
||||
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ $(CONTIKI)/tools/tunslip6: $(CONTIKI)/tools/tunslip6.c
|
|||
(cd $(CONTIKI)/tools && $(MAKE) tunslip6)
|
||||
|
||||
connect-router: $(CONTIKI)/tools/tunslip6
|
||||
sudo $(CONTIKI)/tools/tunslip6 aaaa::1/64
|
||||
sudo $(CONTIKI)/tools/tunslip6 fd00::1/64
|
||||
|
||||
connect-router-cooja: $(CONTIKI)/tools/tunslip6
|
||||
sudo $(CONTIKI)/tools/tunslip6 -a 127.0.0.1 aaaa::1/64
|
||||
sudo $(CONTIKI)/tools/tunslip6 -a 127.0.0.1 fd00::1/64
|
||||
|
|
|
@ -17,8 +17,8 @@ To test the example in COOJA under Linux
|
|||
make connect-router-cooja
|
||||
|
||||
3. You should now be able to browse to the nodes using your web browser:
|
||||
Router: http://[aaaa::0212:7401:0001:0101]/
|
||||
Node 2: http://[aaaa::0212:7402:0002:0202]/
|
||||
Router: http://[fd00::0212:7401:0001:0101]/
|
||||
Node 2: http://[fd00::0212:7402:0002:0202]/
|
||||
|
||||
|
||||
To run the example on real nodes under Linux
|
||||
|
|
|
@ -44,13 +44,13 @@
|
|||
#include <stdio.h>
|
||||
|
||||
/* The address of the server to register the services for this node */
|
||||
#define SERVER "[aaaa::1]"
|
||||
#define SERVER "[fd00::1]"
|
||||
|
||||
/* This command registers two services (/0 and /1) to turn the leds on or off */
|
||||
#define REGISTER_COMMAND "/r?p=0&d=Turn%20off%20leds&p=1&d=Turn%20on%20leds"
|
||||
|
||||
/* The address of the other node to control */
|
||||
#define OTHER_NODE "[aaaa::1]"
|
||||
#define OTHER_NODE "[fd00::1]"
|
||||
|
||||
/* The commands to send to the other node */
|
||||
#define SET_LEDS_ON "/1"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue