Merge pull request #66 from yatch/pr/etsi-plugtest-2017

Project for ETSI Plugtest 2017
This commit is contained in:
Simon Duquennoy 2017-09-16 09:18:02 +02:00 committed by GitHub
commit 3c9369737e
13 changed files with 1634 additions and 4 deletions

View File

@ -0,0 +1,21 @@
CONTIKI_PROJECT = node
all: $(CONTIKI_PROJECT)
MAKE_WITH_SECURITY ?= 0 # force Security from command line
ifeq ($(MAKE_WITH_SECURITY),1)
CFLAGS += -DWITH_SECURITY=1
endif
MODULES += os/services/shell
MODULES += os/net/mac/tsch os/net/mac/tsch/sixtop
PROJECT_SOURCEFILES += sf-plugtest.c
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\" -Wno-nonnull-compare
ifeq ($(BOARD),launchpad/cc2650)
# Enable DAP and TAP by default for ETSI Plugtest
CFLAGS += -DSET_CCFG_CCFG_TAP_DAP_0_CPU_DAP_ENABLE=0xC5
CFLAGS += -DSET_CCFG_CCFG_TAP_DAP_0_TEST_TAP_ENABLE=0xC5
endif
CONTIKI =../../..
include $(CONTIKI)/Makefile.include

View File

