diff --git a/examples/ipv6/rpl-simple/Makefile b/examples/ipv6/rpl-simple/Makefile deleted file mode 100644 index 2408729b9..000000000 --- a/examples/ipv6/rpl-simple/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -all: node -CONTIKI=../../.. - -# Set MAKE_MAC = MAKE_MAC_TSCH to run TSCH instead -MAKE_MAC = MAKE_MAC_CSMA - -include $(CONTIKI)/Makefile.include diff --git a/examples/ipv6/rpl-simple/node.c b/examples/ipv6/rpl-simple/node.c deleted file mode 100644 index 8f94c2d78..000000000 --- a/examples/ipv6/rpl-simple/node.c +++ /dev/null @@ -1,170 +0,0 @@ -/* - * 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. - * - * This file is part of the Contiki operating system. - * - */ - -#include "contiki.h" -#include "lib/random.h" -#include "sys/ctimer.h" -#include "net/ipv6/uip.h" -#include "net/ipv6/uip-ds6.h" -#include "net/ipv6/uip-udp-packet.h" -#include "rpl.h" -#include "rpl-dag-root.h" -#include "node-id.h" -#include "simple-udp.h" -#include "sys/ctimer.h" -#include -#include - -#include "dev/serial-line.h" -#include "net/ipv6/uip-ds6-route.h" - -/* Log configuration */ -#include "sys/log.h" -#define LOG_MODULE "App" -#define LOG_LEVEL LOG_LEVEL_INFO - -#define UDP_PORT 8765 - -#define START_INTERVAL (5 * CLOCK_SECOND) -#define SEND_INTERVAL (30 * CLOCK_SECOND) - -static struct simple_udp_connection udp_conn; - -static uip_ipaddr_t node_ipaddr; -static uip_ipaddr_t root_ipaddr; -static uip_ipaddr_t destination_ipaddr; - -/*---------------------------------------------------------------------------*/ -PROCESS(node_process, "RPL Simple Process"); -AUTOSTART_PROCESSES(&node_process); - -/*---------------------------------------------------------------------------*/ -static void -receiver(struct simple_udp_connection *c, - const uip_ipaddr_t *sender_addr, - uint16_t sender_port, - const uip_ipaddr_t *receiver_addr, - uint16_t receiver_port, - const uint8_t *data, - uint16_t datalen) -{ - unsigned seq_id; - memcpy(&seq_id, data, sizeof(int)); - if(uip_ip6addr_cmp(&destination_ipaddr, &node_ipaddr)) { - LOG_INFO("received request %u from ", seq_id); - LOG_INFO_6ADDR(sender_addr); - LOG_INFO_("\n"); - - LOG_INFO("sending reply %u to ", seq_id); - LOG_INFO_6ADDR(sender_addr); - LOG_INFO_("\n"); - simple_udp_sendto(&udp_conn, &seq_id, sizeof(seq_id), sender_addr); - } else { - static unsigned reply_count = 0; - reply_count++; - LOG_INFO("received reply %u (%u/%u) from ", seq_id, reply_count, seq_id); - LOG_INFO_6ADDR(sender_addr); - LOG_INFO_("\n"); - } -} -/*---------------------------------------------------------------------------*/ -static void -send_packet(void *ptr) -{ - if(rpl_is_reachable()) { - static unsigned seq_id = 0; - LOG_INFO("sending request %u to ", ++seq_id); - LOG_INFO_6ADDR(&destination_ipaddr); - LOG_INFO_("\n"); - simple_udp_sendto(&udp_conn, &seq_id, sizeof(seq_id), &destination_ipaddr); - } else { - LOG_INFO("not connected yet\n"); - } -} -/*---------------------------------------------------------------------------*/ -static void -get_global_address(void) -{ - int i; - uint8_t state; - - for(i = 0; i < UIP_DS6_ADDR_NB; i++) { - state = uip_ds6_if.addr_list[i].state; - if(uip_ds6_if.addr_list[i].isused && - state == ADDR_PREFERRED && - !uip_is_addr_linklocal(&uip_ds6_if.addr_list[i].ipaddr)) { - uip_ip6addr_copy(&node_ipaddr, &uip_ds6_if.addr_list[i].ipaddr); - } - } -} -/*---------------------------------------------------------------------------*/ -PROCESS_THREAD(node_process, ev, data) -{ - static struct etimer periodic; - static struct ctimer backoff_timer; - - PROCESS_BEGIN(); - - /* Hardcoded IPv6 addresses */ - uip_ip6addr(&root_ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0x0212, 0x7401, 0x0001, 0x0101); - uip_ip6addr(&destination_ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0x0212, 0x7401, 0x0001, 0x0101); - - rpl_dag_root_init(NULL, NULL); - get_global_address(); - /* Configure root */ - if(uip_ip6addr_cmp(&root_ipaddr, &node_ipaddr)) { - rpl_dag_root_init_dag_immediately(); - } - - /* New connection with remote host */ - simple_udp_register(&udp_conn, UDP_PORT, NULL, UDP_PORT, receiver); - /* Wait for START_INTERVAL */ - etimer_set(&periodic, START_INTERVAL); - PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&periodic)); - -#if MAC_CONF_WITH_TSCH - NETSTACK_MAC.on(); -#endif /* MAC_CONF_WITH_TSCH */ - - if(!uip_ip6addr_cmp(&destination_ipaddr, &node_ipaddr)) { - /* Send data periodically */ - etimer_set(&periodic, SEND_INTERVAL); - while(1) { - PROCESS_YIELD(); - - if(etimer_expired(&periodic)) { - etimer_reset(&periodic); - ctimer_set(&backoff_timer, random_rand() % (SEND_INTERVAL), send_packet, NULL); - } - } - } - - PROCESS_END(); -} -/*---------------------------------------------------------------------------*/ diff --git a/examples/ipv6/rpl-simple/project-conf.h b/examples/ipv6/rpl-simple/project-conf.h deleted file mode 100644 index 2a8b376f4..000000000 --- a/examples/ipv6/rpl-simple/project-conf.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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_ - -/* Network size and PAN-ID */ -#define NBR_TABLE_CONF_MAX_NEIGHBORS 25 - -#define NETSTACK_MAX_ROUTE_ENTRIES 25 - -#define IEEE802154_CONF_PANID 0xf123 - -/* Save some space */ -#define SICSLOWPAN_CONF_FRAG 0 - -/* Do not start TSCH at init, wait for NETSTACK_MAC.on() */ -#define TSCH_CONF_AUTOSTART 0 - -/* 6TiSCH minimal schedule length. - * Larger values result in less frequent active slots: reduces capacity and saves energy. */ -#define TSCH_SCHEDULE_CONF_DEFAULT_LENGTH 3 - -#define TSCH_SCHEDULE_CONF_MAX_LINKS 4 - -#endif diff --git a/examples/ipv6/rpl-simple/rpl-simple.csc b/examples/ipv6/rpl-simple/rpl-simple.csc deleted file mode 100644 index 9725032c2..000000000 --- a/examples/ipv6/rpl-simple/rpl-simple.csc +++ /dev/null @@ -1,148 +0,0 @@ - - - [APPS_DIR]/mrm - [APPS_DIR]/mspsim - [APPS_DIR]/avrora - [APPS_DIR]/serial_socket - [APPS_DIR]/collect-view - [APPS_DIR]/powertracker - - Simple RPL Example - generated - 5000000 - - org.contikios.cooja.radiomediums.UDGM - 50.0 - 50.0 - 1.0 - 1.0 - - - 40000 - - - org.contikios.cooja.mspmote.SkyMoteType - sky2 - Sky Mote Type #sky2 - [CONTIKI_DIR]/examples/ipv6/rpl-simple/node.sky - org.contikios.cooja.interfaces.Position - org.contikios.cooja.interfaces.RimeAddress - org.contikios.cooja.interfaces.IPAddress - org.contikios.cooja.interfaces.Mote2MoteRelations - org.contikios.cooja.interfaces.MoteAttributes - org.contikios.cooja.mspmote.interfaces.MspClock - org.contikios.cooja.mspmote.interfaces.MspMoteID - org.contikios.cooja.mspmote.interfaces.SkyButton - org.contikios.cooja.mspmote.interfaces.SkyFlash - org.contikios.cooja.mspmote.interfaces.SkyCoffeeFilesystem - org.contikios.cooja.mspmote.interfaces.Msp802154Radio - org.contikios.cooja.mspmote.interfaces.MspSerial - org.contikios.cooja.mspmote.interfaces.SkyLED - org.contikios.cooja.mspmote.interfaces.MspDebugOutput - org.contikios.cooja.mspmote.interfaces.SkyTemperature - - - - - org.contikios.cooja.interfaces.Position - 48.435974731198804 - -66.16503914182063 - 0.0 - - - org.contikios.cooja.mspmote.interfaces.MspClock - 1.0 - - - org.contikios.cooja.mspmote.interfaces.MspMoteID - 1 - - sky2 - - - - - org.contikios.cooja.interfaces.Position - 28.87281458333398 - -21.744318674852618 - 0.0 - - - org.contikios.cooja.mspmote.interfaces.MspClock - 1.0 - - - org.contikios.cooja.mspmote.interfaces.MspMoteID - 2 - - sky2 - - - - org.contikios.cooja.plugins.SimControl - 185 - 2 - 154 - 1651 - 778 - - - org.contikios.cooja.plugins.Visualizer - - org.contikios.cooja.plugins.skins.IDVisualizerSkin - org.contikios.cooja.plugins.skins.UDGMVisualizerSkin - org.contikios.cooja.plugins.skins.AttributeVisualizerSkin - 1.260147830790386 0.0 0.0 1.260147830790386 105.5104655860535 140.74330745981246 - - 258 - 1 - 309 - 1573 - 11 - - - org.contikios.cooja.plugins.LogListener - - - - - - 854 - 3 - 919 - 5 - 2 - - - org.contikios.cooja.plugins.TimeLine - - 0 - 1 - - - - 2736.9736958636 - - 1858 - 4 - 223 - 0 - 931 - - - org.contikios.cooja.plugins.RadioLogger - - 477 - - false - false - - - 874 - 0 - 917 - 857 - 10 - - - diff --git a/tests/01-compile-base/Makefile b/tests/01-compile-base/Makefile index f59d80c14..e429e78b5 100644 --- a/tests/01-compile-base/Makefile +++ b/tests/01-compile-base/Makefile @@ -8,7 +8,6 @@ eeprom-test/native \ ipv6/multicast/sky \ logging/native \ ipv6/rpl-udp/sky \ -ipv6/rpl-simple/sky \ TOOLS= diff --git a/tests/02-compile-arm-ports/Makefile b/tests/02-compile-arm-ports/Makefile index 805a98ff4..bebf7518d 100644 --- a/tests/02-compile-arm-ports/Makefile +++ b/tests/02-compile-arm-ports/Makefile @@ -14,7 +14,6 @@ platform-specific/cc26xx/very-sleepy-demo/srf06-cc26xx \ hello-world/cc2538dk \ ipv6/rpl-border-router/cc2538dk \ ipv6/rpl-udp/cc2538dk \ -ipv6/rpl-simple/cc2538dk \ ipv6/coap-example/cc2538dk \ ipso-objects/cc2538dk \ platform-specific/cc2538dk/udp-ipv6-echo-server/cc2538dk \