Merge branch 'release-4.1' into contrib/slip-uip-llh-len

This commit is contained in:
Joakim Eriksson 2018-04-30 17:53:40 +02:00 committed by GitHub
commit 183ae55bb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 101 additions and 41 deletions

View File

@ -46,10 +46,21 @@ AUTOSTART_PROCESSES(&hello_world_process);
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
PROCESS_THREAD(hello_world_process, ev, data) PROCESS_THREAD(hello_world_process, ev, data)
{ {
static struct etimer timer;
PROCESS_BEGIN(); PROCESS_BEGIN();
printf("Hello, world\n"); /* Setup a periodic timer that expires after 10 seconds. */
etimer_set(&timer, CLOCK_SECOND * 10);
while(1) {
printf("Hello, world\n");
/* Wait for the periodic timer to expire and then restart the timer. */
PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&timer));
etimer_reset(&timer);
}
PROCESS_END(); PROCESS_END();
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/

View File

@ -54,7 +54,12 @@
#define UIP_MCAST6_ROUTE_CONF_ROUTES 1 #define UIP_MCAST6_ROUTE_CONF_ROUTES 1
/* Code/RAM footprint savings so that things will fit on our device */ /* Code/RAM footprint savings so that things will fit on our device */
#ifndef NETSTACK_MAX_ROUTE_ENTRIES
#define NETSTACK_MAX_ROUTE_ENTRIES 10 #define NETSTACK_MAX_ROUTE_ENTRIES 10
#endif
#ifndef NBR_TABLE_CONF_MAX_NEIGHBORS
#define NBR_TABLE_CONF_MAX_NEIGHBORS 10 #define NBR_TABLE_CONF_MAX_NEIGHBORS 10
#endif
#endif /* PROJECT_CONF_H_ */ #endif /* PROJECT_CONF_H_ */

View File

@ -0,0 +1,34 @@
/*
* Copyright (c) 2018, University of Bristol - http://www.bristol.ac.uk/
* 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 HOLDER 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.
*/
/*---------------------------------------------------------------------------*/
/* Code/RAM footprint savings so that things will fit on sensortags */
#define NETSTACK_MAX_ROUTE_ENTRIES 4
#define NBR_TABLE_CONF_MAX_NEIGHBORS 4
#define QUEUEBUF_CONF_NUM 4

View File

@ -54,33 +54,38 @@ tab, as per the image below.
CoAP Server CoAP Server
----------- -----------
For this functionality to work, you will need to install the For this functionality to work, you will need to install a CoAP client.
[Copper (Cu)](https://addons.mozilla.org/en-US/firefox/addon/copper-270430/) You can achieve this by following the guides on how to set up your system
addon to your browser. [in the wiki](https://github.com/contiki-ng/contiki-ng/wiki#setting-up-contiki-ng).
From the sensors tab in the 6lbr web page, click the 'coap' link in the line You should start by sending a CoAP GET request for the `.well-known/core`
corresponding to your CC26xx device. Once the addon fires up, select resource. If you are using libcoap's CoAP client, this can be achieved by:
".well-known/core" in the left pane and then hit the 'Get' button at the top.
![CoAP Resources](img/coap-resources.png) ```
coap-client -m get coap://[<device IPv6 address here>]/.well-known/core
```
Adjust the above command to match the command line arguments of your CoAP
client.
The Device will respond with a list of all available CoAP resources. This list The Device will respond with a list of all available CoAP resources. This list
will be different between the Srf and the SensorTag. The screenshot below shows will be different between the various CC13x0/CC26x0 boards.
a (partial) list of resources exported by the SensorTag CoAP server. Select
a resource on the left pane and hit 'Get' to retrieve its value. Select
`lt/g` and hit 'Post' to toggle the green LED, `lt/r` for the red one.
You can also use CoAP to enable/disable BLE advertisements! Select Send a CoAP GET request for any of those resrouces to retrieve its value.
`dev/ble_advd` and then hit the "Outgoing" button in the payload panel. Type in
the desired payload, which can be: Send a CoAP POST to the `lt/g` or `lt/r` to toggle the green/red LED
respectively.
You can also use CoAP to enable/disable BLE advertisements! This can be done
by sending a PUT or POST request to the `dev/ble_advd` resource. Your request
should contain the desired payload, which can be:
* `mode=on|off` * `mode=on|off`
* `name=<name>` * `name=<name>`
* `interval=<secs>` * `interval=<secs>`
or a combination of both delimited with an amp. For example, you can set as or a combination of the above delimited with an amp. For example, you can set
payload `mode=on&name=My CC26xx Device 4&interval=5`. Once you have set the as payload `mode=on&name=My CC26xx Device 4&interval=5`.
payload, hit either the POST or PUT button.
Bear in mind that you must set `name` at least once before enabling BLE Bear in mind that you must set `name` at least once before enabling BLE
advertisements. If you fail to do so, the RF will refuse to enter BLE mode and advertisements. If you fail to do so, the RF will refuse to enter BLE mode and

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 KiB

View File

@ -33,6 +33,8 @@
/** /**
* \addtogroup tsch * \addtogroup tsch
* @{ * @{
* \file
* TSCH adaptive time synchronization
*/ */
#ifndef __TSCH_ADAPTIVE_TIMESYNC_H__ #ifndef __TSCH_ADAPTIVE_TIMESYNC_H__

View File

@ -31,16 +31,12 @@
*/ */
/** /**
* \addtogroup tsch
* @{
* \file * \file
* TSCH 5-Byte Absolute Slot Number (ASN) management * TSCH 5-Byte Absolute Slot Number (ASN) management
* \author * \author
* Simon Duquennoy <simonduq@sics.se> * Simon Duquennoy <simonduq@sics.se>
*
*/
/**
* \addtogroup tsch
* @{
*/ */
#ifndef __TSCH_ASN_H__ #ifndef __TSCH_ASN_H__

View File

@ -31,17 +31,14 @@
*/ */
/** /**
* \addtogroup tsch
* @{
* \file * \file
* TSCH configuration * TSCH configuration
* \author * \author
* Simon Duquennoy <simonduq@sics.se> * Simon Duquennoy <simonduq@sics.se>
*/ */
/**
* \addtogroup tsch
* @{
*/
#ifndef __TSCH_CONF_H__ #ifndef __TSCH_CONF_H__
#define __TSCH_CONF_H__ #define __TSCH_CONF_H__

View File

@ -31,17 +31,14 @@
*/ */
/** /**
* \addtogroup tsch
* @{
* \file * \file
* TSCH configuration * TSCH constants
* \author * \author
* Simon Duquennoy <simonduq@sics.se> * Simon Duquennoy <simonduq@sics.se>
*/ */
/**
* \addtogroup tsch
* @{
*/
#ifndef __TSCH_CONST_H__ #ifndef __TSCH_CONST_H__
#define __TSCH_CONST_H__ #define __TSCH_CONST_H__

View File

@ -33,6 +33,8 @@
/** /**
* \addtogroup tsch * \addtogroup tsch
* @{ * @{
* \file
* TSCH per-slot logging
*/ */
#ifndef __TSCH_LOG_H__ #ifndef __TSCH_LOG_H__

View File

@ -33,6 +33,8 @@
/** /**
* \addtogroup tsch * \addtogroup tsch
* @{ * @{
* \file
* TSCH packet parsing and creation. EBs and EACKs.
*/ */
#ifndef __TSCH_PACKET_H__ #ifndef __TSCH_PACKET_H__

View File

@ -33,6 +33,8 @@
/** /**
* \addtogroup tsch * \addtogroup tsch
* @{ * @{
* \file
* TSCH queues
*/ */
#ifndef __TSCH_QUEUE_H__ #ifndef __TSCH_QUEUE_H__

View File

@ -31,6 +31,8 @@
/** /**
* \addtogroup tsch * \addtogroup tsch
* @{ * @{
* \file
* TSCH-RPL interaction
*/ */
#ifndef __TSCH_RPL_H__ #ifndef __TSCH_RPL_H__

View File

@ -33,6 +33,8 @@
/** /**
* \addtogroup tsch * \addtogroup tsch
* @{ * @{
* \file
* TSCH scheduling engine
*/ */
#ifndef __TSCH_SCHEDULE_H__ #ifndef __TSCH_SCHEDULE_H__

View File

@ -33,6 +33,8 @@
/** /**
* \addtogroup tsch * \addtogroup tsch
* @{ * @{
* \file
* TSCH security
*/ */
#ifndef __TSCH_SECURITY_H__ #ifndef __TSCH_SECURITY_H__

View File

@ -33,6 +33,8 @@
/** /**
* \addtogroup tsch * \addtogroup tsch
* @{ * @{
* \file
* TSCH runtime operation within timeslots
*/ */
#ifndef __TSCH_SLOT_OPERATION_H__ #ifndef __TSCH_SLOT_OPERATION_H__

View File

@ -31,17 +31,14 @@
*/ */
/** /**
* \addtogroup tsch
* @{
* \file * \file
* TSCH types * TSCH types
* \author * \author
* Simon Duquennoy <simonduq@sics.se> * Simon Duquennoy <simonduq@sics.se>
*/ */
/**
* \addtogroup tsch
* @{
*/
#ifndef __TSCH_TYPES_H__ #ifndef __TSCH_TYPES_H__
#define __TSCH_TYPES_H__ #define __TSCH_TYPES_H__

View File

@ -37,6 +37,8 @@ The IEEE 802.15.4-2015 TimeSlotted Channel Hopping (TSCH) protocol. Provides
scheduled communication on top of a globally-synchronized network. Performs scheduled communication on top of a globally-synchronized network. Performs
frequency hopping for enhanced reliability. frequency hopping for enhanced reliability.
* @{ * @{
* \file
* Main API declarations for TSCH.
*/ */
#ifndef __TSCH_H__ #ifndef __TSCH_H__