@ -0,0 +1,57 @@
# The 1st F-Interop 6TiSCH Interoperability Event
## Overview
This project was used to build firmwares for [the 1st F-Interop 6TiSCH
Interoperability
Event](http://www.etsi.org/news-events/events/1197-6tisch-interop-prague-2017),
which worked well in all the tests except for "secjoin".
## Authors
* Simon Duquennoy
* Yasuyuki Tanaka
## Supported Hardwares
The following hardwares were used in the event:
* Zolertia Remote (TARGET=`zoul`, BOARD=`remote`)
* JN156x (TARGET=`jn516`)
* CC2650 LaunchPad (TARGET=`srf06-cc26xx`, BOARD=`launchpad/cc2650`)
## Usage
Access to your target board through serial connection. You'll get available
commands by hit `help` on the shell prompt.
```shell
> help
Available commands:
'> help': Shows this help
'> ip-addr': Shows all IPv6 addresses
'> ip-nbr': Shows all IPv6 neighbors
'> log module level': Sets log level (0--4) for a given module (or "all"). For module "mac", level 4 also enables per-slot logg'> ping addr': Pings the IPv6 address 'addr'
'> rpl-set-root 0/1 [prefix]': Sets node as root (on) or not (off). A /64 prefix can be optionally specified.
'> rpl-status': Shows a summary of the current RPL state
'> rpl-global-repair': Triggers a RPL global repair
'> rpl-local-repair': Triggers a RPL local repair
'> routes': Shows the route entries
'> tsch-schedule': Shows the current TSCH schedule
'> tsch-status': Shows a summary of the current TSCH state
'> reboot': Reboot the board by watchdog_reboot()
'> 6top help': Shows 6top command usage
```
Your board runs as a 6TiSCH node by default. Its role can be changed to DAG root
by `rpl-set-root 1`.
You can see how it works with
[test-with-cooja-mote.csc](test-with-cooja-mote.csc).
## Configuration
Edit [project-confi.h](./project-conf.h) if necessary.
* `UIP_CONF_IPV6_CHECKS`: set 0 if you want to disable checksum validation
* `SIXP_CONF_WITH_PAYLOAD_TERMINATION_IE`: set 1 if you want to append Paload Termination IE in 6P frames

View File

@ -0,0 +1,92 @@
/*
* Copyright (c) 2015, SICS Swedish ICT.
* 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.
*
*/
/**
* \file
* A RPL+TSCH node able to act as either a simple node (6ln),
* DAG Root (6dr) or DAG Root with security (6dr-sec)
* Press use button at startup to configure.
*
* \author Simon Duquennoy <simonduq@sics.se>
*/
#include "contiki.h"
#include "node-id.h"
#include "rpl.h"
#include "rpl-dag-root.h"
#include "sys/log.h"
#include "net/ipv6/uip-ds6-route.h"
#include "net/mac/tsch/tsch.h"
#include "net/mac/tsch/tsch-log.h"
#if UIP_CONF_IPV6_RPL_LITE == 0
#include "rpl-private.h"
#endif /* UIP_CONF_IPV6_RPL_LITE == 0 */
#include "serial-shell.h"
#include "sf-plugtest.h"
#if CONTIKI_TARGET_SRF06_CC26XX
#include <dev/serial-line.h>
#include <dev/cc26xx-uart.h>
#endif
/*---------------------------------------------------------------------------*/
PROCESS(node_process, "RPL Node");
AUTOSTART_PROCESSES(&node_process);
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(node_process, ev, data)
{
int is_coordinator;
PROCESS_BEGIN();
is_coordinator = 0;
#if CONTIKI_TARGET_SRF06_CC26XX
cc26xx_uart_set_input(serial_line_input_byte);
#endif
serial_shell_init();
log_set_level("all", LOG_LEVEL_WARN);
log_set_level("6top", LOG_LEVEL_INFO);
tsch_log_stop();
#if CONTIKI_TARGET_COOJA
is_coordinator = (node_id == 1);
#endif
if(is_coordinator) {
rpl_dag_root_init_dag_immediately();
}
NETSTACK_MAC.on();
sixtop_add_sf(&sf_plugtest);
PROCESS_END();
}
/*---------------------------------------------------------------------------*/

View File

@ -0,0 +1,193 @@
/*
* Copyright (c) 2015, SICS Swedish ICT.
* 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.
*
*/
/**
* \author Simon Duquennoy <simonduq@sics.se>
*/
#ifndef __PROJECT_CONF_H__
#define __PROJECT_CONF_H__
/* Set to use the Contiki shell */
#define WITH_SHELL 1
/* Set to enable TSCH security */
#ifndef WITH_SECURITY
#define WITH_SECURITY 0
#endif /* WITH_SECURITY */
/*******************************************************/
/********************* Enable TSCH *********************/
/*******************************************************/
/* Netstack layers */
#undef NETSTACK_CONF_MAC
#define NETSTACK_CONF_MAC tschmac_driver
/* TSCH and RPL callbacks */
#define RPL_CALLBACK_PARENT_SWITCH tsch_rpl_callback_parent_switch
#define RPL_CALLBACK_NEW_DIO_INTERVAL tsch_rpl_callback_new_dio_interval
#define TSCH_CALLBACK_KA_SENT tsch_rpl_callback_ka_sent
#define TSCH_CALLBACK_JOINING_NETWORK tsch_rpl_callback_joining_network
#define TSCH_CALLBACK_LEAVING_NETWORK tsch_rpl_callback_leaving_network
/*******************************************************/
/******************* Configure TSCH ********************/
/*******************************************************/
/* IEEE802.15.4 PANID */
#undef IEEE802154_CONF_PANID
#define IEEE802154_CONF_PANID 0x81a5
/* Do not start TSCH at init, wait for NETSTACK_MAC.on() */
#undef TSCH_CONF_AUTOSTART
#define TSCH_CONF_AUTOSTART 0
/* 6TiSCH minimal schedule length.
* Larger values result in less frequent active slots: reduces capacity and saves energy. */
#undef TSCH_SCHEDULE_CONF_DEFAULT_LENGTH
#define TSCH_SCHEDULE_CONF_DEFAULT_LENGTH 11
#if WITH_SECURITY
/* Enable security */
#undef LLSEC802154_CONF_ENABLED
#define LLSEC802154_CONF_ENABLED 1
#define LLSEC802154_CONF_USES_EXPLICIT_KEYS 0
#define LLSEC802154_CONF_USES_FRAME_COUNTER 0
#define TSCH_SECURITY_CONF_K1 { 0x11, 0x11, 0x11, 0x11, \
0x11, 0x11, 0x11, 0x11, \
0x11, 0x11, 0x11, 0x11, \
0x11, 0x11, 0x11, 0x11 }
#define TSCH_SECURITY_CONF_K2 { 0x22, 0x22, 0x22, 0x22, \
0x22, 0x22, 0x22, 0x22, \
0x22, 0x22, 0x22, 0x22, \
0x22, 0x22, 0x22, 0x22 }
#endif /* WITH_SECURITY */
#define TSCH_CONF_MAC_MAX_FRAME_RETRIES 3
#undef TSCH_CONF_DEFAULT_HOPPING_SEQUENCE
#define TSCH_CONF_DEFAULT_HOPPING_SEQUENCE (uint8_t[]){ 20 }
//#define TSCH_CONF_DEFAULT_HOPPING_SEQUENCE TSCH_HOPPING_SEQUENCE_16_16
#undef TSCH_PACKET_CONF_EACK_WITH_SRC_ADDR
#define TSCH_PACKET_CONF_EACK_WITH_SRC_ADDR 1
#undef TSCH_PACKET_CONF_EB_WITH_SLOTFRAME_AND_LINK
#define TSCH_PACKET_CONF_EB_WITH_SLOTFRAME_AND_LINK 1
#undef TSCH_CONF_EB_PERIOD
#define TSCH_CONF_EB_PERIOD (1 * CLOCK_SECOND)
#undef TSCH_CONF_MAX_EB_PERIOD
#define TSCH_CONF_MAX_EB_PERIOD (1 * CLOCK_SECOND)
/*******************************************************/
/******************* Configure 6top ********************/
/*******************************************************/
#define TSCH_CONF_WITH_SIXTOP 1
#define SF_PLUGTEST_SFID 0x00
#define SF_PLUGTEST_TIMEOUT CLOCK_SECOND
#define SIXP_CONF_WITH_PAYLOAD_TERMINATION_IE 0
/*******************************************************/
/************* Platform dependent configuration ********/
/*******************************************************/
#if CONTIKI_TARGET_CC2538DK || CONTIKI_TARGET_ZOUL || \
CONTIKI_TARGET_OPENMOTE_CC2538
#define TSCH_CONF_HW_FRAME_FILTERING 0
#endif /* CONTIKI_TARGET_CC2538DK || CONTIKI_TARGET_ZOUL \
|| CONTIKI_TARGET_OPENMOTE_CC2538 */
/* 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
#define USB_SERIAL_CONF_ENABLE 1
/* USB serial takes space, free more space elsewhere */
#undef SICSLOWPAN_CONF_FRAG
#define SICSLOWPAN_CONF_FRAG 0
#undef UIP_CONF_BUFFER_SIZE
#define UIP_CONF_BUFFER_SIZE 160
#if CONTIKI_TARGET_SRF06_CC26XX
#define CC2650_FAST_RADIO_STARTUP 1
#endif /* CONTIK_TARGET_SRF06_CC26XX */
#if CONTIKI_TARGET_COOJA
#define COOJA_CONF_SIMULATE_TURNAROUND 0
#endif /* CONTIKI_TARGET_COOJA */
/* Needed for cc2420 platforms only */
/* Disable DCO calibration (uses timerB) */
#undef DCOSYNCH_CONF_ENABLED
#define DCOSYNCH_CONF_ENABLED 0
/* Enable SFD timestamps (uses timerB) */
#undef CC2420_CONF_SFD_TIMESTAMPS
#define CC2420_CONF_SFD_TIMESTAMPS 1
/*******************************************************/
/******************* Configure 6LoWPAN/IPv6 ************/
/*******************************************************/
#undef UIP_CONF_IPV6_CHECKS
#define UIP_CONF_IPV6_CHECKS 1
#undef SICSLOWPAN_CONF_COMPRESSION
#define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_6LORH
/*******************************************************/
/********* Enable RPL non-storing mode *****************/
/*******************************************************/
#undef RPL_CONF_MOP
#define RPL_CONF_MOP RPL_MOP_NON_STORING /* Mode of operation*/
/*******************************************************/
/************* Other system configuration **************/
/*******************************************************/
/* Logging */
#define LOG_CONF_LEVEL_RPL LOG_LEVEL_INFO
#define LOG_CONF_LEVEL_TCPIP LOG_LEVEL_WARN
#define LOG_CONF_LEVEL_IPV6 LOG_LEVEL_WARN
#define LOG_CONF_LEVEL_6LOWPAN LOG_LEVEL_WARN
#define LOG_CONF_LEVEL_MAC LOG_LEVEL_INFO
#define LOG_CONF_LEVEL_FRAMER LOG_LEVEL_DBG
#define LOG_CONF_LEVEL_6TOP LOG_LEVEL_DBG
#define TSCH_LOG_CONF_PER_SLOT 1
#undef TCPIP_CONF_ANNOTATE_TRANSMISSIONS
#define TCPIP_CONF_ANNOTATE_TRANSMISSIONS 0
#endif /* __PROJECT_CONF_H__ */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,40 @@
/*
* Copyright (c) 2017, Toshiba Corporation
* 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 copyright holder 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 COPYRIGHT HOLDERS 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
* COPYRIGHT HOLDER 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 _SF_PLUGTEST_H_
#define _SF_PLUGTEST_H_
#include <sys/process.h>
#include <net/mac/tsch/sixtop/sixtop.h>
extern const sixtop_sf_t sf_plugtest;
#endif /* _SF_PLUGTEST_H_ */

