Skip to content

Commit 2b4db2b

Browse files
committed
documentation update
1 parent 15b213d commit 2b4db2b

3 files changed

Lines changed: 72 additions & 24 deletions

File tree

README.md

Lines changed: 65 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<!-- ## TTGO T-Beam Tracker for The Things Network and/or The Helium Network -->
2-
# LILYGO T-Beam Mapper for the Helium or TTN LoRaWAN Network.
3-
2+
# LILYGO T-Beam Mapper for the Helium or TTN LoRaWAN Network
43

54
This code loads onto LilyGo TTGO T-Beam v1.2 board with AXP2101 and SX1262 or SX1276 to make a LoraWan (Helium/TTN) Network Mapper. To build one: download this build, configure some files, and upload it to your device. Go travel the world to contribute to the TTN/Helium Network Coverage Maps!
65

@@ -16,21 +15,57 @@ Details for the Mapper project can be found [TTN Mapper](https://ttnmapper.org/)
1615

1716
The Mapper is intended to be highly active while the vehicle is in motion, and quieter when the vehicle is stationary. By default, it is not miserly with Data Credits. If you want to conserve Data Credits or battery power, tune the configuration to send packets less frequently.
1817

19-
### But do I get PAID for Mapping?
18+
## Supported Hardware
2019

21-
No, you do not. I put this here because it seems to be the #1 FAQ. You do not earn HNT or Data Credits by mapping. Mapping costs you very little -- One Penny (USD $0.01) for every thousand mapping packets. It helps the Helium network by providing a coverage map, and it helps you by providing clarity on your own local Helium environment. It's all volunteer.
20+
I tested this software on LilyGo [TTGO T-Beam v1.2](https://www.lilygo.cc/products/t-beam-softrf?variant=43170155692213) devices, all on **EU868**. Others have enjoyed success on other worldwide bands, with the matching device. These are commonly available as "Meshtastic" devices from AliExpress, Amazon, Banggood, eBay, etc, usually as a kit with an unsoldered OLED screen and SMA antenna for around USD $30.00.
2221

23-
### But do I get to flag and delist spoofing gamer Hotspots?!
22+
## Quick Setup
2423

25-
No, you do not. It's the #2 FAQ. The Mapper data and coverage maps are not involved in any POC challenges or used for gaming denylists.
24+
Settings for the console and in `credentials.h`
2625

27-
## Supported Hardware
26+
### The Things Network TTN
27+
28+
Console:
29+
30+
- Frequency plan: Europe 863-870 MHz (SF9 for RX2 - recommended)
31+
- LoRaWAN version: LoRaWAN Specification 1.1.0
32+
- Regional Parameters version: RP001 Regional Parameters 1.1 revision A
33+
- Payload formatters: Uplink: JavaScript functions and paste: /console-decoders/unified_decoder.js
34+
- End devices: General settings: Join settings: Resets join nonces: Enabled
35+
36+
credentials.h:
37+
38+
- uncomment #define USE_NWK_KEY
39+
- RADIOLIB_LORAWAN_JOIN_EUI: all 0
40+
- RADIOLIB_LORAWAN_DEV_EUI: copy msb from console
41+
- RADIOLIB_LORAWAN_JOIN_EUI: copy msb from console
42+
- RADIOLIB_LORAWAN_APP_KEY: copy msb from console
43+
- RADIOLIB_LORAWAN_NWK_KEY: copy msb from console
44+
45+
### Helium
46+
47+
Console:
48+
49+
- Region: EU868
50+
- MAC version: LoRaWAN 1.0.4
51+
- Regional Parameters revision: A
52+
- ADR algorithm: Default ADR algorithm (LoRa only)
53+
- Join OTAA/ABP: Device supports OTAA
54+
- Codec: JavaScript functions and paste: /console-decoders/unified_decoder.js
55+
- Device Configuration: Disable frame-counter validation
56+
57+
credentials.h:
2858

29-
I tested this software on (many) LilyGo [TTGO T-Beam v1.2](https://www.lilygo.cc/products/t-beam-softrf?variant=43170155692213) devices, all on **EU868**. Others have enjoyed success on **EU688** and other worldwide bands, with the matching device. These are commonly available as "Meshtastic" devices from AliExpress, Amazon, Banggood, eBay, etc, usually as a kit with an unsoldered OLED screen and SMA antenna for around USD $30.00.
59+
- comment #define USE_NWK_KEY
60+
- RADIOLIB_LORAWAN_JOIN_EUI: copy msb from console
61+
- RADIOLIB_LORAWAN_DEV_EUI: copy msb from console
62+
- RADIOLIB_LORAWAN_JOIN_EUI: copy msb from console
63+
- RADIOLIB_LORAWAN_APP_KEY: copy msb from console
64+
- RADIOLIB_LORAWAN_NWK_KEY: will not be used
3065

3166
### Semtech LoRa Radio
3267

33-
This build uses the [RadioLib Library](https://github.com/jgromes/RadioLib/) for LoRaWAN on the Semtech SX1262 or SX1276 radio modules.
68+
This Fork uses the [RadioLib Library](https://github.com/jgromes/RadioLib/) for LoRaWAN on the Semtech SX1262 or SX1276 radio modules.
3469

3570
### OLED Display
3671

@@ -47,12 +82,15 @@ If you incorrectly power the OLED, short connections, or damage the Pin 21/22 co
4782
## Mandatory Configuration
4883

4984
Before Building and Uploading, you will probably want to inspect or change some items in these three files:
50-
- `platformio.ini`
51-
- `main/configuration.h`
52-
- `main/credentials.h`
85+
86+
- `main/configuration.h`
87+
- `main/credentials.h`
88+
- `platformio.ini`
89+
5390
The comments and text below will guide you on what values to look out for.
5491

5592
### Geographic Region, and Frequency
93+
5694
By default, this build is for the **EU868** region. Change the declaration in `credentials.h` for a different locale, to select the correct operating rules and frequency for your country.
5795

5896
### PlatformIO Communication port
@@ -63,11 +101,11 @@ On MacOS, it can be significantly more complicated to connect PlatformIO to your
63101

64102
### Device IDs
65103

66-
Each LoRaWAN device is identified by the three OTAA values used in Joining the network: `DevEUI`, `AppEUI`, and `AppKey`.
104+
Each LoRaWAN device is identified by the three OTAA values used in Joining the network: `DevEUI`, `NwkKey`, and `AppKey`.
67105

68-
You should choose your own private `AppKey` value in `credentials.cpp`. Either take the random value generated by the new Console Device entry, or make up one of your own. Read the notes in `credentials.cpp` for details. The value in the build must match the value in Console, regardless of how you achieve that.
106+
You should choose your own private `AppKey` value in `credentials.h`. Either take the random value generated by the new Console Device entry, or make up one of your own. Read the notes in `credentials.h` for details. The value in the build must match the value in Console, regardless of how you achieve that.
69107

70-
By default, the `DevEUI` is generated automatically to be unique to each unit, but you may want to hardcode it in `credentials.cpp` instead. There is an explanation there of why you might want to go either way.
108+
By default, the `DevEUI` is generated automatically to be unique to each unit, but you may want to hardcode it in `credentials.h` instead. There is an explanation there of why you might want to go either way.
71109

72110
### Mapper uplink period and behavior
73111

@@ -164,6 +202,7 @@ Regardless of battery or sleep state, the Mapper will power on and resume when U
164202
### Buttons
165203

166204
The TTGO T-Beam has three buttons on the underside:
205+
167206
1. Power: Nearest the USB connector is the Power button.
168207
- Menu: **short press** while on will enter the Menu display. Use the Power button to step through options, and the **Middle** button to select a menu entry.
169208
- Off: **long press** on this button will turn the unit completely off (5 seconds).
@@ -181,6 +220,7 @@ The device outputs debugging information on the USB Serial connection at 115200b
181220
#### ESP32 Bootloader
182221

183222
On powerup or reset, the very first messages will be from the Bootloader built into the ESP system. This is before any Mapper software runs and should look something like this:
223+
184224
```
185225
ets Jul 29 2019 12:21:46
186226
@@ -218,7 +258,9 @@ On startup, the USB Serial port will print the DevEUI, AppID, and AppKey values,
218258
For some, this is the easiest way to configure a new device. Upload the software, monitor the first boot, then cut & paste the values from the messages into the Console "New Device" setup.
219259

220260
##### Saved Preferences
261+
221262
The Mapper will retain certain settings across power cycles.
263+
222264
* Minimum distance
223265
* Stationary Tx Interval (min time)
224266
* Rest Wait (time until slower reporting)
@@ -299,9 +341,11 @@ The T-Beam usually comes as a kit with a 0.96" SSD1306 OLED screen that you must
299341
The OLED screen is always on when operating, as it uses only 10mA.
300342

301343
#### Status Bar
344+
302345
Operating Status is shown in the top two rows, with a running 4-line message log in the region below the line.
303346

304347
The top status line alternates between two displays every few seconds:
348+
305349
- `#ABC` is the last three hex digits of your DevEUI, so you can match it to the correct device in Console. Handy if you have several Mappers that look the same.
306350
- `4.10v` is the battery voltage
307351
- `80%` is the charge level of the the battery.
@@ -337,16 +381,17 @@ The Payload Port and byte content have been selected to match the format used by
337381
A custom Decoder Function translates the payload bytes into a set of JSON values required by the Integrations for both Mapper and Cargo.
338382
This turns the Base64 Payload into values for Lat, Long, Altitude, Speed, Battery, and Sats.
339383

340-
This [Decoder Function](https://github.com/designer2k2/tbeam-lorawan-mapper/blob/RadioLib_SX1262/console-decoders/unified_decoder.js)) can be pasted directly into the Console custom function. Do not use Decoder functions from other builds or instructions! The Uplink decoding is specific to the software that made the packet, so it has to match. (Note that HDOP is not sent in this data.)
384+
This [Decoder Function](https://github.com/designer2k2/tbeam-lorawan-mapper/blob/RadioLib_SX1262/console-decoders/unified_decoder.js) can be pasted directly into the Console custom function. Do not use Decoder functions from other builds or instructions! The Uplink decoding is specific to the software that made the packet, so it has to match. (Note that HDOP is not sent in this data.)
341385

342386
### Grafana integration for custom maps
343387

344388
If you want to maintain your own device map, there is an excellent [Grafana guide](https://github.com/takeabyte/helium_mapper_grafana) by @takeabyte (`@friends just call me bob`) available.
345389

346390
## Downlink
391+
347392
This builds adds the option to reconfigure the Mapper remotely via Helium Downlink (network to device). You can change the maximum Time Interval, Distance, and Battery Cut-off voltage remotely.
348393

349-
### Format your Downlink Payload.
394+
### Format your Downlink Payload
350395

351396
You can use the `console-decoders/downlink_encoder.py` Python script to convert your intent into a Base64 Payload.
352397
```
@@ -395,12 +440,11 @@ This build is a modification of work by many experts, with input from the [Heliu
395440

396441
The Fork history here in Github shows the lineage and prior work, including https://github.com/helium/longfi-arduino/tree/master/TTGO-TBeam-Tracker
397442

398-
This code was originally developed for use on The Things Network (TTN) it has been edited/repurposed for use with the Helium Network.
443+
This code was originally developed for use on The Things Network (TTN) it has been edited/repurposed for use with the Helium Network. And then back to be universal for both.
399444

400-
This version is based on a forked repo from github user [kizniche] https://github.com/kizniche/ttgo-tbeam-ttn-tracker. Which in turn is based on the code from [xoseperez/ttgo-beam-tracker](https://github.com/xoseperez/ttgo-beam-tracker), with excerpts from [dermatthias/Lora-TTNMapper-T-Beam](https://github.com/dermatthias/Lora-TTNMapper-T-Beam) to fix an issue with incorrect GPS data being transmitted to the network. Support was also added for the 915 MHz frequency (North and South America).
445+
This version is based on a forked repo from github user [Max-Plastix](https://github.com/Max-Plastix/tbeam-helium-mapper). Which is based on [kizniche](https://github.com/kizniche/ttgo-tbeam-ttn-tracker). Which in turn is based on the code from [xoseperez/ttgo-beam-tracker](https://github.com/xoseperez/ttgo-beam-tracker), with excerpts from [dermatthias/Lora-TTNMapper-T-Beam](https://github.com/dermatthias/Lora-TTNMapper-T-Beam) to fix an issue with incorrect GPS data being transmitted to the network. Support was also added for the 915 MHz frequency (North and South America).
401446

402-
This is a LoRaWAN node based on the [TTGO T-Beam](https://github.com/LilyGO/TTGO-T-Beam) development platform using the SSD1306 I2C OLED display.
403-
It uses a RFM95 by HopeRF and the MCCI LoRaWAN LMIC stack. This sample code is configured to connect to The LoRaWan network using the US 915 MHz frequency by default, but can be changed to EU 868 MHz.
447+
This is a LoRaWAN node based on the [TTGO T-Beam](https://github.com/LilyGO/TTGO-T-Beam) development platform using the SSD1306 I2C OLED display. This sample code is configured to connect to The LoRaWan network using the US 915 MHz frequency by default, but can be changed to EU 868 MHz.
404448

405449
NOTE: There are now 2 versions of the TTGO T-BEAM, the first version (Rev0) and a newer version (Rev1). The GPS module on Rev1 is connected to different pins than Rev0. This code has been successfully tested on REV0, and is in the process of being tested on REV1. See the end of this README for photos of each board.
406450

main/main.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
/**
22
* LoRaWan Mapper build for LilyGo TTGO T-Beam v1.2 boards.
3+
*
4+
* Copyright (C) 2025 designer2k2 Stephan M.
35
* Copyright (C) 2021-2022 by Max-Plastix
46
*
5-
* This is a development fork by Max-Plastix hosted here:
6-
* https://github.com/Max-Plastix/tbeam-helium-mapper/
7+
* This is a fork by designer2k2 hosted here:
8+
* https://github.com/designer2k2/tbeam-lorawan-mapper
79
*
810
* This code comes from a number of developers and earlier efforts, visible in
911
* the full lineage on Github, including:
1012
*
11-
* Fizzy, longfi-arduino, Kyle T. Gabriel, and Xose Pérez
13+
* Max-Plastix, Fizzy, longfi-arduino, Kyle T. Gabriel, and Xose Pérez
1214
*
1315
* GPL makes this all possible -- continue to modify, extend, and share!
1416
*/

main/screen.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
*
33
* SSD1306 - Screen module
44
*
5+
* Copyright (C) 2025 designer2k2 Stephan M.
56
* Copyright (C) 2018 by Xose Pérez <xose dot perez at gmail dot com>
67
*
8+
* Based on the work from Xose Pérez
79
*
810
* This program is free software: you can redistribute it and/or modify
911
* it under the terms of the GNU General Public License as published by

0 commit comments

Comments
 (0)