Skip to content

Instantly share code, notes, and snippets.

@msabwat
Last active March 17, 2019 21:20
Show Gist options
  • Save msabwat/e5306394b3b7f0383b77757479cd07fc to your computer and use it in GitHub Desktop.
Save msabwat/e5306394b3b7f0383b77757479cd07fc to your computer and use it in GitHub Desktop.
Dragon library overview

Overview

Dragon is a library that contains helper functions to create device firmware and monitor it with an Android App.

diagram

Components

  • Dragon binary:

Output configuration file with an MQTT connection and a standard topic.

Parse the config file to generate Pub-Sub model

  • Serial protocols wrappers: (I²C/ GPIO...)

Safely use write/read functions for serial communication, using the configuration file

  • Android app:

Simple app that displays the configuration files (bonus : saves them into a database)

Make

Running make will compile the device firmware (with the right aarch64 target) and:

  • create a config file.
  • create apk with new config file appended. (with a push to gitlab ci + App store private).
  • create the main binary that exposes all the topics.

Android App

Features:

  • Read configuration file from res/ folder
  • connect to mqtt broker
  • Pub-Sub to topics from the config file
  • Handle multiple devices

Config File

File that contains a description of the device. It should be generated by the created program using the dragon library.

Use Case : DOMO RGB Sensor board

Use Dragon to write a firmware instance and monitor it with Android.

  1. PCB Assembly and circuit test.
  2. Setup the board with device tree overlays.
  3. Create the firmware using helper libraries and the configuration using the Dragon library.

(+). Add the Dragon library, and tools to an AOSP image. (Buildroot)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment