Skip to content

thesolarnomad/ttn-proto-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

The Things Network utilities for protobuf

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published