Indigresso Wiki

Open Source Stuff for DASH7

User Tools

Site Tools


opentag:apps:demo_opmode

Opmode Demo

The OpenTag Opmode Demo is one of the built-in applications of the mainline distribution. It's purpose is nominally to show how DASH7 Gateway/Subcontroller and Endpoint modes differ, although it is also used as an example for many other development techniques available to OpenTag. As such, Opmode Demo is one of the more sophisticated demo apps available in the mainline distribution.

  • Demonstrates how to use buttons (HW) for:
    • Engaging a change between Gateway & Endpoint modes
    • Engaging query and beacon packet transmissions
  • Demonstrates how to use OTAPI in C to do the same things above
  • Demonstrates how to create your own ALP that wraps OTAPI functions (see also API Quickstart Guide)
  • Offers some information on how to merge the OpenTag stack runtime with an parallel, user process.

Specifics

File Location
Opmode Demo files can be found in: OT_ROOT/Apps/Demo_Opmode

Board Support
Opmode Demo should support all of the Boards available in the mainline distribution that have the necessary resources. If a board with adequate resources is not supported, it is because the board is new. It will be supported as soon as possible.

Resource Recommendations
The Opmode Demo works best when it has:

  • Enough Flash and SRAM for an ALP-enabled build. This is typically about 2KB SRAM and 20-40KB Flash. Flash requirement depends a lot on the Platform. On MSP430-based devices, it's on the low side. On high end Cortex-M3-based devices with integrated USB, large Flash sectors, and when using non-optimized compiler settings for debugging, it seems to be around 36KB.
  • A serial or USB-CDC port to use for Mpipe.
  • Preferably three (3) indicators, such as LEDs, or more.
  • Preferably four (4) physical input sources, such as buttons, although the ALP Messaging API can be used alternatively

Basic Usage

The basic usage of the Opmode Demo is to use the buttons (or ALP commands over Mpipe) to change device modes, send queries, send beacons, and observe the process behavior via the LEDs. If you attach the Board to a client console such as OTcom, you can also read status messages and send some ALP commands.

The LEDs

  • Green LED is on during transmissions
  • Orange/Yellow LED is on during reception or listening
  • Third LED (often red) is for user application processes

The blinking pattern of the LEDs will, in most configurations, change when opmode is set to Gateway versus Endpoint. Also, you may notice some very quick alterations to the pattern when a query or beacon command is initiated.

The Buttons

Advanced Usage

opentag/apps/demo_opmode.txt · Last modified: 2012/04/26 01:03 by jpnorair