A TTNMapper based on the ATTNode v3
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
seiichiro b18dde5aec Add ttn-lw-cli command to add new mapper 1 month ago
.vscode Initial Prototype Firmware 5 months ago
case Add Current Case STLs 3 months ago
include Initial Prototype Firmware 5 months ago
lib Fix SatsInView 4 months ago
src Fill Display Lines to Avoid Artifacts 4 months ago
.gitignore Initial Prototype Firmware 5 months ago
README.md Add ttn-lw-cli command to add new mapper 1 month ago
platformio.ini Initial Prototype Firmware 5 months ago

README.md

ATTMapper (WIP)

A TTN Mapper based on the ATTNode v3.

Everything in this repository is work in progress, use at your own risk!

Hardware

  • Attnode v3 with PCB-Edge SMA Antenna Mount
  • Powerpack, LiPo Cell (500mA), LiPo Charger Board (You can use any 3,3V Power Source)
  • NEO M8N GPS Breakout (Any 3.3V-Capable Module which is NMEA-Compatible should work)
  • SSD1306 128x64 OLED-Display
  • Button

Connections

Connect the AttNode and Modules as follows:

GPS

ATTNode Module
Vin VCC
GND GND
Tx RX
Rx TX

OLED

ATTNode Module
Vin VCC
GND GND
SDA SDA
SCL SCL

Button

The Button has to be Connected between PC2 and GND on the ATTNode

Software

This repository contains the PlatformIO project with the mapper firmware. Copy config.example.h to config.h and insert your keys and DeviceID from TTN. Compile and upload as normal (See AttNode v3 dokumentation for details).

Usage

If a Button is connected you can use the following functions:

  • Short press: Schedule an imideate send, regardless of interval | In Setup Mode - cycle through Settings or Change Activated Setting
  • Long Press (>1s): Enter Setup Mode, Activate a Setting in Setup Mode

In Setup Mode a '>' in front of a Line identifies the selected option, a '>>' identifies an activated setting (can be changed by short press). Use long press to deactivate an activated setting

Add Mapper to TheThingsStack Community Edition

As there are some shortcomings with adding ABP devices as this mapper to TTN (mainly creating unnecessary downlinks and handling of framecounter resets) currently the best way to add the mapper to an application is to use the ttn-lw-cli commandline utility. First you will have to create an application with the ttnmapper-integration as described here, if you don't already have one. Then cou can use the following command to add a mapper device to the application:

ttn-lw-cli dev add <application-id> <device-id> \
--frequency-plan-id EU_863_870_TTN \
--lorawan-version 1.0 \
--lorawan-phy-version 1.0 \
--abp \
--session.dev-addr <dev-addr> \
--session.keys.app-s-key.key <app-s-key> \
--session.keys.f_nwk_s_int_key.key <network-s-key> \
--mac-settings.factory-preset-frequencies 867100000,867300000,867500000,867700000,867900000,868100000,868300000,868500000 \
--mac-settings.rx1-delay 5 \
--mac-settings.rx1-data-rate-offset 0 \
--mac-settings.rx2-data-rate-index 3 \
--mac-settings.rx2-frequency 869525000 \
--mac-settings.status-count-periodicity 0 \
--mac-settings.status-time-periodicity 0 \
--mac-settings.resets-f-cnt=true

Replace all the values in <..> with the appropriate values. The DevAddr and App-/Network-Keys might have to be generated in the web-console first, at least I haven't found a way to generate these with the CLI tool so far.

License

Unless stated otherwise, everything in this repository is under the BSD 3-Clause License as follows:

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.