View File

@ -0,0 +1,171 @@
<?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>
<project EXPORT="discard">[APPS_DIR]/radiologger-headless</project>
<simulation>
<title>ETSI Plugtest 2017 with Cooja Mote</title>
<speedlimit>1.0</speedlimit>
<randomseed>123456</randomseed>
<motedelay_us>1000000</motedelay_us>
<radiomedium>
org.contikios.cooja.radiomediums.UDGM
<transmitting_range>50.0</transmitting_range>
<interference_range>100.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.contikimote.ContikiMoteType
<identifier>mtype205</identifier>
<description>RPL/TSCH Node</description>
<source>[CONTIKI_DIR]/examples/6tisch/etsi-plugtest-2017/node.c</source>
<commands>make TARGET=cooja clean
make TARGET=cooja MAKE_WITH_SIXTOP=1 node.cooja</commands>
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
<moteinterface>org.contikios.cooja.interfaces.Battery</moteinterface>
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiVib</moteinterface>
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiMoteID</moteinterface>
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiRS232</moteinterface>
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiBeeper</moteinterface>
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiIPAddress</moteinterface>
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiRadio</moteinterface>
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiButton</moteinterface>
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiPIR</moteinterface>
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiClock</moteinterface>
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiLED</moteinterface>
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiCFS</moteinterface>
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
<symbols>false</symbols>
</motetype>
<mote>
<interface_config>
org.contikios.cooja.interfaces.Position
<x>-1.285769821276336</x>
<y>38.58045647334346</y>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>1</id>
</interface_config>
<interface_config>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>mtype205</motetype_identifier>
</mote>
<mote>
<interface_config>
org.contikios.cooja.interfaces.Position
<x>39.27770695164709</x>
<y>38.31253538173354</y>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>2</id>
</interface_config>
<interface_config>
org.contikios.cooja.contikimote.interfaces.ContikiRS232
<history>6top list~;6top add 2 3~;log 6top 3~;6top add 2~;6top add~;help~;</history>
</interface_config>
<interface_config>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>mtype205</motetype_identifier>
</mote>
</simulation>
<plugin>
org.contikios.cooja.plugins.SimControl
<width>242</width>
<z>0</z>
<height>160</height>
<location_x>11</location_x>
<location_y>241</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.GridVisualizerSkin</skin>
<skin>org.contikios.cooja.plugins.skins.TrafficVisualizerSkin</skin>
<skin>org.contikios.cooja.plugins.skins.UDGMVisualizerSkin</skin>
<viewport>1.7405603810040515 0.0 0.0 1.7405603810040515 89.95980153208089 14.423865844552461</viewport>
</plugin_config>
<width>236</width>
<z>2</z>
<height>230</height>
<location_x>1</location_x>
<location_y>1</location_y>
</plugin>
<plugin>
org.contikios.cooja.plugins.LogListener
<plugin_config>
<filter />
<formatted_time />
<coloring />
</plugin_config>
<width>1031</width>
<z>4</z>
<height>394</height>
<location_x>273</location_x>
<location_y>6</location_y>
</plugin>
<plugin>
org.contikios.cooja.plugins.TimeLine
<plugin_config>
<mote>0</mote>
<mote>1</mote>
<showRadioRXTX />
<showRadioHW />
<showLEDs />
<zoomfactor>16529.88882215865</zoomfactor>
</plugin_config>
<width>1304</width>
<z>5</z>
<height>311</height>
<location_x>0</location_x>
<location_y>412</location_y>
</plugin>
<plugin>
org.contikios.cooja.plugins.RadioLogger
<plugin_config>
<split>150</split>
<formatted_time />
<showdups>false</showdups>
<hidenodests>false</hidenodests>
<analyzers name="6lowpan-pcap" />
</plugin_config>
<width>500</width>
<z>3</z>
<height>300</height>
<location_x>255</location_x>
<location_y>141</location_y>
</plugin>
<plugin>
org.contikios.cooja.plugins.MoteInterfaceViewer
<mote_arg>1</mote_arg>
<plugin_config>
<interface>Serial port</interface>
<scrollpos>0,0</scrollpos>
</plugin_config>
<width>778</width>
<z>1</z>
<height>412</height>
<location_x>288</location_x>
<location_y>98</location_y>
</plugin>
</simconf>

