Add New Page: You are not allowed to add pages Select section/namespace. New page title.
 

This page and sub pages outline the architecture of the Commotion Wireless project.

Pre-1.0 Architecture Notes

Software Components

Conceptual/Topical Components

Commotion 1.0 Architecture

Overview

* How is Commotion Built? * What does Commotion provide that is not in OpenWRT?

Commotion is providing a collection of scripts and default settings to allow OpenWRT to be built as a Commotion node. Using the OpenWRT feeds build system, Commotion brings in custom repos to bring in customizations to into the OpenWRT build process. Commotion customizations include commotiond, olsrd, servald, a GUI setup wizard, and a service manager.

Resources for more information

Commotion Setup Wizard

Commotion Setup Wizard consists of a lua script that defines a set of UCI bindings which in combination with luci's standard model/view/controller and templates to create specific pages. Actions on these pages (such as Save and Apply) call scripts that set configuration values using UCI calls. The setup wizard also uses a dispatcher script to save values in memory across multiple pages, and then saves and applies them at the end, taking the user to the standard OpenWRT confirmation page to review, confirm and apply those stages changes.

After setup wizard is completed, it sets a configuration value for itself to 0, effectively turning off the setup wizard.

Setup wizard starts by creating two default profiles, one for AP and one for ethernet. When you create a mesh interface, setup wizard uses commotiond to create a mesh profile.

Commotiond

Commotiond is the system management daemon for the Commotion Wireless Project. It is an implementation of libcommotion, which is a high level library that contains a C API with all of the tools necessary to create a variety of mesh networks and mesh networking applications, without needing to deal with all of the specifics of configuring each and every type of addressing scheme and mesh networking daemon available. Bindings for other languages like Java or Python are in development.

Commotiond is a superserver daemon that creates and manages parent processes for a variety of mesh-networking related daemons and services based on a common configuration store. It (will) support a variety of types of plugins and extensions, including:

  • operating-system specific extensions for interfacing with the wireless subsystem
  • schemas for mesh network detection
  • APIs for different kinds of messaging infrastructures (dbus, ubus, JNI)
  • drivers for different kinds of mesh networking daemons (olsrd, babeld, servald)

Commotiond maintins its own configuration store for configuration data that can be used by any platform it runs on (currently Commotion Router, and soon Commotion Linux). This allows us to use the same configuration store across multiple platforms. Commotiond presents the configuration store as an API, providing an event library, configuration loader and profile manager. Commotiond's configuration store is saved in memory. The store size is defined by the number of items and the size of the values is defined by the schema. When commotiond is asked to save a profile through the API, it saves those values via uci for non-mesh interfaces.

Profiles are stored in /etc/commotion/profiles.d in simple key:value JSON format. The API that commotiond presents allows a C application to run against it and send it commands, such as new profile, update profile, interface up.

As an example, when setup wizard creates a profile, it calls commotiond with commands to create the new profile.

  • How are Commotion's automatic IP addressing and BSSID generation accomplished?
  • How does Commotion manage network interface configuration?

Commotion defines a handler for protocol: commotion, defined in /lib/netifd/proto/commotion.sh This script defines some functions for netifd to call when it is starting up an interface. Thus we can define interface configurations in /etc/config/wireless and /etc/config/network using option proto commotion, indicating to netifd that it should set the interface values using the appropriate profile. Ad-hoc interface values are set using /lib/wifi/mac80211.sh. Currently Commotion patches this script during startup, allowing a mesh interface to be configured using our profiles.

Commotiond's plugin architechture supports additional functionality to be built into the daemon. For example, we have developed a commotiond plugin for the Serval crypto API to enable signing and verification of all olsrd routing control messages.

Olsrd

Olsrd is the mesh routing protocol that Commotion currently uses. It is configured using hotplug scripts that are called when the interface comes up. Hotplug scripts check to see if the interface is a commotion interface and sets values in the olsrd.conf file, providing values consisten with how the interface's status/behavior as defined in commotion profiles.

Servald

The Serval Project's Serval Daemon, incorporating Distributed Numbering Architecture (DNA), Rhizome, MDP, VoMP.

Commotion uses the Serval crypto API to do route signing to verify that a packet has been modified in transit from node to node. OLSRD sends routing control packets which on Commotion nodes are signed using the Serval crypto API. On the receiving node, the API is used to verify all routing control messages. All mesh nodes use a shared mesh keychain, which is a serval keychain file. That shared mesh keychain is used to accomplish signing and verification of olsrd routing control messages.

Each node also has an autogenerated keychain file that is used to sign applications it advertises.

additional future features mentioned in the audio..

Commotion Service Manager

The Commotion Service Manager receives, parses, verifies, and caches service announcements on a local Commotion mesh network. It implements an multicast DNS (mDNS) stack using the Avahi library, and uses the Serval-crypto API for verifying signed service announcements.

Internationalization

commotion_architecture/core_components/commotion_architecture.txt · Last modified: 2014/01/15 21:56 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported