Skip to content
kkrentz edited this page May 27, 2024 · 67 revisions

Coordinated Sampled Listening (CSL)

CSL is a standardized MAC protocol for IEEE 802.15.4 networks. Its rationale is to send a stream of wake-up frames prior to an actual payload frame. Each wake-up frame essentially contains the time when the transmission of the payload frame will begin. This hint enables the receiver of a wake-up frame to sleep until the transmission of the payload frame is about to begin.

Configuration

There are two main ways to use this CSL implementation. First, it is possible to adhere to the IEEE 802.15.4 standard. However, due to security vulnerabilities (even when enabling IEEE 802.15.4 security), this configuration is only meant for testing and research purposes. Second, it is possible to enable additional security measures.

IEEE 802.15.4-Compliant CSL

For the standards-compliant configuration, add the following line to your project-conf.h

/* auto-configures the MAC layer */
#include "net/mac/csl/csl-autoconf.inc"

Finally, in your Makefile, insert:

MAKE_MAC = MAKE_MAC_CSL

Hasso Plattner Institute MAC (HPI-MAC)

For the secure configuration, aka HPI-MAC, add the following two lines to your project-conf.h:

#define CSL_CONF_COMPLIANT 0
#include "net/mac/csl/csl-autoconf.inc"

and the following lines to your Makefile:

MAKE_MAC = MAKE_MAC_CSL
MODULES += os/services/akes

For better reliability (at the cost of higher latencies), enable ML-based channel hopping:

#define CSL_CHANNEL_SELECTOR_CONF_WITH_D_UCB 1

By default, blind channel hopping is used.

Troubleshooting

Two parameters might need to be adapted to your radio environment:

/* If the CCA threshold is too low, IEEE 802.15.4 nodes may end up sending never. */
#define CSL_CONF_CCA_THRESHOLD (-70) /* dBm */
/* The output power controls the communication range. */
#define CSL_CONF_OUTPUT_POWER (0) /* dBm */

Features

HPI-MAC features:

  • Low base energy consumption, e.g., 0.5% duty cycle when waking up eight times per second
  • Low energy consumption at the sender side by learning the wake-up times of neighboring nodes, as well as the clock drifts compared to neighboring nodes
  • Burst forwarding for better throughput
  • ML-based channel hopping and acknowledged broadcast frames for higher reliability
  • High MAC layer security
    • Authentication and encryption of frames via pairwise session keys
    • Strong freshness, i.e., even delayed frames are recognized as replayed
    • Denial-of-sleep-resilient medium access control
    • Denial-of-sleep-resilient pairwise session key establishment

Code structure

Supported Platforms

  • CC2538-based platforms
  • Cooja motes

TODOs

  • Currently, this CSL implementation is limited to macCslInterval=0. This is to obviate data request frames and to minimize the duration of periodic wake ups. However, some platforms do not support macCslInterval=0. Support for macCslInterval!=0 is hence desirable. For securing data request frames, we may echo truncated OTP bits
  • Autoconfigure CCA threshold
  • Autoconfigure output power
  • Disable or accelerate wake ups on mains-powered devices, such as border routers

Further Reading