View File

@ -194,8 +194,8 @@ sixp_input(const uint8_t *buf, uint16_t len, const linkaddr_t *src_addr)
LOG_ERR("6P: unexpected error; cannot get our GEN\n");
return;
}
LOG_ERR("6P: received GEN %u, our GEN: %u\n",
pkt.gen, sixp_nbr_get_gen(nbr));
LOG_INFO("6P: received GEN %u, our GEN: %u\n",
pkt.gen, sixp_nbr_get_gen(nbr));
if(pkt.gen == gen) {
invalid_schedule_generation = 0; /* valid combination */
} else {

View File

@ -72,6 +72,9 @@ static shell_output_func *curr_ping_output_func = NULL;
static struct process *curr_ping_process;
static uint8_t curr_ping_ttl;
static uint16_t curr_ping_datalen;
#if TSCH_WITH_SIXTOP
static shell_command_6top_sub_cmd_t sixtop_sub_cmd = NULL;
#endif /* TSCH_WITH_SIXTOP */
/*---------------------------------------------------------------------------*/
static const char *
@ -608,6 +611,34 @@ PT_THREAD(cmd_tsch_schedule(struct pt *pt, shell_output_func output, char *args)
PT_END(pt);
}
/*---------------------------------------------------------------------------*/
#if TSCH_WITH_SIXTOP
void
shell_commands_set_6top_sub_cmd(shell_command_6top_sub_cmd_t sub_cmd)
{
sixtop_sub_cmd = sub_cmd;
}
/*---------------------------------------------------------------------------*/
static
PT_THREAD(cmd_6top(struct pt *pt, shell_output_func output, char *args))
{
char *next_args;
PT_BEGIN(pt);
SHELL_ARGS_INIT(args, next_args);
if(sixtop_sub_cmd == NULL) {
SHELL_OUTPUT(output, "6top command is unavailable:\n");
} else {
SHELL_OUTPUT(output, "6top: ");
sixtop_sub_cmd(output, args);
}
SHELL_ARGS_NEXT(args, next_args);
PT_END(pt);
}
#endif /* TSCH_WITH_SIXTOP */
/*---------------------------------------------------------------------------*/
void
shell_commands_init(void)
{
@ -630,6 +661,9 @@ struct shell_command_t shell_commands[] = {
{ "tsch-schedule", cmd_tsch_schedule, "'> tsch-schedule': Shows the current TSCH schedule" },
{ "tsch-status", cmd_tsch_status, "'> tsch-status': Shows a summary of the current TSCH state" },
{ "reboot", cmd_reboot, "'> reboot': Reboot the board by watchdog_reboot()" },
#if TSCH_WITH_SIXTOP
{ "6top", cmd_6top, "'> 6top help': Shows 6top command usage" },
#endif /* TSCH_WITH_SIXTOP */
{ NULL, NULL, NULL },
};

View File

@ -61,6 +61,13 @@ extern struct shell_command_t shell_commands[];
*/
void shell_commands_init(void);
#include "net/mac/tsch/tsch.h"
#if TSCH_WITH_SIXTOP
typedef void (*shell_command_6top_sub_cmd_t)(shell_output_func output,
char *args);
void shell_commands_set_6top_sub_cmd(shell_command_6top_sub_cmd_t sub_cmd);
#endif /* TSCH_WITH_SIXTOP */
#endif /* _SHELL_COMMANDS_H_ */
/** @} */

View File

@ -104,7 +104,7 @@ log_6addr(const uip_ipaddr_t *ipaddr)
}
LOG_OUTPUT("%x", a);
}
}
}
}
}
/*---------------------------------------------------------------------------*/
@ -171,6 +171,9 @@ int
log_get_level(const char *module)
{
int i = 0;
if(module == NULL) {
return -1;
}
while(all_modules[i].name != NULL) {
if(!strcmp(module, all_modules[i].name)) {
return *all_modules[i].curr_log_level;

View File

@ -44,6 +44,8 @@ ipv6/rpl-tsch/zoul \
ipv6/rpl-tsch/zoul:MAKE_WITH_ORCHESTRA=1 \
ipv6/rpl-tsch/zoul:MAKE_WITH_SECURITY=1 \
logging/zoul \
6tisch/etsi-plugtest-2017/zoul:BOARD=remote \
6tisch/etsi-plugtest-2017/srf06-cc26xx:BOARD=launchpad/cc2650
TOOLS=

View File

@ -19,7 +19,8 @@ sensniff/jn516x \
ipv6/rpl-tsch/jn516x \
ipv6/rpl-tsch/jn516x:MAKE_WITH_ORCHESTRA=1 \
ipv6/rpl-tsch/jn516x:MAKE_WITH_SECURITY=1 \
logging/jn516x
logging/jn516x \
6tisch/etsi-plugtest-2017/jn516x
TOOLS=