The Things Network utilities for protobuf
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example use ttn-proto-generator Mar 26, 2017
.gitignore use ttn-proto-generator Mar 26, 2017
.travis.yml switch docker image Apr 11, 2017
Brewfile initial import Mar 23, 2017
README.md switch docker image Apr 11, 2017
example.sh switch docker image Apr 11, 2017
gen-c.sh switch docker image Apr 11, 2017
package.json chalk Mar 26, 2017
yarn.lock chalk Mar 26, 2017

README.md

TTN Utilities for protobuf

Build Status

Toolbox for using protobuf-defined messages with The Things Network. This repository contains examples about how to use a message defined in the protobuf format with an arduino sketch via nanopb. It leverages a docker file that comes with all necessary tools installed and the ttn-proto-generator that can take a proto file and generate a Converter, Decoder, Encoder and Validator for The Things Network Console via protobuf.js.

How? What?

Install Docker - on Mac you can just run brew bundle in the root of a checkout of this project and then run

./example.sh

to end up with a buildable Arduino project with a sample usage of example/proto/test.proto in example/arduino and the TTN console functions in example/ttn-console.

Generate Arduino-compatible definition files

Run:

./gen-c.sh \
    `pwd`/path/to/your.proto \
    `pwd`/path/to/your/arduino/project

The headers, etc. will be generated in /path/to/your/arduino/project. Please note the absolute paths

Generate TTN console functions

Run:

yarn global ttn-proto-generator
ttn-proto-generator \
  -p example/proto/test.proto \
  -m com.example.MyMessage \
  -o example/ttn-console

to generate the TTN functions in example/ttn-console.

Head over to https://github.com/thesolarnomad/ttn-proto-generator for details.