OpenTag is a DASH7 Mode 2 software stack, written in C, that is designed with the intent of running on microcontrollers (or radio SoC's). Therefore, OpenTag must be a very tight, compact package, but with proper configuration it can also run in any POSIX environment. It is also worth noting that OpenTag can provide all functionality required for any type of DASH7 Mode 2 device, not just a “tag.”
Current and future versions of OpenTag are open sourced under the OpenTag License, which is an outgrowth of the BSD License we designed for standards-based embedded projects (such as OpenTag). OpenTag code & app distributions are available from various places on the internet, and the Archive Page hopes to track all of them.
Doxygen Main Article
OpenTag uses Doxygen syntax so that automated, Doxygen documentation can be generated.
API Main Article
If you are a systems developer interested in treating OpenTag like a black-box and going straight to the API, you can skip most of the other documentation and focus on the APIs. You may also want to look at available platforms, boards, and the system architecture section below. There is also an API quickstart guide that is especially helpful for new users starting to work in a client-server system.
System Architecture Main Article
OpenTag is defined as a client-server model with a distributed dataset. A device that runs OpenTag (typically a microcontroller) is a server, and servers communicate with other servers via DASH7. Servers communicate with clients via one of the OpenTag API's or ALP's. Clients are typically POSIX devices like PC's, smartphones, higher-function embedded devices, etc. A device that contains a server and a connection to a client is known as a “Gateway.” Devices that contain only a server are known as “Subcontrollers” or “Endpoints,” depending on configuration and featureset.
OpenTag is organized as a root directory (known as OTroot or OT root) and a group of subdirectories. Each main subdirectory should contain code (or further subdirectories) related to specific purposes. As well, these subdirectories provide a good organization method for making chapters in the OT users' guide (which is integrated into the wiki).
| Subdirectory | Contents | Internal Options |
|---|---|---|
| Apps | Applications and demos (project folders) | Opmode Demo, Ping Pong Demo, Query Demo, … |
| Board | Configuration headers for supported boards | CC430 boards (AG430, EM430RF), STM32 boards (MLX73 Proto), etc |
| OTkernel | Real-time kernels supported by OpenTag | Native Kernel (“bare metal”), or other RTOS frameworks |
| OTlib | Platform-independent library code | No options (flat code) |
| OTlibext | Platform-independent library extensions (e.g. app protocols) | OpenTag CoAP impl, other standardized protocol extensions |
| OTplatform | Microcontroller platform support code & drivers | CC430, MSP430, POSIX-x86, STM32, etc |
| OTradio | Radio device support code & drivers | CC430, MLX73xxx, SX1212, SX1231, etc |
OpenTag comes with a set of applications that developers can compile with OpenTag (one at a time) for demonstration, evaluation, or even potentially productization. Each one of these applications is stored in a subdirectory of the /Apps directory (each application may have sub-applications or variants). If you are an application developer looking to spin-out a quick demo, this is a good place to look first.
OpenTag is entended mainly for embedded targets, and it supports many “boards” (i.e. circuit boards containing at least a processing element, memory, and a radio). Boards are organized by platform (typically microcontroller families). Each Board platform may be supported by many different board configuration files.
OpenTag has a real-time kernel that dispatches tasks when events demand them. The kernel may be the “Native” kernel, which is purpose-built and runs on the “bare-metal” of an MCU, or it may be layered on-top (or along-side) a more general-purpose RTOS. One example JP likes is ChibiOS. In either case, timing is sensitive because the cost of sloppy timing is sloppy time-slotting, and therefore greater radio on-time. Radio on-time is typically the biggest energy requirement.
Most of the DASH7 code itself is implemented in OTlib, a fully platform-independent C library that OpenTag relies on heavily. Also, the API's are implemented in OTlib.
Any extensions to OTlib are stored here. Some examples are security support, advanced routing algorithms, sensor support, or application layer protocols. In all these cases, the library extensions should be backed by some kind of standard that is recognized by the DASH7 Alliance. Proprietary extensions should stay in the app code.
OpenTag defines a standard platform header in OTlib/OT_platform.h and a standard low-level filesystem header in OTlib/veelite_core.h, but different devices will implement them differently. The implementation of the platform and drivers are stored in OTplatform/. Each platform (i.e. MCU family) has its own folder inside OTplatform/.
OpenTag defines a standard radio header in OTlib/radio.h which is bound to be implemented differently by different radios. Therefore, each supported radio device gets a folder inside OTradio/ where the drivers and support files are stored.
If you define you board configuration file correctly, define your application configuration files correctly, and you setup your project (e.g. makefile) to compile the appropriate source code, everything will build and run. There is always going to be some manual effort, because automated configuration tools just don't work well with the huge variety of platforms and radios that OpenTag can support.
OpenTag is an open source project, so contributions to the source will inevitably be made by the community. There are two types of OpenTag codebases:
Official codebases will be hosted in the main source distribution (sourceforge). Unofficial codebases may be interoperable with official codebases, and they may be made available to the community, just not on sourceforge alongside the official codebases. In order for a codebase to be made official, JP needs to review it and “bless” it as official. JP will bless codebases that meet the Official OpenTag Coding Guidelines, summarized below:
OpenTag (per DASH7 Mode 2) is a monolithic system that encompasses OSI-layers 1-6 and part of 7 as well (the application layer). Because OpenTag is small, targeted at microcontrollers, and open source, there is no practical deficiency in keeping things monolithic: there is no sense in implementing different layers of an embedded WSN technology on anything but an RF transceiver and an MCU (or an RF SoC). In fact, this design strategy enables OpenTag to be much more optimized than are other, typical solutions for active RFID and WSN.