Compare commits

...

46 Commits
V2.1 ... V2.2

Author SHA1 Message Date
richonguzman
95e437cb50 readme update 2025-01-01 21:58:24 -03:00
richonguzman
9c488991e2 ready for testing 2025-01-01 21:57:21 -03:00
richonguzman
ddcd33b94a blackList working 2025-01-01 21:56:13 -03:00
richonguzman
b688391a0e wildcard and two stations blacklisted OK 2025-01-01 21:42:37 -03:00
richonguzman
56d63d0389 base lista 2025-01-01 13:02:38 -03:00
richonguzman
ad5a5ccf18 digiEcoMode fix 2024-12-31 17:40:16 -03:00
richonguzman
92bc0a7667 readme update 2024-12-30 18:28:18 -03:00
richonguzman
ffcfc42b8a digirepeater Beacon fixed 2024-12-30 18:02:20 -03:00
richonguzman
f3e0830473 new byte for syslog 2024-12-11 18:03:13 -03:00
richonguzman
62107a5b4a passcode verified 2024-12-06 12:03:37 -03:00
richonguzman
9801545965 update1 2024-12-04 13:59:46 -03:00
richonguzman
dd89f56436 added xiao board 2024-12-04 09:12:22 -03:00
richonguzman
27593d8718 Xiao added 2024-12-04 08:46:07 -03:00
richonguzman
008575b422 test1 2024-12-04 08:09:54 -03:00
richonguzman
b8eedabe9a starting Xiao 2024-12-04 07:59:03 -03:00
richonguzman
7371b8e37a heltec v2 screen update 2024-11-20 14:43:48 -03:00
richonguzman
44605e82c2 define OLED_DISPLAY_HAS_RST_PIN 2024-11-20 11:26:29 -03:00
richonguzman
0360085131 minor code cleaning 2024-11-16 08:13:29 -03:00
richonguzman
57f720b0d1 small code cleaning on 25SecBuffer 2024-11-16 08:02:15 -03:00
richonguzman
3d01ea03c0 syslog server update 2024-11-07 09:34:27 -03:00
richonguzman
afb6a60bfe readme update 2024-11-06 12:49:37 -03:00
richonguzman
06ef37e4dc eliminando espacios en blanco 2024-11-06 12:47:42 -03:00
richonguzman
9159362796 update 2024-11-06 10:07:44 -03:00
richonguzman
47c136fdd5 correcciones 2024-11-05 23:51:10 -03:00
richonguzman
970d743b80 refactor inis 2024-11-05 23:21:05 -03:00
richonguzman
7c5e58f3b2 ready for testing 2024-11-05 19:14:22 -03:00
richonguzman
210c7acb70 testing3 2024-11-05 18:20:44 -03:00
richonguzman
8d102a73c1 testing2 2024-11-05 18:15:39 -03:00
richonguzman
5030d2d645 casi casi1 2024-11-05 16:59:21 -03:00
richonguzman
a95f55273f up1 2024-11-05 16:10:41 -03:00
richonguzman
4014db03c8 2 listas 2024-11-05 15:14:56 -03:00
richonguzman
d96d5f1963 testing 2024-11-05 14:41:41 -03:00
richonguzman
d1cb732ae1 33 folders 2024-11-05 14:12:56 -03:00
richonguzman
1504bf5a7f code cleaning 2024-10-29 18:57:23 -03:00
richonguzman
3c27e52df7 readme update for T3S3 2024-10-29 10:13:23 -03:00
richonguzman
3d5f3a4914 add Lilygo T3S3 2024-10-29 09:57:26 -03:00
richonguzman
db6292ce59 added but reboots 2024-10-28 09:33:27 -03:00
richonguzman
7995d23779 cleaned 2024-10-25 15:56:03 -03:00
richonguzman
7f150bc4a0 minor letter fix 2024-10-25 15:22:24 -03:00
richonguzman
ff5650f0c5 readme and build update 2024-10-25 12:50:15 -03:00
richonguzman
a91f0f3f3c WIRE update 2024-10-25 11:50:57 -03:00
richonguzman
c9577b6c21 more display testing 2024-10-25 11:08:00 -03:00
richonguzman
10cb7c6e45 added LightGateway 2024-10-25 10:42:15 -03:00
richonguzman
99052e594a typo fix 2024-10-23 12:09:24 -03:00
richonguzman
a05917c494 update 2024-10-22 22:14:29 -03:00
richonguzman
e2e935797f images update for V2.1 2024-10-21 12:26:40 -03:00
126 changed files with 1669 additions and 1002 deletions

View File

@@ -15,6 +15,8 @@ jobs:
chip: esp32
- name: ttgo-lora32-v21_915
chip: esp32
- name: ttgo_lora32_t3s3_v1_2
chip: esp32s3
- name: heltec-lora32-v2
chip: esp32
- name: heltec_wifi_lora_32_V3
@@ -73,6 +75,10 @@ jobs:
chip: esp32c3
- name: ESP32_C3_OctopusLab_LoRa
chip: esp32c3
- name: QRPLabs_LightGateway_1_0
chip: esp32s3
- name: XIAO_ESP32S3_WIO_SX1262
chip: esp32s3
steps:
- uses: actions/checkout@v3

View File

@@ -1,4 +1,4 @@
# CA2RXU LoRa APRS iGate/Digirepeater
# CA2RXU LoRa APRS iGate/Digipeater
This firmware is for using ESP32 based boards with LoRa Modules and GPS to live in the APRS world.
@@ -32,11 +32,13 @@ ____________________________________________________
(NOTE: all boards with 433-868-915 MHz versions)
- TTGO Lilygo LoRa32 v2.1 / v1.6 (they work the same).
- TTGO Lilygo LoRa32 T3S3 V1.2 and LoRa32 V2.1 (V1.6 is the same).
- TTGO T-Beam v1.0 , v1.1, v1.2 (also variations with SX1262 and SX1268 LoRa Modules).
- TTGO T-Beam V1.0 , V1.1, V1.2 (also variations with SX1262 and SX1268 LoRa Modules).
- HELTEC V2, V3 , Wireless Stick, Wireless Stick Lite, HT-CT62, Wireless Tracker.
- HELTEC V2, V3 , Wireless Stick, Wireless Stick Lite, HT-CT62, Wireless Tracker, Wireless Paper.
- QRP Labs LightGateway 1.0.
- ESP32 Wroom + SX1278 LoRa Module or Ebyte 400M30S (or 900M30S) 1W LoRa Module for a DIY Versions.
@@ -50,16 +52,22 @@ ____________________________________________________
## Timeline (Versions):
- 2025.01.02 Callsign Black List added.
- 2024.12.30 Fixed missing validation for correct Digipeater mode when not connected to APRS-IS.
- 2024.12.06 APRS-IS connnection and passcode validation added.
- 2024.11.06 (Silent Update) Working now with Board "VARIANTS".
- 2024.10.29 Added LILYGO Lora32 T3S3 support.
- 2024.10.25 Added QRP Labs LightGateway 1.0 support.
- 2024.10.21 Boards with GPS can now send Real-GPS Beacon (also posible: GPS ambiguity of ~ 1 km).
- 2024.10.14 Received Packets in WebUI show real Local Time (NTP with GMT offset).
- 2024.10.08 New EcoMode for Remote Digirepeaters without WiFi/WiFiAP, Screen, Leds (Example: LILYGO LoRa32 uses only 24mA, with WifiAP and all was 150mA). APRS Message/Queries can start/stop this mode too.
- 2024.10.06 Cross Frequency Digirepeater Rules added.
- 2024.10.08 New EcoMode for Remote Digipeaters without WiFi/WiFiAP, Screen, Leds (Example: LILYGO LoRa32 uses only 24mA, with WifiAP and all was 150mA). APRS Message/Queries can start/stop this mode too.
- 2024.10.06 Cross Frequency Digipeater Rules added.
- 2024.09.23 Libraries Update for SDK3
- 2024.09.23 Added Enconded Telemetry for Battery (+ External Voltage) in Station GPS Beacon Packet.
- 2024.08.23 Wemos S2 Mini DIY LoRa added.
- 2024.08.19 HELTEC Wireless Paper working (still missing Epaper code).
- 2024.08.13 Web Authentication for WebUI. Thanks Mitja S57PNX.
- 2024.08.05 WIDE2-n added to WIDE1-n in Digirepeater Modes.
- 2024.08.05 WIDE2-n added to WIDE1-n in Digipeater Modes.
- 2024.06.27 External Voltage Divider Resistor configuration on WebUI. Thanks Tilen S54B.
- 2024.06.26 Personal Note information on WebUI for the Station. Thanks Tilen S54B.
- 2024.06.24 Callsign Validation fix. Thanks Helge SA7SKY.
@@ -70,7 +78,7 @@ ____________________________________________________
- 2024.06.08 Callsign Validation for all Station that iGate/Digi hears.
- 2024.05.27 Battery Monitor for internal and External Voltages (to make board sleep and avoid low discharge of batterys) T-Beam boards now with Battery readings as well.
- 2024.05.23 Forced Reboot Mode added.
- 2024.05.22 Experimental backup-Digirepeater-Mode when "only" iGate mode loses WiFi connection added.
- 2024.05.22 Experimental backup-Digipeater-Mode when "only" iGate mode loses WiFi connection added.
- 2024.05.20 WebConfig update to control whether Messages and Objects should be Tx to RF.
- 2024.05.17 HELTEC Wireless Stick Lite v3 support added.
- 2024.05.14 BME modules will be autodetected (I2C Address and if it is BME280/BMP280/BME680).
@@ -82,12 +90,12 @@ ____________________________________________________
- 2024.04.21 WEB INSTALLER (thanks Damian SQ2CPA).
- 2024.04.20 New Output Buffer process: no more packets lost.
- 2024.04.13 Received Packets added on WebUI.
- 2024.04.09 iGate/Digirepeater own GPS beacon is encoded (Base91) now.
- 2024.04.09 iGate/Digipeater own GPS beacon is encoded (Base91) now.
- 2024.03.18 OE5HWN MeshCom board support added.
- 2024.02.25 New Web Configuration UI with WiFi AP (thanks Damian SQ2CPA).
- 2023.01.28 Updated to ElegantOTA v.3 (AsyncElegantOTA was deprecated).
- 2024.01.19 TextSerialOutputForApp added to get text from Serial-Output over USB into PC for PinPoint App (https://www.pinpointaprs.com) and APRSIS32 App (http://aprsisce.wikidot.com)
- 2024.01.12 Added iGate Mode to also repeat packets (like a iGate+DigiRepeater) in stationMode 2 and 5.
- 2024.01.12 Added iGate Mode to also repeat packets (like a iGate+Digipeater) in stationMode 2 and 5.
- 2024.01.11 Added iGate Mode to enable APRS-IS and LoRa beacon report at the same time.
- 2024.01.05 Lilygo TTGO T-Beam V1, V1.2, V1 + SX1268, V1.2 + SX1262 support added.
- 2024.01.02 EByte 400M30S 1 Watt LoRa module for DIY ESP32 iGate support added.
@@ -96,18 +104,18 @@ ____________________________________________________
- 2023.12.07 MIC-E process and Syslog added.
- 2023.12.06 HELTEC V2 board support added.
- 2023.11.26 Small correction to enable Syslog in stationMode5.
- 2023.10.09 Added "WIDE1-1" to Tx packets from iGate to be *repeated* by Digirepeaters.
- 2023.10.09 Added "WIDE1-1" to Tx packets from iGate to be *repeated* by Digipeaters.
- 2023.10.09 BMP280 module support added.
- 2023.08.20 Added External Voltage Measurement (Max 15V!)
- 2023.08.05 Ground Height Correction for Pressure readings added.
- 2023.07.31 StationMode5 added: iGate when WiFi and APRS available, DigiRepeater when not.
- 2023.07.31 StationMode5 added: iGate when WiFi and APRS available, Digipeater when not.
- 2023.07.16 Small OTA, BME module update.
- 2023.07.05 Adding monitor info of Battery connected.
- 2023.06.18 Info on Oled Screen mayor update, added RSSI and Distance to Listened Station.
- 2023.06.17 BME280 Module (Temperature, Humidity, Pressure) support added.
- 2023.06.12 Syslog added.
- 2023.06.10 OTA update support for Firmware and Filesystem.
- 2023.06.08 Adding Digirepeater Functions.
- 2023.06.08 Adding Digipeater Functions.
- 2023.06.06 Full repack of Code and adding _enableTx_ only for Ham Ops.
- 2023.05.23 Processing Query's from RF/LoRa or APRS-IS (Send "Help" Message to test).
- 2023.05.19 Saving Last-Heard Stations for validating Tx Responses.

44
common_settings.ini Normal file
View File

@@ -0,0 +1,44 @@
[common]
build_flags =
-Werror -Wall
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
-DRADIOLIB_EXCLUDE_CC1101=1
-DRADIOLIB_EXCLUDE_NRF24=1
-DRADIOLIB_EXCLUDE_RF69=1
-DRADIOLIB_EXCLUDE_SX1231=1
-DRADIOLIB_EXCLUDE_SX1233=1
-DRADIOLIB_EXCLUDE_SI443X=1
-DRADIOLIB_EXCLUDE_RFM2X=1
-DRADIOLIB_EXCLUDE_AFSK=1
-DRADIOLIB_EXCLUDE_BELL=1
-DRADIOLIB_EXCLUDE_HELLSCHREIBER=1
-DRADIOLIB_EXCLUDE_MORSE=1
-DRADIOLIB_EXCLUDE_RTTY=1
-DRADIOLIB_EXCLUDE_SSTV=1
-DRADIOLIB_EXCLUDE_AX25=1
-DRADIOLIB_EXCLUDE_DIRECT_RECEIVE=1
-DRADIOLIB_EXCLUDE_BELL=1
-DRADIOLIB_EXCLUDE_PAGER=1
-DRADIOLIB_EXCLUDE_FSK4=1
-DRADIOLIB_EXCLUDE_APRS=1
-DRADIOLIB_EXCLUDE_LORAWAN=1
-I variants/${PIOENV}
lib_deps =
adafruit/Adafruit Unified Sensor @ 1.1.14
adafruit/Adafruit BME280 Library @ 2.2.4
adafruit/Adafruit BMP280 Library @ 2.6.8
adafruit/Adafruit BME680 Library @ 2.0.4
adafruit/Adafruit Si7021 Library @ 1.5.3
arduino-libraries/NTPClient @ 3.2.1
ayushsharma82/ElegantOTA @ 3.1.5
bblanchon/ArduinoJson @ 6.21.3
jgromes/RadioLib @ 7.1.0
mathieucarbou/AsyncTCP @ 3.2.5
mathieucarbou/ESPAsyncWebServer @ 3.2.3
mikalhart/TinyGPSPlus @ 1.0.3
display_libs =
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
usb_flags=
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1

View File

@@ -56,7 +56,7 @@
"externalSleepVoltage": 10.9,
"voltageDividerR1": 100.0,
"voltageDividerR2": 27.0,
"sendVoltageAsTelemetry": true
"sendVoltageAsTelemetry": false
},
"wxsensor": {
"active": false,
@@ -65,8 +65,8 @@
},
"syslog": {
"active": false,
"server": "192.168.0.100",
"port": 514
"server": "lora.link9.net",
"port": 1514
},
"tnc": {
"enableServer": false,
@@ -92,5 +92,6 @@
"rebootMode": false,
"rebootModeTime": 6
},
"personalNote": ""
"personalNote": "",
"blackList": ""
}

View File

@@ -77,7 +77,7 @@
</tbody>
</table>
<span>List refresh automatically every 15 seconds.</span><br>
<small>(Local Time is NPT-Time adjusted with your GMT Offset)</small>
<small>(Local Time is NTP-Time adjusted with your GMT Offset)</small>
</div>
</div>
<hr />
@@ -121,7 +121,7 @@
<div class="row">
<div class="col-12">
<label for="callsign" class="form-label"
>Callsign and SSID</label
>Callsign - SSID</label
>
<input
type="text"
@@ -152,7 +152,7 @@
<label
for="beacon.path"
class="form-label"
>Beacon path</label
>Beacon Path</label
>
<input
type="text"
@@ -492,8 +492,7 @@
<label
for="beacon.sendViaAPRSIS"
class="form-label"
>Send our beacon to
APRS-IS
>Send beacon via APRS-IS
</label>
</div>
</div>
@@ -516,12 +515,12 @@
<button class="btn btn-primary" id="send-beacon">Send beacon now</button>
</div>
</div>
<div class="row mt-3">
<div class="row mt-4">
<div class="col-12">
<label
for="beacon.interval"
class="form-label"
>Interval
>Beacon Interval
</label>
<div class="input-group">
<input
@@ -574,6 +573,47 @@
</div>
<hr />
<div class="row my-5 d-flex align-items-top">
<div class="col-lg-3 col-sm-12">
<h5>
<svg
xmlns="http://www.w3.org/2000/svg"
width="20"
height="20"
fill="currentColor"
class="bi bi-broadcast-pin"
viewBox="0 0 16 16"
>
<path
d="M3.05 3.05a7 7 0 0 0 0 9.9.5.5 0 0 1-.707.707 8 8 0 0 1 0-11.314.5.5 0 0 1 .707.707m2.122 2.122a4 4 0 0 0 0 5.656.5.5 0 1 1-.708.708 5 5 0 0 1 0-7.072.5.5 0 0 1 .708.708m5.656-.708a.5.5 0 0 1 .708 0 5 5 0 0 1 0 7.072.5.5 0 1 1-.708-.708 4 4 0 0 0 0-5.656.5.5 0 0 1 0-.708m2.122-2.12a.5.5 0 0 1 .707 0 8 8 0 0 1 0 11.313.5.5 0 0 1-.707-.707 7 7 0 0 0 0-9.9.5.5 0 0 1 0-.707zM6 8a2 2 0 1 1 2.5 1.937V15.5a.5.5 0 0 1-1 0V9.937A2 2 0 0 1 6 8"
/>
</svg>
Black List
</h5>
<small>Add Callsigns with space between them to Black List them (* wild card allowed)</small>
</div>
<div class="col-9 mt-2">
<div class="row">
<div class="col-12">
<label
for="blackList"
class="form-label"
>Black List</label
>
<input
type="text"
name="blackList"
id="blackList"
class="form-control"
placeholder="Station Callsign"
oninput="this.value = this.value.toUpperCase();"
/>
</div>
</div>
</div>
</div>
<hr />
<div class="row my-5 d-flex align-items-top">
<div class="col-lg-3 col-sm-12">
<h5>
@@ -626,7 +666,7 @@
<label
for="digi.ecoMode"
class="form-label"
>Eco Mode<small> This will disable WiFi, Display, Leds and lower CPU Speed for Low Power Digirepeater. (<strong>Caution:</strong> Active means No WebUI Configuration, so <strong>ONLY</strong> activate this for Remote Digirepeater)</small></label
>Eco Mode<small> This will disable WiFi, Display, Leds and lower CPU Speed for Low Power Digipeater. (<strong>Caution:</strong> Active means No WebUI Configuration, so <strong>ONLY</strong> activate this for Remote Digipeater)</small></label
>
</div>
</div>
@@ -1198,7 +1238,7 @@
class="form-label"
><b>Activate Wx Telemetry</b>
<small
>Requires a BME/BMP280, BME680 or Si7021 sensor installed</small
>Requires a BME/BMP280, BME680 or Si7021 sensor.</small
></label
>
</div>
@@ -1296,7 +1336,7 @@
type="text"
name="syslog.server"
id="syslog.server"
placeholder="192.168.0.100"
placeholder="lora.link9.net"
class="form-control"
disabled
/>
@@ -1311,7 +1351,7 @@
type="text"
name="syslog.port"
id="syslog.port"
placeholder="514"
placeholder="1514"
class="form-control"
disabled
/>
@@ -1744,7 +1784,7 @@
<div class="col-12">
<div class="form-check form-switch">
<div class="form-text">
When "only" iGate Mode loses WiFi, it will change into a Digirepeater Mode and after 15 min check if WiFi available and return to "only" iGate Mode.
When "only" iGate Mode loses WiFi, it will change into a Digipeater Mode and after 15 min check if WiFi available and return to "only" iGate Mode.
</div>
<input
type="checkbox"
@@ -1755,7 +1795,7 @@
<label
for="other.backupDigiMode"
class="form-label"
>Backup Digirepeater Mode</label
>Backup Digipeater Mode</label
>
</div>
</div>

View File

@@ -137,6 +137,9 @@ function loadSettings(settings) {
document.getElementById("beacon.gpsActive").checked = settings.beacon.gpsActive;
document.getElementById("beacon.gpsAmbiguity").checked = settings.beacon.gpsAmbiguity;
// Black List
document.getElementById("blackList").value = settings.blackList;
// Digi
document.getElementById("digi.mode").value = settings.digi.mode;
document.getElementById("digi.ecoMode").checked = settings.digi.ecoMode;
@@ -251,8 +254,6 @@ document.getElementById('reboot').addEventListener('click', function (e) {
const wxsensorCheckbox = document.querySelector("input[name='wxsensor.active']");
const stationModeSelect = document.querySelector("select[name='stationMode']");
function updateImage() {
const value = document.getElementById("beacon.overlay").value + document.getElementById("beacon.symbol").value;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 130 KiB

BIN
images/Web015-Admin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

BIN
images/Web016-NTP.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View File

Before

Width:  |  Height:  |  Size: 203 KiB

After

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

View File

@@ -3,6 +3,7 @@
#include <Arduino.h>
namespace A7670_Utils {
bool checkModemOn();

View File

@@ -1,39 +0,0 @@
This directory is intended for project header files.
A header file is a file containing C declarations and macro definitions
to be shared between several project source files. You request the use of a
header file in your project source file (C, C++, etc) located in `src` folder
by including it, with the C preprocessing directive `#include'.
```src/main.c
#include "header.h"
int main (void)
{
...
}
```
Including a header file produces the same results as copying the header file
into each source file that needs it. Such copying would be time-consuming
and error-prone. With a header file, the related declarations appear
in only one place. If they need to be changed, they can be changed in one
place, and programs that include the header file will automatically use the
new version when next recompiled. The header file eliminates the labor of
finding and changing all the copies as well as the risk that a failure to
find one copy will result in inconsistencies within a program.
In C, the usual convention is to give header files names that end with `.h'.
It is most portable to use only letters, digits, dashes, and underscores in
header file names, and at most one dot.
Read more about using header files in official GCC documentation:
* Include Syntax
* Include Operation
* Once-Only Headers
* Computed Includes
https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html

View File

@@ -8,6 +8,7 @@ namespace APRS_IS_Utils {
void upload(const String& line);
void connect();
void checkStatus();
String checkForStartingBytes(const String& packet);
@@ -19,6 +20,8 @@ namespace APRS_IS_Utils {
void processAPRSISPacket(const String& packet);
void listenAPRSIS();
void firstConnection();
}
#endif

View File

@@ -5,6 +5,7 @@
#include <vector>
#include <FS.h>
class WiFi_AP {
public:
String ssid;
@@ -49,7 +50,6 @@ public:
bool ecoMode;
};
class LoraModule {
public:
long txFreq;
@@ -134,6 +134,7 @@ public:
bool rebootMode;
int rebootModeTime;
String personalNote;
String blackList;
std::vector<WiFi_AP> wifiAPs;
WiFi_Auto_AP wifiAutoAP;
BEACON beacon;

View File

@@ -7,7 +7,7 @@
namespace DIGI_Utils {
String buildPacket(const String& path, const String& packet, bool thirdParty, bool crossFreq);
String generateDigiRepeatedPacket(const String& packet, bool thirdParty);
String generateDigipeatedPacket(const String& packet, bool thirdParty);
void processLoRaPacket(const String& packet);
void checkEcoMode();

View File

@@ -5,6 +5,7 @@
#define SCREEN_ADDRESS 0x3C ///< See datasheet for Address; 0x3D for 128x64, 0x3C for 128x32
void cleanTFT();
void displaySetup();
void displayToggle(bool toggle);

View File

@@ -3,6 +3,7 @@
#include <Arduino.h>
String encodeAddressAX25(String tnc2Address);
String decodeAddressAX25(const String& ax25Address, bool& isLast, bool isRelay);

View File

@@ -12,7 +12,7 @@ namespace LoRa_Utils {
String receivePacket();
void changeFreqTx();
void changeFreqRx();
void startReceive(); // ???
void startReceive();
void sleepRadio();
}

View File

@@ -3,6 +3,7 @@
#include <Arduino.h>
namespace NTP_Utils {
void setup();

View File

@@ -16,9 +16,10 @@ struct LastHeardStation {
String station;
};
namespace STATION_Utils {
void loadBlackList();
bool checkBlackList(const String& callsign);
void deleteNotHeard();
void updateLastHeard(const String& station);
bool wasHeard(const String& station);

View File

@@ -3,6 +3,7 @@
#include <Arduino.h>
namespace TNC_Utils {
void setup();

View File

@@ -3,6 +3,7 @@
#include <Arduino.h>
class ReceivedPacket {
public:
String rxTime;

View File

@@ -13,10 +13,6 @@ namespace WEB_Utils {
void handleNotFound(AsyncWebServerRequest *request);
void handleStatus(AsyncWebServerRequest *request);
void handleHome(AsyncWebServerRequest *request);
//void handleReadConfiguration(AsyncWebServerRequest *request);
//void handleWriteConfiguration(AsyncWebServerRequest *request);
void handleStyle(AsyncWebServerRequest *request);
void handleScript(AsyncWebServerRequest *request);
void handleBootstrapStyle(AsyncWebServerRequest *request);

View File

@@ -11,6 +11,10 @@
[platformio]
default_envs = ttgo-lora32-v21
extra_configs =
common_settings.ini
variants/*/platformio.ini
[env]
platform = espressif32 @ 6.7.0
board_build.partitions = min_spiffs.csv
@@ -25,465 +29,4 @@ board_build.embed_files =
data_embed/favicon.png.gz
extra_scripts =
pre:tools/compress.py
debug_tool = esp-prog
[common]
lib_deps =
jgromes/RadioLib @ 6.6.0
mikalhart/TinyGPSPlus @ 1.0.3
bblanchon/ArduinoJson @ 6.21.3
adafruit/Adafruit Unified Sensor @ 1.1.14
adafruit/Adafruit BME280 Library @ 2.2.4
adafruit/Adafruit BMP280 Library @ 2.6.8
adafruit/Adafruit BME680 Library @ 2.0.4
adafruit/Adafruit Si7021 Library @ 1.5.3
ayushsharma82/ElegantOTA @ 3.1.5
mathieucarbou/ESPAsyncWebServer @ 3.2.3
mathieucarbou/AsyncTCP @ 3.2.5
arduino-libraries/NTPClient @ 3.2.1
[env:ttgo-lora32-v21]
board = ttgo-lora32-v21
build_flags =
-Werror -Wall
-DTTGO_T_LORA32_V2_1
-DHAS_SX1278
-DHAS_ADC_CALIBRATION
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
[env:ttgo-lora32-v21_915]
board = ttgo-lora32-v21
build_flags =
-Werror -Wall
-DTTGO_T_LORA32_V2_1_915
-DHAS_SX1276
-DHAS_ADC_CALIBRATION
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
[env:heltec-lora32-v2]
board = ttgo-lora32-v21
build_flags =
-Werror -Wall
-DHELTEC_V2
-DHAS_SX1278
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
[env:heltec_wifi_lora_32_V3]
board = heltec_wifi_lora_32_V3
board_build.mcu = esp32s3
build_flags =
-Werror -Wall
-DHELTEC_V3
-DHAS_SX1262
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
[env:heltec_wireless_stick]
board = esp32-s3-devkitc-1
board_build.mcu = esp32s3
build_flags =
-Werror -Wall
-DHELTEC_WS
-DHAS_SX1262
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
[env:heltec_wireless_stick_lite_v3]
board = esp32-s3-devkitc-1
board_build.mcu = esp32s3
build_flags =
-Werror -Wall
-DHELTEC_WSL_V3
-DHAS_SX1262
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
[env:heltec_wireless_stick_lite_v3_display]
board = esp32-s3-devkitc-1
board_build.mcu = esp32s3
build_flags =
-Werror -Wall
-DHELTEC_WSL_V3_DISPLAY
-DHAS_SX1262
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
[env:ESP32_DIY_LoRa]
board = esp32dev
build_flags =
-Werror -Wall
-DESP32_DIY_LoRa
-DHAS_SX1278
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
[env:ESP32_DIY_LoRa_915]
board = esp32dev
build_flags =
-Werror -Wall
-DESP32_DIY_LoRa_915
-DHAS_SX1276
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
[env:ESP32_DIY_1W_LoRa]
board = esp32dev
build_flags =
-Werror -Wall
-DESP32_DIY_1W_LoRa
-DHAS_SX1268
-DHAS_1W_LORA
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
[env:ESP32_DIY_1W_LoRa_915]
board = esp32dev
build_flags =
-Werror -Wall
-DESP32_DIY_1W_LoRa_915
-DHAS_SX1262
-DHAS_1W_LORA
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
[env:ESP32_DIY_1W_LoRa_LLCC68]
board = esp32dev
build_flags =
-Werror -Wall
-DESP32_DIY_1W_LoRa_LLCC68
-DHAS_LLCC68
-DHAS_1W_LORA
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
[env:ESP32_DIY_1W_LoRa_Mesh_V1_2]
board = esp32dev
build_flags =
-Werror -Wall
-DESP32_DIY_1W_LoRa_Mesh_V1_2
-DHAS_SX1268
-DHAS_1W_LORA
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
[env:ttgo-t-beam-v1_2]
board = ttgo-t-beam
build_flags =
-Werror -Wall
-DTTGO_T_Beam_V1_2
-DHAS_SX1278
-DHAS_AXP2101
-DHAS_GPS
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
lewisxhe/XPowersLib @ 0.2.4
[env:ttgo-t-beam-v1_2_915]
board = ttgo-t-beam
build_flags =
-Werror -Wall
-DTTGO_T_Beam_V1_2_915
-DHAS_SX1276
-DHAS_AXP2101
-DHAS_GPS
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
lewisxhe/XPowersLib @ 0.2.4
[env:ttgo-t-beam-v1]
board = ttgo-t-beam
build_flags =
-Werror -Wall
-DTTGO_T_Beam_V1_0
-DHAS_SX1278
-DHAS_AXP192
-DHAS_GPS
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
lewisxhe/XPowersLib @ 0.2.4
[env:ttgo-t-beam-v1_915]
board = ttgo-t-beam
build_flags =
-Werror -Wall
-DTTGO_T_Beam_V1_0_915
-DHAS_SX1276
-DHAS_AXP192
-DHAS_GPS
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
lewisxhe/XPowersLib @ 0.2.4
[env:ttgo-t-beam-v1_SX1268]
board = ttgo-t-beam
build_flags =
-Werror -Wall
-DTTGO_T_Beam_V1_0_SX1268
-DHAS_SX1268
-DHAS_AXP192
-DHAS_GPS
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
lewisxhe/XPowersLib @ 0.2.4
[env:ttgo-t-beam-v1_2_SX1262]
board = ttgo-t-beam
build_flags =
-Werror -Wall
-DTTGO_T_Beam_V1_2_SX1262
-DHAS_SX1262
-DHAS_AXP2101
-DHAS_GPS
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
lewisxhe/XPowersLib @ 0.2.4
[env:ESP32_DIY_LoRa_A7670]
board = esp32dev
build_flags =
-Werror -Wall
-DESP32_DIY_LoRa_A7670
-DHAS_SX1278
-DHAS_A7670
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
vshymanskyy/TinyGSM @ 0.12.0
vshymanskyy/StreamDebugger @ 1.0.1
[env:ESP32_DIY_LoRa_A7670_915]
board = esp32dev
build_flags =
-Werror -Wall
-DESP32_DIY_LoRa_A7670_915
-DHAS_SX1276
-DHAS_A7670
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
vshymanskyy/TinyGSM @ 0.12.0
vshymanskyy/StreamDebugger @ 1.0.1
[env:heltec_wireless_tracker]
board = esp32-s3-devkitc-1
board_build.mcu = esp32s3
build_flags =
-Werror -Wall
-DHELTEC_WIRELESS_TRACKER
-DHAS_SX1262
-DHAS_GPS
-DGPS_BAUDRATE=115200
-DHAS_TFT
-D USER_SETUP_LOADED
-D TFT_WIDTH=80
-D TFT_HEIGHT=160
-D ST7735_DRIVER
-D ST7735_GREENTAB160x80
-D TFT_RGB_ORDER=TFT_BGR
-D TFT_MOSI=42
-D TFT_SCLK=41
-D TFT_CS=38
-D TFT_DC=40
-D TFT_RST=39
-D TFT_BL=21
-D TFT_BACKLIGHT_ON=1
-D TOUCH_CS=-1
-D LOAD_GLCD
-D LOAD_FONT2
-D LOAD_FONT4
-D LOAD_FONT6
-D LOAD_FONT7
-D LOAD_FONT8
-D SPI_FREQUENCY=27000000
-D USE_HSPI_PORT
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
bodmer/TFT_eSPI @ 2.5.43
[env:heltec_ht-ct62]
board = heltec_wireless_stick_lite
board_build.mcu = esp32c3
build_flags =
-Werror -Wall
-DHELTEC_HTCT62
-DHAS_SX1262
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
[env:heltec_wireless_paper]
board = esp32-s3-devkitc-1
board_build.mcu = esp32s3
build_flags =
-Werror -Wall
-DHELTEC_WP
-DHAS_SX1262
-DHAS_EPAPER
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
[env:OE5HWN_MeshCom]
board = esp32dev
build_flags =
-Werror -Wall
-DOE5HWN_MeshCom
-DHAS_SX1268
-DHAS_1W_LORA
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
[env:WEMOS-LOLIN32-OLED-DIY]
board = lolin32
build_flags =
-Werror -Wall
-DWEMOS_LOLIN32_OLED_DIY_LoRa
-DHAS_SX1278
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
[env:WEMOS-D1-R32-RA02]
board = wemos_d1_uno32
build_flags =
-Werror -Wall
-DWEMOS_D1_R32_RA02
-DHAS_SX1278
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
[env:WEMOS_S2_MINI_DIY_LoRa]
board = lolin_s2_mini
build_flags =
-Werror -Wall
-DWEMOS_S2_MINI_DIY_LoRa
-DHAS_SX1278
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
[env:esp32c3_DIY_1W_LoRa]
board = esp32-c3-devkitm-1
board_build.mcu = esp32c3
build_flags =
-Werror -Wall
-DESP32C3_DIY_1W_LoRa
-DHAS_SX1268
-DHAS_1W_LORA
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
[env:esp32c3_DIY_1W_LoRa_915]
board = esp32-c3-devkitm-1
board_build.mcu = esp32c3
build_flags =
-Werror -Wall
-DESP32C3_DIY_1W_LoRa_915
-DHAS_SX1262
-DHAS_1W_LORA
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
[env:ESP32_C3_OctopusLab_LoRa]
board = esp32-c3-devkitm-1
board_build.mcu = esp32c3
build_flags =
-Werror -Wall
-DESP32_C3_OctopusLab_LoRa
-DHAS_SX1268
-DRADIO_HAS_XTAL
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10
debug_tool = esp-prog

View File

@@ -1,6 +1,6 @@
#include "configuration.h"
#include "aprs_is_utils.h"
#include "boards_pinout.h"
#include "board_pinout.h"
#include "A7670_utils.h"
#include "lora_utils.h"
#include "display.h"
@@ -200,6 +200,6 @@
}
}
delay(1);
}
}
}
#endif

View File

@@ -1,16 +1,24 @@
/*______________________________________________________________________________________________________________
/*___________________________________________________________________
██╗ ██████╗ ██████╗ █████╗ █████╗ ██████╗ ██████╗ ███████╗ ██╗ ██████╗ █████╗ ████████╗███████╗
██║ ██╔═══██╗██╔══██╗██╔══██╗ ██╔══██╗██╔══██╗██╔══██╗██╔════╝ ██║██╔════╝ ██╔══██╗╚══██╔══╝██╔════╝
██║ ██║ ██║██████╔╝███████║ ███████║██████╔╝██████╔╝███████╗ ██║██║ ███╗███████║ ██║ █████╗
██║ ██║ ██║██╔══██╗██╔══██║ ██╔══██║██╔═══╝ ██╔══██╗╚════██║ ██║██║ ██║██╔══██║ ██║ ██╔══╝
███████╗╚██████╔╝██║ ██║██║ ██║ ██║ ██║██║ ██║ ██║███████║ ██║╚██████╔╝██║ ██║ ██║ ███████╗
╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚══════╝
██╗ ██████╗ ██████╗ █████╗ █████╗ ██████╗ ██████╗ ███████╗
██║ ██╔═══██╗██╔══██╗██╔══██╗ ██╔══██╗██╔══██╗██╔══██╗██╔════╝
██║ ██║ ██║██████╔╝███████║ ███████║██████╔╝██████╔╝███████╗
██║ ██║ ██║██╔══██╗██╔══██║ ██╔══██║██╔═══╝ ██╔══██╗╚════██║
███████╗╚██████╔╝██║ ██║██║ ██║ ██║ ██║██║ ██║ ██║███████║
╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝╚══════╝
██╗ ██████╗ █████╗ ████████╗███████╗
██║██╔════╝ ██╔══██╗╚══██╔══╝██╔════╝
██║██║ ███╗███████║ ██║ █████╗
██║██║ ██║██╔══██║ ██║ ██╔══╝
██║╚██████╔╝██║ ██║ ██║ ███████╗
╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚══════╝
Ricardo Guzman - CA2RXU
https://github.com/richonguzman/LoRa_APRS_Tracker
(donations : http://paypal.me/richonguzman)
______________________________________________________________________________________________________________*/
Ricardo Guzman - CA2RXU
https://github.com/richonguzman/LoRa_APRS_Tracker
(donations : http://paypal.me/richonguzman)
___________________________________________________________________*/
#include <ElegantOTA.h>
#include <TinyGPS++.h>
@@ -21,8 +29,8 @@ ________________________________________________________________________________
#include "battery_utils.h"
#include "aprs_is_utils.h"
#include "station_utils.h"
#include "boards_pinout.h"
#include "battery_utils.h"
#include "board_pinout.h"
#include "syslog_utils.h"
#include "query_utils.h"
#include "power_utils.h"
@@ -40,7 +48,7 @@ ________________________________________________________________________________
#include "A7670_utils.h"
#endif
String versionDate = "2024.10.21";
String versionDate = "2025.01.02";
Configuration Config;
WiFiClient espClient;
#ifdef HAS_GPS
@@ -71,6 +79,7 @@ void setup() {
LoRa_Utils::setup();
Utils::validateFreqs();
GPS_Utils::setup();
STATION_Utils::loadBlackList();
#ifdef STARTUP_DELAY // (TEST) just to wait for WiFi init of Routers
displayShow("", " STARTUP DELAY ...", "", "", 0);
@@ -128,6 +137,7 @@ void setup() {
A7670_Utils::setup();
#endif
Utils::checkRebootMode();
APRS_IS_Utils::firstConnection();
}
void loop() {
@@ -141,14 +151,13 @@ void loop() {
if (Config.lowVoltageCutOff > 0) {
BATTERY_Utils::checkIfShouldSleep();
}
thirdLine = Utils::getLocalIP();
WIFI_Utils::checkWiFi();
#ifdef HAS_A7670
if (Config.aprs_is.active && !modemLoggedToAPRSIS) A7670_Utils::APRS_IS_connect();
#else
WIFI_Utils::checkWiFi();
if (Config.aprs_is.active && (WiFi.status() == WL_CONNECTED) && !espClient.connected()) APRS_IS_Utils::connect();
#endif
@@ -172,7 +181,7 @@ void loop() {
if (Config.loramodule.txActive && (Config.digi.mode == 2 || Config.digi.mode == 3 || backUpDigiMode)) { // If Digi enabled
STATION_Utils::clean25SegBuffer();
DIGI_Utils::processLoRaPacket(packet); // Send received packet to Digi
DIGI_Utils::processLoRaPacket(packet); // Send received packet to Digi
}
if (Config.tnc.enableServer) { // If TNC server enabled
@@ -183,10 +192,10 @@ void loop() {
}
}
if (Config.aprs_is.active) { // If APRSIS enabled
if (Config.aprs_is.active) {
APRS_IS_Utils::listenAPRSIS(); // listen received packet from APRSIS
}
STATION_Utils::processOutputPacketBuffer();
displayShow(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, seventhLine, 0);

View File

@@ -22,7 +22,8 @@ extern String seventhLine;
extern bool modemLoggedToAPRSIS;
extern bool backUpDigiMode;
uint32_t lastRxTime = millis();
uint32_t lastRxTime = millis();
bool passcodeValid = false;
#ifdef HAS_A7670
extern bool stationBeacon;
@@ -50,11 +51,9 @@ namespace APRS_IS_Utils {
}
if (count == 20) {
Serial.println("Tried: " + String(count) + " FAILED!");
}
else {
} else {
Serial.println("Connected!\n(Server: " + String(Config.aprs_is.server) + " / Port: " + String(Config.aprs_is.port) + ")");
// String filter = "t/m/" + Config.callsign + "/" + (String)Config.aprs_is.reportingDistance;
String aprsAuth = "user ";
aprsAuth += Config.callsign;
aprsAuth += " pass ";
@@ -62,7 +61,6 @@ namespace APRS_IS_Utils {
aprsAuth += " vers CA2RXU_LoRa_iGate 2.0 filter ";
aprsAuth += Config.aprs_is.filter;
upload(aprsAuth);
delay(200);
}
}
@@ -101,7 +99,7 @@ namespace APRS_IS_Utils {
if(aprsisState == "--" && !Config.display.alwaysOn && Config.display.timeout != 0) {
displayToggle(true);
lastScreenOn = millis();
}
}
}
secondLine = "WiFi: ";
secondLine += wifiState;
@@ -174,13 +172,13 @@ namespace APRS_IS_Utils {
}
void processLoRaPacket(const String& packet) {
if (espClient.connected() || modemLoggedToAPRSIS) {
if (passcodeValid && (espClient.connected() || modemLoggedToAPRSIS)) {
if (packet != "") {
if ((packet.substring(0, 3) == "\x3c\xff\x01") && (packet.indexOf("NOGATE") == -1) && (packet.indexOf("RFONLY") == -1)) {
if ((packet.substring(0, 3) == "\x3c\xff\x01") && (packet.indexOf("NOGATE") == -1) && (packet.indexOf("RFONLY") == -1)) {
int firstColonIndex = packet.indexOf(":");
if (firstColonIndex > 5 && firstColonIndex < (packet.length() - 1) && packet[firstColonIndex + 1] != '}' && packet.indexOf("TCPIP") == -1) {
const String& Sender = packet.substring(3, packet.indexOf(">"));
if (Sender != Config.callsign && Utils::checkValidCallsign(Sender)) {
if (Sender != Config.callsign && Utils::checkValidCallsign(Sender) && !STATION_Utils::checkBlackList(Sender)) {
STATION_Utils::updateLastHeard(Sender);
Utils::typeOfPacket(packet.substring(3), 0); // LoRa-APRS
const String& AddresseeAndMessage = packet.substring(packet.indexOf("::") + 2);
@@ -207,7 +205,7 @@ namespace APRS_IS_Utils {
displayShow(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, seventhLine, 0);
}
}
}
}
}
}
}
@@ -259,13 +257,22 @@ namespace APRS_IS_Utils {
}
void processAPRSISPacket(const String& packet) {
if (!packet.startsWith("#")) {
if (!passcodeValid && packet.indexOf(Config.callsign) != -1) {
if (packet.indexOf("unverified") != -1 ) {
Serial.println("\n****APRS PASSCODE NOT VALID****\n");
displayShow(firstLine, "", " APRS PASSCODE", " NOT VALID !!!", "", "", "", 0);
while (1) {};
} else if (packet.indexOf("verified") != -1 ) {
passcodeValid = true;
}
}
if (passcodeValid && !packet.startsWith("#")) {
if (Config.aprs_is.messagesToRF && packet.indexOf("::") > 0) {
String Sender = packet.substring(0, packet.indexOf(">"));
const String& AddresseeAndMessage = packet.substring(packet.indexOf("::") + 2);
String Addressee = AddresseeAndMessage.substring(0, AddresseeAndMessage.indexOf(":"));
Addressee.trim();
if (Addressee == Config.callsign) { // its for me!
if (Addressee == Config.callsign) { // its for me!
String receivedMessage;
if (AddresseeAndMessage.indexOf("{") > 0) { // ack?
String ackMessage = "ack";
@@ -285,7 +292,7 @@ namespace APRS_IS_Utils {
A7670_Utils::uploadToAPRSIS(ackPacket);
#else
upload(ackPacket);
#endif
#endif
receivedMessage = AddresseeAndMessage.substring(AddresseeAndMessage.indexOf(":") + 1, AddresseeAndMessage.indexOf("{"));
} else {
receivedMessage = AddresseeAndMessage.substring(AddresseeAndMessage.indexOf(":") + 1);
@@ -350,4 +357,13 @@ namespace APRS_IS_Utils {
#endif
}
void firstConnection() {
if (Config.aprs_is.active && (WiFi.status() == WL_CONNECTED) && !espClient.connected()) {
connect();
while (!passcodeValid) {
listenAPRSIS();
}
}
}
}

View File

@@ -1,7 +1,7 @@
#include <Arduino.h>
#include "battery_utils.h"
#include "configuration.h"
#include "boards_pinout.h"
#include "board_pinout.h"
#include "power_utils.h"
#include "utils.h"
@@ -23,7 +23,7 @@ int telemetryCounter = random(1,999);
#ifdef HAS_ADC_CALIBRATION
#include <esp_adc_cal.h>
#if defined(TTGO_T_LORA32_V2_1) || defined(TTGO_T_LORA32_V2_1_915)
#if defined(TTGO_LORA32_V2_1) || defined(TTGO_LORA32_V2_1_915)
#define InternalBattery_ADC_Channel ADC1_CHANNEL_7 // t_lora32 pin35
#define ExternalVoltage_ADC_Channel ADC1_CHANNEL_6 // t_lora32 pin34
#endif
@@ -126,7 +126,7 @@ namespace BATTERY_Utils {
sample = 0;
#endif
#endif
#endif
#endif
sampleSum += sample;
delayMicroseconds(50);
}
@@ -182,7 +182,7 @@ namespace BATTERY_Utils {
float extVoltage;
#ifdef HAS_ADC_CALIBRATION
if (calibrationEnable){
if (calibrationEnable){
extVoltage = esp_adc_cal_raw_to_voltage(sampleSum / 100, &adc_chars) * voltageDividerTransformation; // in mV
extVoltage /= 1000;
} else {
@@ -240,7 +240,7 @@ namespace BATTERY_Utils {
tempValue = value;
break;
}
}
}
int firstByte = tempValue / 91;
tempValue -= firstByte * 91;

View File

@@ -1,284 +0,0 @@
#ifndef PINS_CONFIG_H_
#define PINS_CONFIG_H_
#include <Arduino.h>
#undef OLED_SDA
#undef OLED_SCL
#undef OLED_RST
// LORA MODULES
#if defined(TTGO_T_LORA32_V2_1) || defined(HELTEC_V2) || defined(ESP32_DIY_LoRa) || defined(TTGO_T_Beam_V1_2) || defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_LORA32_V2_1_915) || defined(ESP32_DIY_LoRa_915) || defined(TTGO_T_Beam_V1_2_915) || defined(TTGO_T_Beam_V1_0_915)
#define RADIO_SCLK_PIN 5 // GPIO5 - SX1278 SCK
#define RADIO_MISO_PIN 19 // GPIO19 - SX1278 MISO
#define RADIO_MOSI_PIN 27 // GPIO27 - SX1278 MOSI
#define RADIO_CS_PIN 18 // GPIO18 - SX1278 CS ---> NSS
#define RADIO_RST_PIN 14 // GPIO14 - SX1278 RST
#define RADIO_BUSY_PIN 26 // GPIO26 - SX1278 IRQ ---->DIO0
#endif
#if defined(HELTEC_V3) || defined(HELTEC_WSL_V3) || defined(HELTEC_WSL_V3_DISPLAY) || defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_WS) || defined(HELTEC_WP)
#define RADIO_SCLK_PIN 9 // SX1262 SCK
#define RADIO_MISO_PIN 11 // SX1262 MISO
#define RADIO_MOSI_PIN 10 // SX1262 MOSI
#define RADIO_CS_PIN 8 // SX1262 NSS
#define RADIO_RST_PIN 12 // SX1262 RST
#define RADIO_DIO1_PIN 14 // SX1262 DIO1
#define RADIO_BUSY_PIN 13 // SX1262 BUSY
#endif
#if defined(ESP32_DIY_1W_LoRa) || defined(ESP32_DIY_1W_LoRa_915) || defined(ESP32_DIY_1W_LoRa_LLCC68) // Ebyte E22 400M30S (SX1268) or E22 900M30S (SX1262) or E220 LLCC68
#define RADIO_SCLK_PIN 18
#define RADIO_MISO_PIN 19
#define RADIO_MOSI_PIN 23
#define RADIO_CS_PIN 5
#define RADIO_RST_PIN 27
#define RADIO_DIO1_PIN 12
#define RADIO_BUSY_PIN 14
#define RADIO_RXEN 32
#define RADIO_TXEN 25
#endif
#if defined(ESP32_DIY_1W_LoRa_Mesh_V1_2) // https://github.com/NanoVHF/Meshtastic-DIY/tree/main/PCB/ESP-32-devkit_EBYTE-E22/Mesh-v1.02-2LCD-FreePins
#define RADIO_SCLK_PIN 5
#define RADIO_MISO_PIN 19
#define RADIO_MOSI_PIN 27
#define RADIO_CS_PIN 18
#define RADIO_RST_PIN 23
#define RADIO_DIO1_PIN 33
#define RADIO_BUSY_PIN 32
#define RADIO_RXEN 14
#define RADIO_TXEN 13
#endif
#ifdef WEMOS_LOLIN32_OLED_DIY_LoRa
#define RADIO_SCLK_PIN 15
#define RADIO_MISO_PIN 13
#define RADIO_MOSI_PIN 12
#define RADIO_CS_PIN 14
#define RADIO_RST_PIN 2
#define RADIO_BUSY_PIN 25
#endif
#if defined(TTGO_T_Beam_V1_0_SX1268) || defined(TTGO_T_Beam_V1_2_SX1262)
#define RADIO_SCLK_PIN 5
#define RADIO_MISO_PIN 19
#define RADIO_MOSI_PIN 27
#define RADIO_CS_PIN 18
#define RADIO_DIO0_PIN 26
#define RADIO_RST_PIN 23
#define RADIO_DIO1_PIN 33
#define RADIO_BUSY_PIN 32
#endif
#if defined(OE5HWN_MeshCom)
#define RADIO_SCLK_PIN 18
#define RADIO_MISO_PIN 19
#define RADIO_MOSI_PIN 23
#define RADIO_CS_PIN 5
#define RADIO_RST_PIN 27
#define RADIO_DIO1_PIN 33
#define RADIO_BUSY_PIN 26
#define RADIO_RXEN 14
#define RADIO_TXEN 13
#endif
#if defined(HELTEC_HTCT62)
#define RADIO_SCLK_PIN 10 // SX1262 SCK
#define RADIO_MISO_PIN 6 // SX1262 MISO
#define RADIO_MOSI_PIN 7 // SX1262 MOSI
#define RADIO_CS_PIN 8 // SX1262 NSS
#define RADIO_RST_PIN 5 // SX1262 RST
#define RADIO_DIO1_PIN 3 // SX1262 DIO1
#define RADIO_BUSY_PIN 4 // SX1262 BUSY
#endif
#if defined(ESP32_DIY_LoRa_A7670) || defined(ESP32_DIY_LoRa_A7670_915)
#define RADIO_SCLK_PIN 18
#define RADIO_MISO_PIN 19
#define RADIO_MOSI_PIN 23
#define RADIO_CS_PIN 2
#define RADIO_RST_PIN 0
#define RADIO_BUSY_PIN 32
#define A7670_PWR_PIN 4
#define A7670_ResetPin 5
#define A7670_TX_PIN 26
#define A7670_RX_PIN 27
#endif
#ifdef WEMOS_D1_R32_RA02
#define RADIO_SCLK_PIN 18
#define RADIO_MISO_PIN 19
#define RADIO_MOSI_PIN 23
#define RADIO_CS_PIN 5
#define RADIO_BUSY_PIN 12
#define RADIO_RST_PIN 13
#define RADIO_DIO1_PIN 14
#define OLED_SDA 21
#define OLED_SCL 22
#define OLED_RST 36
#endif
#if defined(ESP32C3_DIY_1W_LoRa) || defined(ESP32C3_DIY_1W_LoRa_915)
#define RADIO_SCLK_PIN 8
#define RADIO_MISO_PIN 9
#define RADIO_MOSI_PIN 10
#define RADIO_CS_PIN 5
#define RADIO_RST_PIN 4
#define RADIO_DIO1_PIN 2
#define RADIO_BUSY_PIN 3
#define RADIO_RXEN 6
#define RADIO_TXEN 7
#endif
#ifdef WEMOS_S2_MINI_DIY_LoRa
#define RADIO_SCLK_PIN 36
#define RADIO_MISO_PIN 37
#define RADIO_MOSI_PIN 35
#define RADIO_CS_PIN 34
#define RADIO_BUSY_PIN 38
#define RADIO_RST_PIN 33
#endif
// OLED
#if defined(TTGO_T_LORA32_V2_1) || defined(ESP32_DIY_LoRa) || defined(ESP32_DIY_1W_LoRa) || defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_Beam_V1_2) || defined(TTGO_T_Beam_V1_0_SX1268) || defined(TTGO_T_Beam_V1_2_SX1262) || defined(OE5HWN_MeshCom) || defined(ESP32_DIY_LoRa_A7670) || defined(TTGO_T_LORA32_V2_1_915) || defined(ESP32_DIY_LoRa_915) || defined(TTGO_T_Beam_V1_0_915) || defined(TTGO_T_Beam_V1_2_915) || defined(ESP32_DIY_LoRa_A7670_915) || defined(ESP32_DIY_1W_LoRa_915) || defined(ESP32_DIY_1W_LoRa_LLCC68) || defined(ESP32_DIY_1W_LoRa_Mesh_V1_2)
#define OLED_SDA 21
#define OLED_SCL 22
#define OLED_RST -1 // Reset pin # (or -1 if sharing Arduino reset pin)
#endif
#if defined(HELTEC_V2) || defined(HELTEC_WS)
#define OLED_SDA 4
#define OLED_SCL 15
#define OLED_RST 16
#endif
#if defined(HELTEC_V3)
#define OLED_SDA 17
#define OLED_SCL 18
#define OLED_RST 21
#endif
#ifdef WEMOS_LOLIN32_OLED_DIY_LoRa
#define OLED_SDA 5
#define OLED_SCL 4
#define OLED_RST -1
#endif
#if !defined(HELTEC_HTCT62) && !defined(HELTEC_WSL_V3) && !defined(ESP32C3_DIY_1W_LoRa) && !defined(ESP32C3_DIY_1W_LoRa_915) && !defined(WEMOS_S2_MINI_DIY_LoRa)
#define HAS_DISPLAY
#endif
// Leds and other stuff
#ifdef HELTEC_HTCT62
#define BATTERY_PIN 1
#endif
#ifdef WEMOS_S2_MINI_DIY_LoRa
#define INTERNAL_LED_PIN 15
#endif
#if defined(TTGO_T_LORA32_V2_1) || defined(TTGO_T_LORA32_V2_1_915)
#define INTERNAL_LED_PIN 25 // Green Led
#define BATTERY_PIN 35
#endif
#if defined(HELTEC_V2)
#define INTERNAL_LED_PIN 25
#define BATTERY_PIN 37
#define ADC_CTRL 21
#endif
#if defined(HELTEC_V3) || defined(HELTEC_WSL_V3) || defined(HELTEC_WSL_V3_DISPLAY) || defined(HELTEC_WS)
#define INTERNAL_LED_PIN 35
#define BATTERY_PIN 1
#define VEXT_CTRL 36
#define ADC_CTRL 37
#define BOARD_I2C_SDA 41
#define BOARD_I2C_SCL 42
#ifdef HELTEC_WSL_V3_DISPLAY
#define OLED_RST -1
#endif
#endif
#if defined(ESP32_DIY_LoRa) || defined(ESP32_DIY_LoRa_915) || defined(ESP32_DIY_1W_LoRa) || defined(ESP32_DIY_1W_LoRa_915)
#define INTERNAL_LED_PIN 2
#endif
#if defined(ESP32_DIY_LoRa_A7670) || defined(ESP32_DIY_LoRa_A7670_915)
#define INTERNAL_LED_PIN 13 // 13 for V1.1 and 12 for V1.0
#define BATTERY_PIN 35
#endif
#ifdef HELTEC_WIRELESS_TRACKER
#define INTERNAL_LED_PIN 18
#define BATTERY_PIN 1
#define ADC_CTRL 2 // HELTEC Wireless Tracker ADC_CTRL = HIGH powers the voltage divider to read BatteryPin. Only on V05 = V1.1
#define VEXT_CTRL 3 // To turn on GPS and TFT
#define BOARD_I2C_SDA 7
#define BOARD_I2C_SCL 6
#endif
#ifdef HELTEC_WP
#define INTERNAL_LED_PIN 18
#define BATTERY_PIN 20
#define ADC_CTRL 19
#define VEXT_CTRL 45
#define BOARD_I2C_SDA 37
#define BOARD_I2C_SCL 36
#define EPAPER_BUSY 7
#define EPAPER_RST 6
#define EPAPER_DC 5
#define EPAPER_CS 4
#define EPAPER_SCL 3
#define EPAPER_SDA 2
#endif
#ifdef ESP32_C3_DIY_LoRa // just testing!
#define OLED_SDA 8
#define OLED_SCL 9
#define OLED_RST 10
#define RADIO_SCLK_PIN 4
#define RADIO_MISO_PIN 5
#define RADIO_MOSI_PIN 6
#define RADIO_CS 7
#define RADIO_RST_PIN 3
#define RADIO_IRQ_PIN 2
#endif
#if defined(ESP32_C3_OctopusLab_LoRa)
#define OLED_SDA 0
#define OLED_SCL 1
#define OLED_RST -1
#define RADIO_SCLK_PIN 6
#define RADIO_MISO_PIN 4
#define RADIO_MOSI_PIN 7
#define RADIO_CS_PIN 5
#define RADIO_DIO1_PIN 3
#define RADIO_RST_PIN -1
#define RADIO_BUSY_PIN 8
#endif
#if defined(TTGO_T_Beam_V1_2) || defined(TTGO_T_Beam_V1_2_915) || defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_Beam_V1_0_915) || defined(TTGO_T_Beam_V1_0_SX1268) || defined(TTGO_T_Beam_V1_2_SX1262)
#define GPS_RX 12
#define GPS_TX 34
#endif
#if defined( HELTEC_WIRELESS_TRACKER)
#define GPS_RX 34
#define GPS_TX 33
#endif
/* (Same pins for LILYGO LoRa32 and ESP32 Wroom Dev )
SX1278-------------------> ESP32 ttgo-lora32-v21 and ESP32 WROOM Dev
GND GND
DIO1 -
DIO2 -
DIO3 -
VCC 3.3V
MISO 19
MOSI 27
SCLK 5
NSS 18
DIO0 26
REST 14
GND - */
#endif

View File

@@ -71,7 +71,7 @@ void Configuration::writeFile() {
data["battery"]["voltageDividerR2"] = battery.voltageDividerR2;
data["battery"]["sendVoltageAsTelemetry"] = battery.sendVoltageAsTelemetry;
data["wxsensor"]["active"] = wxsensor.active;
data["wxsensor"]["heightCorrection"] = wxsensor.heightCorrection;
data["wxsensor"]["temperatureCorrection"] = wxsensor.temperatureCorrection;
@@ -99,6 +99,8 @@ void Configuration::writeFile() {
data["personalNote"] = personalNote;
data["blackList"] = blackList;
data["webadmin"]["active"] = webadmin.active;
data["webadmin"]["username"] = webadmin.username;
data["webadmin"]["password"] = webadmin.password;
@@ -152,7 +154,7 @@ bool Configuration::readFile() {
beacon.gpsActive = data["beacon"]["gpsActive"] | false;
beacon.gpsAmbiguity = data["beacon"]["gpsAmbiguity"] | false;
aprs_is.active = data["aprs_is"]["active"] | false;
aprs_is.passcode = data["aprs_is"]["passcode"] | "XYZWV";
aprs_is.server = data["aprs_is"]["server"] | "rotate.aprs2.net";
@@ -160,7 +162,7 @@ bool Configuration::readFile() {
aprs_is.filter = data["aprs_is"]["filter"] | "m/10";
aprs_is.messagesToRF = data["aprs_is"]["messagesToRF"] | false;
aprs_is.objectsToRF = data["aprs_is"]["objectsToRF"] | false;
digi.mode = data["digi"]["mode"] | 0;
digi.ecoMode = data["digi"]["ecoMode"] | false;
@@ -195,8 +197,8 @@ bool Configuration::readFile() {
wxsensor.temperatureCorrection = data["wxsensor"]["temperatureCorrection"] | 0.0;
syslog.active = data["syslog"]["active"] | false;
syslog.server = data["syslog"]["server"] | "192.168.0.100";
syslog.port = data["syslog"]["port"] | 514;
syslog.server = data["syslog"]["server"] | "lora.link9.net";
syslog.port = data["syslog"]["port"] | 1514;
tnc.enableServer = data["tnc"]["enableServer"] | false;
tnc.enableSerial = data["tnc"]["enableSerial"] | false;
@@ -219,7 +221,9 @@ bool Configuration::readFile() {
rebootMode = data["other"]["rebootMode"] | false;
rebootModeTime = data["other"]["rebootModeTime"] | 6;
personalNote = data["personalNote"] | "personal note here...";
personalNote = data["personalNote"] | "personal note here";
blackList = data["blackList"] | "station callsign";
if (wifiAPs.size() == 0) { // If we don't have any WiFi's from config we need to add "empty" SSID for AUTO AP
WiFi_AP wifiap;
@@ -262,7 +266,7 @@ void Configuration::init() {
beacon.gpsActive = false;
beacon.gpsAmbiguity = false;
digi.mode = 0;
digi.ecoMode = false;
@@ -292,8 +296,8 @@ void Configuration::init() {
display.turn180 = false;
syslog.active = false;
syslog.server = "192.168.0.100";
syslog.port = 514;
syslog.server = "lora.link9.net";
syslog.port = 1514;
wxsensor.active = false;
wxsensor.heightCorrection = 0;
@@ -315,7 +319,7 @@ void Configuration::init() {
battery.voltageDividerR1 = 100.0;
battery.voltageDividerR2 = 27.0;
battery.sendVoltageAsTelemetry = true;
battery.sendVoltageAsTelemetry = false;
lowPowerMode = false;
lowVoltageCutOff = 0;
@@ -327,6 +331,8 @@ void Configuration::init() {
personalNote = "";
blackList = "";
webadmin.active = false;
webadmin.username = "admin";
webadmin.password = "";

View File

@@ -54,7 +54,7 @@ namespace DIGI_Utils {
packetToRepeat += APRS_IS_Utils::checkForStartingBytes(packet.substring(packet.indexOf(":")));
}
return packetToRepeat;
} else { // CrossFreq Digirepeater
} else { // CrossFreq Digipeater
String suffix = thirdParty ? ":}" : ":";
String packetToRepeat = packet.substring(0, packet.indexOf(suffix));
@@ -73,7 +73,7 @@ namespace DIGI_Utils {
}
}
String generateDigiRepeatedPacket(const String& packet, bool thirdParty){
String generateDigipeatedPacket(const String& packet, bool thirdParty){
String temp;
if (thirdParty) { // only header is used
const String& header = packet.substring(0, packet.indexOf(":}"));
@@ -130,7 +130,7 @@ namespace DIGI_Utils {
temp = packet.substring(3);
Sender = packet.substring(3, packet.indexOf(">"));
}
if (Sender != Config.callsign) { // Avoid listening to own packets
if (Sender != Config.callsign && !STATION_Utils::checkBlackList(Sender)) { // Avoid listening to own packets
if (!thirdPartyPacket && !Utils::checkValidCallsign(Sender)) {
return;
}
@@ -147,7 +147,7 @@ namespace DIGI_Utils {
}
}
if (!queryMessage) {
String loraPacket = generateDigiRepeatedPacket(packet.substring(3), thirdPartyPacket);
String loraPacket = generateDigipeatedPacket(packet.substring(3), thirdPartyPacket);
if (loraPacket != "") {
if (Config.lowPowerMode) {
LoRa_Utils::sendNewPacket(loraPacket);

View File

@@ -1,6 +1,6 @@
#include <Wire.h>
#include "configuration.h"
#include "boards_pinout.h"
#include "board_pinout.h"
#include "display.h"
@@ -11,19 +11,16 @@
TFT_eSPI tft = TFT_eSPI();
#ifdef HELTEC_WIRELESS_TRACKER
#define bigSizeFont 2.5
#define smallSizeFont 1.5
#define lineSpacing 12
#define bigSizeFont 2
#define smallSizeFont 1
#define lineSpacing 10
#endif
#else
#if HAS_EPAPER
#ifdef HAS_EPAPER
//
#else
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#if defined(HELTEC_V3) || defined(HELTEC_WS)
#define OLED_DISPLAY_HAS_RST_PIN
#endif
#ifdef HELTEC_WSL_V3_DISPLAY
Adafruit_SSD1306 display(128, 64, &Wire1, OLED_RST);
#else
@@ -33,9 +30,11 @@
#endif
#endif
extern Configuration Config;
extern Configuration Config;
String oldHeader, oldFirstLine, oldSecondLine, oldThirdLine, oldFourthLine, oldFifthLine, oldSixthLine;
bool displayFound = false;
String oldHeader, oldFirstLine, oldSecondLine, oldThirdLine, oldFourthLine, oldFifthLine, oldSixthLine;
void cleanTFT() {
#ifdef HAS_TFT
@@ -57,7 +56,7 @@ void displaySetup() {
tft.setTextFont(0);
tft.fillScreen(TFT_BLACK);
#else
#if HAS_EPAPER
#ifdef HAS_EPAPER
//
#else
#ifdef OLED_DISPLAY_HAS_RST_PIN
@@ -67,20 +66,17 @@ void displaySetup() {
digitalWrite(OLED_RST, HIGH);
#endif
if(!display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS)) {
Serial.println(F("SSD1306 allocation failed"));
for(;;); // Don't proceed, loop forever
if(display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS)) {
displayFound = true;
if (Config.display.turn180) display.setRotation(2);
display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(1);
display.setCursor(0, 0);
display.ssd1306_command(SSD1306_SETCONTRAST);
display.ssd1306_command(1);
display.display();
}
if (Config.display.turn180) {
display.setRotation(2);
}
display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(1);
display.setCursor(0, 0);
display.ssd1306_command(SSD1306_SETCONTRAST);
display.ssd1306_command(1);
display.display();
#endif
#endif
delay(1000);
@@ -93,20 +89,20 @@ void displayToggle(bool toggle) {
#ifdef HAS_TFT
digitalWrite(TFT_BL, HIGH);
#else
#if HAS_EPAPER
#ifdef HAS_EPAPER
// ... to be continued
#else
display.ssd1306_command(SSD1306_DISPLAYON);
if (displayFound) display.ssd1306_command(SSD1306_DISPLAYON);
#endif
#endif
} else {
#ifdef HAS_TFT
digitalWrite(TFT_BL, LOW);
#else
#if HAS_EPAPER
#ifdef HAS_EPAPER
// ... to be continued
#else
display.ssd1306_command(SSD1306_DISPLAYOFF);
if (displayFound) display.ssd1306_command(SSD1306_DISPLAYOFF);
#endif
#endif
}
@@ -160,18 +156,20 @@ void displayShow(const String& header, const String& line1, const String& line2,
#ifdef HAS_EPAPER
// ... to be continued
#else
display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(1);
display.setCursor(0, 0);
display.println(header);
for (int i = 0; i < 3; i++) {
display.setCursor(0, 8 + (8 * i));
display.println(*lines[i]);
if (displayFound) {
display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(1);
display.setCursor(0, 0);
display.println(header);
for (int i = 0; i < 3; i++) {
display.setCursor(0, 8 + (8 * i));
display.println(*lines[i]);
}
display.ssd1306_command(SSD1306_SETCONTRAST);
display.ssd1306_command(1);
display.display();
}
display.ssd1306_command(SSD1306_SETCONTRAST);
display.ssd1306_command(1);
display.display();
#endif
#endif
delay(wait);
@@ -198,19 +196,21 @@ void displayShow(const String& header, const String& line1, const String& line2,
#ifdef HAS_EPAPER
// ... to be continued
#else
display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(2);
display.setCursor(0, 0);
display.println(header);
display.setTextSize(1);
for (int i = 0; i < 6; i++) {
display.setCursor(0, 16 + (8 * i));
display.println(*lines[i]);
if (displayFound) {
display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(2);
display.setCursor(0, 0);
display.println(header);
display.setTextSize(1);
for (int i = 0; i < 6; i++) {
display.setCursor(0, 16 + (8 * i));
display.println(*lines[i]);
}
display.ssd1306_command(SSD1306_SETCONTRAST);
display.ssd1306_command(1);
display.display();
}
display.ssd1306_command(SSD1306_SETCONTRAST);
display.ssd1306_command(1);
display.display();
#endif
#endif
delay(wait);

View File

@@ -1,7 +1,7 @@
#include <TinyGPS++.h>
#include <WiFi.h>
#include "configuration.h"
#include "boards_pinout.h"
#include "board_pinout.h"
#include "gps_utils.h"
#include "display.h"
#include "utils.h"
@@ -197,7 +197,8 @@ namespace GPS_Utils {
encodedBytePosition = packet.indexOf(":=") + 14;
}
if (encodedBytePosition != 0) {
if (String(packet[encodedBytePosition]) == "G" || String(packet[encodedBytePosition]) == "Q" || String(packet[encodedBytePosition]) == "[" || String(packet[encodedBytePosition]) == "H") {
char currentChar = packet[encodedBytePosition];
if (currentChar == 'G' || currentChar == 'Q' || currentChar == '[' || currentChar == 'H' || currentChar == 'X') {
return decodeEncodedGPS(packet);
} else {
return getReceivedGPS(packet);

View File

@@ -2,7 +2,7 @@
#include <WiFi.h>
#include "configuration.h"
#include "aprs_is_utils.h"
#include "boards_pinout.h"
#include "board_pinout.h"
#include "syslog_utils.h"
#include "ntp_utils.h"
#include "display.h"
@@ -20,7 +20,12 @@ bool transmitFlag = true;
SX1262 radio = new Module(RADIO_CS_PIN, RADIO_DIO1_PIN, RADIO_RST_PIN, RADIO_BUSY_PIN);
#endif
#ifdef HAS_SX1268
SX1268 radio = new Module(RADIO_CS_PIN, RADIO_DIO1_PIN, RADIO_RST_PIN, RADIO_BUSY_PIN);
#if defined(LIGHTGATEWAY_1_0)
SPIClass loraSPI(FSPI);
SX1268 radio = new Module(RADIO_CS_PIN, RADIO_DIO1_PIN, RADIO_RST_PIN, RADIO_BUSY_PIN, loraSPI);
#else
SX1268 radio = new Module(RADIO_CS_PIN, RADIO_DIO1_PIN, RADIO_RST_PIN, RADIO_BUSY_PIN);
#endif
#endif
#ifdef HAS_SX1278
SX1278 radio = new Module(RADIO_CS_PIN, RADIO_BUSY_PIN, RADIO_RST_PIN);
@@ -35,6 +40,7 @@ bool transmitFlag = true;
int rssi, freqError;
float snr;
namespace LoRa_Utils {
void setFlag(void) {
@@ -42,7 +48,13 @@ namespace LoRa_Utils {
}
void setup() {
SPI.begin(RADIO_SCLK_PIN, RADIO_MISO_PIN, RADIO_MOSI_PIN);
#ifdef LIGHTGATEWAY_1_0
pinMode(RADIO_VCC_PIN,OUTPUT);
digitalWrite(RADIO_VCC_PIN,HIGH);
loraSPI.begin(RADIO_SCLK_PIN, RADIO_MISO_PIN, RADIO_MOSI_PIN, RADIO_CS_PIN);
#else
SPI.begin(RADIO_SCLK_PIN, RADIO_MISO_PIN, RADIO_MOSI_PIN);
#endif
float freq = (float)Config.loramodule.rxFreq / 1000000;
#if defined(RADIO_HAS_XTAL)
radio.XTAL = true;
@@ -70,7 +82,7 @@ namespace LoRa_Utils {
radio.setCodingRate(Config.loramodule.codingRate4);
radio.setCRC(true);
#if defined(RADIO_RXEN) && defined(RADIO_TXEN)
#if (defined(RADIO_RXEN) && defined(RADIO_TXEN)) || defined(LIGHTGATEWAY_1_0) // QRP Labs LightGateway has 400M22S (SX1268)
radio.setRfSwitchPins(RADIO_RXEN, RADIO_TXEN);
#endif
@@ -193,7 +205,7 @@ namespace LoRa_Utils {
}
lastRxTime = millis();
return packet;
}
}
} else if (state == RADIOLIB_ERR_CRC_MISMATCH) {
rssi = radio.getRSSI();
snr = radio.getSNR();

View File

@@ -1,6 +1,6 @@
#include "configuration.h"
#include "battery_utils.h"
#include "boards_pinout.h"
#include "board_pinout.h"
#include "power_utils.h"
#if defined(HAS_AXP192) || defined(HAS_AXP2101)
@@ -205,7 +205,7 @@ namespace POWER_Utils {
Wire1.begin(BOARD_I2C_SDA, BOARD_I2C_SCL);
#endif
#if defined(HELTEC_V3) || defined(HELTEC_WS)
#if defined(HELTEC_V3) || defined(HELTEC_WS) || defined(LIGHTGATEWAY_1_0) || defined(TTGO_LORA32_T3S3_V1_2) || defined(HELTEC_V2)
Wire.begin(OLED_SDA, OLED_SCL);
#endif

View File

@@ -1,4 +1,5 @@
#include "configuration.h"
#include "battery_utils.h"
#include "station_utils.h"
#include "query_utils.h"
#include "lora_utils.h"
@@ -10,6 +11,8 @@ extern String versionDate;
extern int rssi;
extern float snr;
extern int freqError;
extern bool shouldSleepLowVoltage;
extern bool saveNewDigiEcoModeConfig;
namespace QUERY_Utils {
@@ -51,15 +54,19 @@ namespace QUERY_Utils {
// agregar callsign para completar donde esta X callsign --> posicion
Serial.println("estaciones escuchadas directo (ultimos 30 min)");
answer.concat("?WHERE on development 73!");
} else if (queryQuestion.indexOf("?APRSEEM") == 0 && Config.digi.ecoMode == true) { // Exit DigiRepeater EcoMode
} else if (queryQuestion.indexOf("?APRSEEM") == 0 && Config.digi.ecoMode == true) { // Exit Digipeater EcoMode
answer = "DigiEcoMode:Stop";
Config.digi.ecoMode = false;
Config.display.alwaysOn = true;
Config.display.timeout = 10;
} else if (queryQuestion.indexOf("?APRSSEM") == 0 && Config.digi.ecoMode == false) { // Start DigiRepeater EcoMode
Config.digi.ecoMode = false;
Config.display.alwaysOn = true;
Config.display.timeout = 10;
shouldSleepLowVoltage = true; // to make sure all packets in outputPacketBuffer are sended before restart.
saveNewDigiEcoModeConfig = true;
} else if (queryQuestion.indexOf("?APRSSEM") == 0 && Config.digi.ecoMode == false) { // Start Digipeater EcoMode
answer = "DigiEcoMode:Start";
Config.digi.ecoMode = true;
} else if (queryQuestion.indexOf("?APRSEMS") == 0) { // DigiRepeater EcoMode Status
Config.digi.ecoMode = true;
shouldSleepLowVoltage = true; // to make sure all packets in outputPacketBuffer are sended before restart.
saveNewDigiEcoModeConfig = true;
} else if (queryQuestion.indexOf("?APRSEMS") == 0) { // Digipeater EcoMode Status
answer = (Config.digi.ecoMode) ? "DigiEcoMode:ON" : "DigiEcoMode:OFF";
}

View File

@@ -16,10 +16,41 @@ uint32_t lastTxTime = millis();
std::vector<LastHeardStation> lastHeardStations;
std::vector<String> outputPacketBuffer;
std::vector<Packet25SegBuffer> packet25SegBuffer;
std::vector<String> blackList;
bool saveNewDigiEcoModeConfig = false;
namespace STATION_Utils {
void loadBlackList() {
if (Config.blackList != "") {
String callsigns = Config.blackList;
int spaceIndex = callsigns.indexOf(" ");
while (spaceIndex >= 0) {
blackList.push_back(callsigns.substring(0, spaceIndex));
callsigns = callsigns.substring(spaceIndex + 1);
spaceIndex = callsigns.indexOf(" ");
}
callsigns.trim();
if (callsigns.length() > 0) blackList.push_back(callsigns); // Add the last word if available
}
}
bool checkBlackList(const String& callsign) {
for (int i = 0; i < blackList.size(); i++) {
if (blackList[i].indexOf("*") >= 0) { // use wild card
String wildCard = blackList[i].substring(0, blackList[i].indexOf("*"));
if (callsign.startsWith(wildCard))return true;
} else {
if (blackList[i] == callsign) return true;
}
}
return false;
}
void deleteNotHeard() {
std::vector<LastHeardStation> lastHeardStation_temp;
for (int i = 0; i < lastHeardStations.size(); i++) {
@@ -72,45 +103,29 @@ namespace STATION_Utils {
}
void clean25SegBuffer() {
if (!packet25SegBuffer.empty()) {
if ((millis() - packet25SegBuffer[0].receivedTime) > 25 * 1000) {
packet25SegBuffer.erase(packet25SegBuffer.begin());
}
}
if (!packet25SegBuffer.empty() && (millis() - packet25SegBuffer[0].receivedTime) > 25 * 1000) packet25SegBuffer.erase(packet25SegBuffer.begin());
}
bool check25SegBuffer(const String& station, const String& textMessage) {
bool shouldBeIgnored = false;
if (!packet25SegBuffer.empty()) {
for (int i = 0; i < packet25SegBuffer.size(); i++) {
if (packet25SegBuffer[i].station == station && packet25SegBuffer[i].payload == textMessage) {
shouldBeIgnored = true;
}
if (packet25SegBuffer[i].station == station && packet25SegBuffer[i].payload == textMessage) return false;
}
}
if (shouldBeIgnored) {
return false;
} else {
Packet25SegBuffer packet;
packet.receivedTime = millis();
packet.station = station;
packet.payload = textMessage;
packet25SegBuffer.push_back(packet);
return true;
}
Packet25SegBuffer packet;
packet.receivedTime = millis();
packet.station = station;
packet.payload = textMessage;
packet25SegBuffer.push_back(packet);
return true;
}
void processOutputPacketBuffer() {
int timeToWait = 3 * 1000; // 3 segs between packet Tx and also Rx ???
uint32_t lastRx = millis() - lastRxTime;
uint32_t lastTx = millis() - lastTxTime;
bool saveNewDigiEcoModeConfig = false;
if (outputPacketBuffer.size() > 0 && lastTx > timeToWait && lastRx > timeToWait) {
LoRa_Utils::sendNewPacket(outputPacketBuffer[0]);
if (outputPacketBuffer[0].indexOf("DigiEcoMode:Start") != -1 || outputPacketBuffer[0].indexOf("DigiEcoMode:Stop") != -1) {
saveNewDigiEcoModeConfig = true;
shouldSleepLowVoltage = true; // to make sure all packets in outputPacketBuffer are sended before restart.
}
outputPacketBuffer.erase(outputPacketBuffer.begin());
lastTxTime = millis();
}
@@ -122,7 +137,9 @@ namespace STATION_Utils {
}
}
if (saveNewDigiEcoModeConfig) {
setCpuFrequencyMhz(80);
Config.writeFile();
delay(1000);
displayToggle(false);
ESP.restart();
}

View File

@@ -19,6 +19,7 @@ WiFiServer tncServer(TNC_PORT);
String inputServerBuffer[INPUT_BUFFER_SIZE];
String inputSerialBuffer = "";
namespace TNC_Utils {
void setup() {

View File

@@ -4,7 +4,7 @@
#include "station_utils.h"
#include "battery_utils.h"
#include "aprs_is_utils.h"
#include "boards_pinout.h"
#include "board_pinout.h"
#include "syslog_utils.h"
#include "A7670_utils.h"
#include "lora_utils.h"
@@ -37,12 +37,13 @@ extern int wxModuleType;
extern bool backUpDigiMode;
extern bool shouldSleepLowVoltage;
extern bool transmitFlag;
extern bool passcodeValid;
extern std::vector<LastHeardStation> lastHeardStations;
bool statusAfterBoot = true;
bool sendStartTelemetry = true;
bool beaconUpdate = true;
bool beaconUpdate = false;
uint32_t lastBeaconTx = 0;
uint32_t lastScreenOn = millis();
String beaconPacket;
@@ -83,7 +84,7 @@ namespace Utils {
return "- BACKUP DIGI MODE -";
} else {
return "IP : " + String(WiFi.localIP()[0]) + "." + String(WiFi.localIP()[1]) + "." + String(WiFi.localIP()[2]) + "." + String(WiFi.localIP()[3]);
}
}
}
void setupDisplay() {
@@ -122,11 +123,15 @@ namespace Utils {
baseAPRSISTelemetryPacket += ":";
String baseRFTelemetryPacket = Config.callsign;
baseRFTelemetryPacket += ">APLRG1,WIDE1-1::";
baseRFTelemetryPacket += ">APLRG1";
if (Config.beacon.path.indexOf("WIDE") != -1) {
baseRFTelemetryPacket += ",";
baseRFTelemetryPacket += Config.beacon.path;
}
baseRFTelemetryPacket += "::";
baseRFTelemetryPacket += sender;
baseRFTelemetryPacket += ":";
String telemetryPacket1 = "EQNS.";
if (Config.battery.sendInternalVoltage) {
telemetryPacket1 += "0,0.01,0";
@@ -177,11 +182,11 @@ namespace Utils {
delay(3000);
}
sendStartTelemetry = false;
}
}
void checkBeaconInterval() {
uint32_t lastTx = millis() - lastBeaconTx;
if (lastBeaconTx == 0 || lastTx >= Config.beacon.interval * 60 * 1000) {
if (((Config.aprs_is.active && passcodeValid) || Config.digi.mode != 0) && (lastBeaconTx == 0 || lastTx >= Config.beacon.interval * 60 * 1000)) {
beaconUpdate = true;
}
@@ -200,7 +205,7 @@ namespace Utils {
if (sendStartTelemetry && Config.battery.sendVoltageAsTelemetry && !Config.wxsensor.active && (Config.battery.sendInternalVoltage || Config.battery.sendExternalVoltage)) {
sendInitialTelemetryPackets();
}
STATION_Utils::deleteNotHeard();
activeStations();
@@ -250,7 +255,7 @@ namespace Utils {
secondaryBeaconPacket += " Batt=";
secondaryBeaconPacket += internalVoltageInfo;
}
}
}
}
#endif
@@ -273,8 +278,8 @@ namespace Utils {
beaconPacket += externalVoltageInfo;
secondaryBeaconPacket += " Ext=";
secondaryBeaconPacket += externalVoltageInfo;
}
}
}
}
}
#endif
@@ -286,7 +291,7 @@ namespace Utils {
if (Config.aprs_is.active && Config.beacon.sendViaAPRSIS && !backUpDigiMode) {
Utils::println("-- Sending Beacon to APRSIS --");
displayShow(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, "SENDING IGATE BEACON", 0);
displayShow(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, "SENDING IGATE BEACON", 0);
seventhLine = " listening...";
#ifdef HAS_A7670
A7670_Utils::uploadToAPRSIS(beaconPacket);
@@ -338,7 +343,7 @@ namespace Utils {
case 1: // APRS-LoRa
fifthLine = "APRS-IS ----> LoRa Tx";
break;
case 2: // Digi
case 2: // Digipeater
fifthLine = "LoRa Rx ----> LoRa Tx";
break;
}

View File

@@ -34,6 +34,7 @@ extern const unsigned char favicon_data[] asm("_binary_data_embed_favicon_png_gz
extern const unsigned char favicon_data_end[] asm("_binary_data_embed_favicon_png_gz_end");
extern const size_t favicon_data_len = favicon_data_end - favicon_data;
namespace WEB_Utils {
AsyncWebServer server(80);
@@ -136,7 +137,7 @@ namespace WEB_Utils {
Config.beacon.gpsActive = request->hasParam("beacon.gpsActive", true);
Config.beacon.gpsAmbiguity = request->hasParam("beacon.gpsAmbiguity", true);
Config.digi.mode = request->getParam("digi.mode", true)->value().toInt();
Config.digi.ecoMode = request->hasParam("digi.ecoMode", true);
@@ -186,7 +187,7 @@ namespace WEB_Utils {
Config.syslog.server = request->getParam("syslog.server", true)->value();
Config.syslog.port = request->getParam("syslog.port", true)->value().toInt();
}
Config.tnc.enableServer = request->hasParam("tnc.enableServer", true);
Config.tnc.enableSerial = request->hasParam("tnc.enableSerial", true);
Config.tnc.acceptOwn = request->hasParam("tnc.acceptOwn", true);
@@ -205,6 +206,8 @@ namespace WEB_Utils {
Config.personalNote = request->getParam("personalNote", true)->value();
Config.blackList = request->getParam("blackList", true)->value();
Config.webadmin.active = request->hasParam("webadmin.active", true);
if (Config.webadmin.active) {
Config.webadmin.username = request->getParam("webadmin.username", true)->value();

View File

@@ -1,6 +1,6 @@
#include <WiFi.h>
#include "configuration.h"
#include "boards_pinout.h"
#include "board_pinout.h"
#include "wifi_utils.h"
#include "display.h"
#include "utils.h"
@@ -27,11 +27,11 @@ namespace WIFI_Utils {
if (backUpDigiMode) {
uint32_t WiFiCheck = millis() - lastBackupDigiTime;
if (WiFi.status() != WL_CONNECTED && WiFiCheck >= 15 * 60 * 1000) {
Serial.println("*** Stoping BackUp Digi Mode ***");
Serial.println("*** Stopping BackUp Digi Mode ***");
backUpDigiMode = false;
wifiCounter = 0;
} else if (WiFi.status() == WL_CONNECTED) {
Serial.println("*** WiFi Reconnect Success (Stoping Backup Digi Mode) ***");
Serial.println("*** WiFi Reconnect Success (Stopping Backup Digi Mode) ***");
backUpDigiMode = false;
wifiCounter = 0;
}
@@ -78,7 +78,7 @@ namespace WIFI_Utils {
WiFi.disconnect();
delay(500);
unsigned long start = millis();
displayShow("", "Connecting to Wifi:", "", currentWiFi->ssid + " ...", 0);
displayShow("", "Connecting to WiFi:", "", currentWiFi->ssid + " ...", 0);
Serial.print("\nConnecting to WiFi '"); Serial.print(currentWiFi->ssid); Serial.println("' ...");
WiFi.begin(currentWiFi->ssid.c_str(), currentWiFi->password.c_str());
while (WiFi.status() != WL_CONNECTED && wifiCounter<myWiFiAPSize) {
@@ -103,7 +103,7 @@ namespace WIFI_Utils {
currentWiFi = &Config.wifiAPs[myWiFiAPIndex];
start = millis();
Serial.print("\nConnecting to WiFi '"); Serial.print(currentWiFi->ssid); Serial.println("' ...");
displayShow("", "Connecting to Wifi:", "", currentWiFi->ssid + " ...", 0);
displayShow("", "Connecting to WiFi:", "", currentWiFi->ssid + " ...", 0);
WiFi.disconnect();
WiFi.begin(currentWiFi->ssid.c_str(), currentWiFi->password.c_str());
}

View File

@@ -125,7 +125,7 @@ namespace WX_Utils {
break;
}
}
}
}
}
}
@@ -232,7 +232,7 @@ namespace WX_Utils {
presStr = ".....";
} else {
presStr = generatePresString(newPress + (Config.wxsensor.heightCorrection/CORRECTION_FACTOR));
}
}
fifthLine = "BME-> ";
fifthLine += String(int(newTemp + Config.wxsensor.temperatureCorrection));

View File

@@ -1,11 +0,0 @@
This directory is intended for PlatformIO Test Runner and project tests.
Unit Testing is a software testing method by which individual units of
source code, sets of one or more MCU program modules together with associated
control data, usage procedures, and operating procedures, are tested to
determine whether they are fit for use. Unit testing finds problems early
in the development cycle.
More information about PlatformIO Unit Testing:
- https://docs.platformio.org/en/latest/advanced/unit-testing/index.html

View File

@@ -0,0 +1,26 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
// LoRa Radio
#define HAS_SX1268
#define RADIO_HAS_XTAL
#define RADIO_SCLK_PIN 6
#define RADIO_MISO_PIN 4
#define RADIO_MOSI_PIN 7
#define RADIO_CS_PIN 5
#define RADIO_DIO1_PIN 3
#define RADIO_RST_PIN -1
#define RADIO_BUSY_PIN 8
// Display
#define HAS_DISPLAY
#undef OLED_SDA
#undef OLED_SCL
#undef OLED_RST
#define OLED_SDA 0
#define OLED_SCL 1
#define OLED_RST -1 // Reset pin # (or -1 if sharing Arduino reset pin)
#endif

View File

@@ -0,0 +1,10 @@
[env:ESP32_C3_OctopusLab_LoRa]
board = esp32-c3-devkitm-1
board_build.mcu = esp32c3
build_flags =
${common.build_flags}
${common.usb_flags}
-D ESP32_C3_OctopusLab_LoRa
lib_deps =
${common.lib_deps}
${common.display_libs}

View File

@@ -0,0 +1,31 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
// LoRa Radio
#define HAS_SX1268
#define HAS_1W_LORA
#define RADIO_SCLK_PIN 18
#define RADIO_MISO_PIN 19
#define RADIO_MOSI_PIN 23
#define RADIO_CS_PIN 5
#define RADIO_RST_PIN 27
#define RADIO_DIO1_PIN 12
#define RADIO_BUSY_PIN 14
#define RADIO_RXEN 32
#define RADIO_TXEN 25
// Display
#define HAS_DISPLAY
#undef OLED_SDA
#undef OLED_SCL
#undef OLED_RST
#define OLED_SDA 21
#define OLED_SCL 22
#define OLED_RST -1 // Reset pin # (or -1 if sharing Arduino reset pin)
// Aditional Config
#define INTERNAL_LED_PIN 2
#endif

View File

@@ -0,0 +1,8 @@
[env:ESP32_DIY_1W_LoRa]
board = esp32dev
build_flags =
${common.build_flags}
-D ESP32_DIY_1W_LoRa
lib_deps =
${common.lib_deps}
${common.display_libs}

View File

@@ -0,0 +1,31 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
// LoRa Radio
#define HAS_SX1262
#define HAS_1W_LORA
#define RADIO_SCLK_PIN 18
#define RADIO_MISO_PIN 19
#define RADIO_MOSI_PIN 23
#define RADIO_CS_PIN 5
#define RADIO_RST_PIN 27
#define RADIO_DIO1_PIN 12
#define RADIO_BUSY_PIN 14
#define RADIO_RXEN 32
#define RADIO_TXEN 25
// Display
#define HAS_DISPLAY
#undef OLED_SDA
#undef OLED_SCL
#undef OLED_RST
#define OLED_SDA 21
#define OLED_SCL 22
#define OLED_RST -1 // Reset pin # (or -1 if sharing Arduino reset pin)
// Aditional Config
#define INTERNAL_LED_PIN 2
#endif

View File

@@ -0,0 +1,8 @@
[env:ESP32_DIY_1W_LoRa_915]
board = esp32dev
build_flags =
${common.build_flags}
-D ESP32_DIY_1W_LoRa_915
lib_deps =
${common.lib_deps}
${common.display_libs}

View File

@@ -0,0 +1,28 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
// LoRa Radio
#define HAS_LLCC68
#define HAS_1W_LORA
#define RADIO_SCLK_PIN 18
#define RADIO_MISO_PIN 19
#define RADIO_MOSI_PIN 23
#define RADIO_CS_PIN 5
#define RADIO_RST_PIN 27
#define RADIO_DIO1_PIN 12
#define RADIO_BUSY_PIN 14
#define RADIO_RXEN 32
#define RADIO_TXEN 25
// Display
#define HAS_DISPLAY
#undef OLED_SDA
#undef OLED_SCL
#undef OLED_RST
#define OLED_SDA 21
#define OLED_SCL 22
#define OLED_RST -1 // Reset pin # (or -1 if sharing Arduino reset pin)
#endif

View File

@@ -0,0 +1,8 @@
[env:ESP32_DIY_1W_LoRa_LLCC68]
board = esp32dev
build_flags =
${common.build_flags}
-D ESP32_DIY_1W_LoRa_LLCC68
lib_deps =
${common.lib_deps}
${common.display_libs}

View File

@@ -0,0 +1,28 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
// LoRa Radio
#define HAS_SX1268
#define HAS_1W_LORA
#define RADIO_SCLK_PIN 5 // https://github.com/NanoVHF/Meshtastic-DIY/tree/main/PCB/ESP-32-devkit_EBYTE-E22/Mesh-v1.02-2LCD-FreePins
#define RADIO_MISO_PIN 19
#define RADIO_MOSI_PIN 27
#define RADIO_CS_PIN 18
#define RADIO_RST_PIN 23
#define RADIO_DIO1_PIN 33
#define RADIO_BUSY_PIN 32
#define RADIO_RXEN 14
#define RADIO_TXEN 13
// Display
#define HAS_DISPLAY
#undef OLED_SDA
#undef OLED_SCL
#undef OLED_RST
#define OLED_SDA 21
#define OLED_SCL 22
#define OLED_RST -1 // Reset pin # (or -1 if sharing Arduino reset pin)
#endif

View File

@@ -0,0 +1,8 @@
[env:ESP32_DIY_1W_LoRa_Mesh_V1_2]
board = esp32dev
build_flags =
${common.build_flags}
-D ESP32_DIY_1W_LoRa_Mesh_V1_2
lib_deps =
${common.lib_deps}
${common.display_libs}

View File

@@ -0,0 +1,27 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
// LoRa Radio
#define HAS_SX1278
#define RADIO_SCLK_PIN 5
#define RADIO_MISO_PIN 19
#define RADIO_MOSI_PIN 27
#define RADIO_CS_PIN 18
#define RADIO_RST_PIN 14
#define RADIO_BUSY_PIN 26
// Display
#define HAS_DISPLAY
#undef OLED_SDA
#undef OLED_SCL
#undef OLED_RST
#define OLED_SDA 21
#define OLED_SCL 22
#define OLED_RST -1 // Reset pin # (or -1 if sharing Arduino reset pin)
// Aditional Config
#define INTERNAL_LED_PIN 2
#endif

View File

@@ -0,0 +1,8 @@
[env:ESP32_DIY_LoRa]
board = esp32dev
build_flags =
${common.build_flags}
-D ESP32_DIY_LoRa
lib_deps =
${common.lib_deps}
${common.display_libs}

View File

@@ -0,0 +1,27 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
// LoRa Radio
#define HAS_SX1276
#define RADIO_SCLK_PIN 5
#define RADIO_MISO_PIN 19
#define RADIO_MOSI_PIN 27
#define RADIO_CS_PIN 18
#define RADIO_RST_PIN 14
#define RADIO_BUSY_PIN 26
// Display
#define HAS_DISPLAY
#undef OLED_SDA
#undef OLED_SCL
#undef OLED_RST
#define OLED_SDA 21
#define OLED_SCL 22
#define OLED_RST -1 // Reset pin # (or -1 if sharing Arduino reset pin)
// Aditional Config
#define INTERNAL_LED_PIN 2
#endif

View File

@@ -0,0 +1,8 @@
[env:ESP32_DIY_LoRa_915]
board = esp32dev
build_flags =
${common.build_flags}
-D ESP32_DIY_LoRa_915
lib_deps =
${common.lib_deps}
${common.display_libs}

View File

@@ -0,0 +1,34 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
// LoRa Radio
#define HAS_SX1278
#define RADIO_SCLK_PIN 18
#define RADIO_MISO_PIN 19
#define RADIO_MOSI_PIN 23
#define RADIO_CS_PIN 2
#define RADIO_RST_PIN 0
#define RADIO_BUSY_PIN 32
// Display
#define HAS_DISPLAY
#undef OLED_SDA
#undef OLED_SCL
#undef OLED_RST
#define OLED_SDA 21
#define OLED_SCL 22
#define OLED_RST -1 // Reset pin # (or -1 if sharing Arduino reset pin)
// Aditional Config
#define INTERNAL_LED_PIN 13 // 13 for V1.1 and 12 for V1.0
#define BATTERY_PIN 35
#define HAS_A7670
#define A7670_PWR_PIN 4
#define A7670_ResetPin 5
#define A7670_TX_PIN 26
#define A7670_RX_PIN 27
#endif

View File

@@ -0,0 +1,10 @@
[env:ESP32_DIY_LoRa_A7670]
board = esp32dev
build_flags =
${common.build_flags}
-D ESP32_DIY_LoRa_A7670
lib_deps =
${common.lib_deps}
${common.display_libs}
vshymanskyy/TinyGSM @ 0.12.0
vshymanskyy/StreamDebugger @ 1.0.1

View File

@@ -0,0 +1,34 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
// LoRa Radio
#define HAS_SX1276
#define RADIO_SCLK_PIN 18
#define RADIO_MISO_PIN 19
#define RADIO_MOSI_PIN 23
#define RADIO_CS_PIN 2
#define RADIO_RST_PIN 0
#define RADIO_BUSY_PIN 32
// Display
#define HAS_DISPLAY
#undef OLED_SDA
#undef OLED_SCL
#undef OLED_RST
#define OLED_SDA 21
#define OLED_SCL 22
#define OLED_RST -1 // Reset pin # (or -1 if sharing Arduino reset pin)
// Aditional Config
#define INTERNAL_LED_PIN 13 // 13 for V1.1 and 12 for V1.0
#define BATTERY_PIN 35
#define HAS_A7670
#define A7670_PWR_PIN 4
#define A7670_ResetPin 5
#define A7670_TX_PIN 26
#define A7670_RX_PIN 27
#endif

View File

@@ -0,0 +1,10 @@
[env:ESP32_DIY_LoRa_A7670_915]
board = esp32dev
build_flags =
${common.build_flags}
-D ESP32_DIY_LoRa_A7670_915
lib_deps =
${common.lib_deps}
${common.display_libs}
vshymanskyy/TinyGSM @ 0.12.0
vshymanskyy/StreamDebugger @ 1.0.1

View File

@@ -0,0 +1,28 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
// LoRa Radio
#define HAS_SX1268
#define HAS_1W_LORA
#define RADIO_SCLK_PIN 18
#define RADIO_MISO_PIN 19
#define RADIO_MOSI_PIN 23
#define RADIO_CS_PIN 5
#define RADIO_RST_PIN 27
#define RADIO_DIO1_PIN 33
#define RADIO_BUSY_PIN 26
#define RADIO_RXEN 14
#define RADIO_TXEN 13
// Display
#define HAS_DISPLAY
#undef OLED_SDA
#undef OLED_SCL
#undef OLED_RST
#define OLED_SDA 21
#define OLED_SCL 22
#define OLED_RST -1 // Reset pin # (or -1 if sharing Arduino reset pin)
#endif

View File

@@ -0,0 +1,8 @@
[env:OE5HWN_MeshCom]
board = esp32dev
build_flags =
${common.build_flags}
-D OE5HWN_MeshCom
lib_deps =
${common.lib_deps}
${common.display_libs}

View File

@@ -0,0 +1,33 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
// LoRa Radio
#define HAS_SX1268
#define RADIO_VCC_PIN 21
#define RADIO_SCLK_PIN 12
#define RADIO_MISO_PIN 13
#define RADIO_MOSI_PIN 11
#define RADIO_CS_PIN 10
#define RADIO_RST_PIN 9
#define RADIO_DIO1_PIN 5
#define RADIO_BUSY_PIN 6
#define RADIO_RXEN 42
#define RADIO_TXEN 14
// Display
#define HAS_DISPLAY
#undef OLED_SDA
#undef OLED_SCL
#undef OLED_RST
#define OLED_SDA 3
#define OLED_SCL 4
#define OLED_RST -1 // Reset pin # (or -1 if sharing Arduino reset pin)
// Aditional Config
#define INTERNAL_LED_PIN 16
#define BATTERY_PIN 1
#define BUTTON_PIN 0
#endif

View File

@@ -0,0 +1,10 @@
[env:QRPLabs_LightGateway_1_0]
board = esp32-s3-devkitc-1
board_build.mcu = esp32s3
build_flags =
${common.build_flags}
${common.usb_flags}
-D LIGHTGATEWAY_1_0
lib_deps =
${common.lib_deps}
${common.display_libs}

View File

@@ -0,0 +1,25 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
// LoRa Radio
#define HAS_SX1278
#define RADIO_SCLK_PIN 18
#define RADIO_MISO_PIN 19
#define RADIO_MOSI_PIN 23
#define RADIO_CS_PIN 5
#define RADIO_RST_PIN 13
#define RADIO_DIO1_PIN 14
#define RADIO_BUSY_PIN 12
// Display
#define HAS_DISPLAY
#undef OLED_SDA
#undef OLED_SCL
#undef OLED_RST
#define OLED_SDA 21
#define OLED_SCL 22
#define OLED_RST 36
#endif

View File

@@ -0,0 +1,8 @@
[env:WEMOS-D1-R32-RA02]
board = wemos_d1_uno32
build_flags =
${common.build_flags}
-D WEMOS_D1_R32_RA02
lib_deps =
${common.lib_deps}
${common.display_libs}

View File

@@ -0,0 +1,24 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
// LoRa Radio
#define HAS_SX1278
#define RADIO_SCLK_PIN 15
#define RADIO_MISO_PIN 13
#define RADIO_MOSI_PIN 12
#define RADIO_CS_PIN 14
#define RADIO_RST_PIN 2
#define RADIO_BUSY_PIN 25
// Display
#define HAS_DISPLAY
#undef OLED_SDA
#undef OLED_SCL
#undef OLED_RST
#define OLED_SDA 5
#define OLED_SCL 4
#define OLED_RST -1
#endif

View File

@@ -0,0 +1,8 @@
[env:WEMOS-LOLIN32-OLED-DIY]
board = lolin32
build_flags =
${common.build_flags}
-D WEMOS_LOLIN32_OLED_DIY_LoRa
lib_deps =
${common.lib_deps}
${common.display_libs}

View File

@@ -0,0 +1,16 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
// LoRa Radio
#define HAS_SX1278
#define RADIO_SCLK_PIN 36
#define RADIO_MISO_PIN 37
#define RADIO_MOSI_PIN 35
#define RADIO_CS_PIN 34
#define RADIO_RST_PIN 33
#define RADIO_BUSY_PIN 38
// Aditional Config
#define INTERNAL_LED_PIN 15
#endif

View File

@@ -0,0 +1,8 @@
[env:WEMOS_S2_MINI_DIY_LoRa]
board = lolin_s2_mini
build_flags =
${common.build_flags}
-D WEMOS_S2_MINI_DIY_LoRa
lib_deps =
${common.lib_deps}
${common.display_libs}

View File

@@ -0,0 +1,20 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
// LoRa Radio
#define HAS_SX1262
#define RADIO_SCLK_PIN 7
#define RADIO_MISO_PIN 8
#define RADIO_MOSI_PIN 9
#define RADIO_CS_PIN 41
#define RADIO_RST_PIN 42
#define RADIO_DIO1_PIN 39
#define RADIO_BUSY_PIN 40
#define RADIO_HAS_RF_SWITCH // DIO02
#define RADIO_RF_SWITCH 38
#define BUTTON_PIN 21
#define INTERNAL_LED_PIN 48
#endif

View File

@@ -0,0 +1,8 @@
[env:XIAO_ESP32S3_WIO_SX1262]
board = seeed_xiao_esp32s3
build_flags =
${common.build_flags}
${common.usb_flags}
-D XIAO_ESP32S3_LORA
lib_deps =
${common.lib_deps}

View File

@@ -0,0 +1,17 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
// LoRa Radio
#define HAS_SX1268
#define HAS_1W_LORA
#define RADIO_SCLK_PIN 8
#define RADIO_MISO_PIN 9
#define RADIO_MOSI_PIN 10
#define RADIO_CS_PIN 5
#define RADIO_RST_PIN 4
#define RADIO_DIO1_PIN 2
#define RADIO_BUSY_PIN 3
#define RADIO_RXEN 6
#define RADIO_TXEN 7
#endif

View File

@@ -0,0 +1,10 @@
[env:esp32c3_DIY_1W_LoRa]
board = esp32-c3-devkitm-1
board_build.mcu = esp32c3
build_flags =
${common.build_flags}
${common.usb_flags}
-D ESP32C3_DIY_1W_LoRa
lib_deps =
${common.lib_deps}
${common.display_libs}

View File

@@ -0,0 +1,17 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
// LoRa Radio
#define HAS_SX1262
#define HAS_1W_LORA
#define RADIO_SCLK_PIN 8
#define RADIO_MISO_PIN 9
#define RADIO_MOSI_PIN 10
#define RADIO_CS_PIN 5
#define RADIO_RST_PIN 4
#define RADIO_DIO1_PIN 2
#define RADIO_BUSY_PIN 3
#define RADIO_RXEN 6
#define RADIO_TXEN 7
#endif

View File

@@ -0,0 +1,10 @@
[env:esp32c3_DIY_1W_LoRa_915]
board = esp32-c3-devkitm-1
board_build.mcu = esp32c3
build_flags =
${common.build_flags}
${common.usb_flags}
-D ESP32C3_DIY_1W_LoRa_915
lib_deps =
${common.lib_deps}
${common.display_libs}

View File

@@ -0,0 +1,30 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
// LoRa Radio
#define HAS_SX1278
#define RADIO_SCLK_PIN 5
#define RADIO_MISO_PIN 19
#define RADIO_MOSI_PIN 27
#define RADIO_CS_PIN 18
#define RADIO_RST_PIN 14
#define RADIO_BUSY_PIN 26
// Display
#define HAS_DISPLAY
#undef OLED_SDA
#undef OLED_SCL
#undef OLED_RST
#define OLED_SDA 4
#define OLED_SCL 15
#define OLED_RST 16
#define OLED_DISPLAY_HAS_RST_PIN
// Aditional Config
#define INTERNAL_LED_PIN 25
#define BATTERY_PIN 37
#define ADC_CTRL 21
#endif

View File

@@ -0,0 +1,8 @@
[env:heltec-lora32-v2]
board = ttgo-lora32-v21
build_flags =
${common.build_flags}
-D HELTEC_V2
lib_deps =
${common.lib_deps}
${common.display_libs}

View File

@@ -0,0 +1,17 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
// LoRa Radio
#define HAS_SX1262
#define RADIO_SCLK_PIN 10
#define RADIO_MISO_PIN 6
#define RADIO_MOSI_PIN 7
#define RADIO_CS_PIN 8
#define RADIO_RST_PIN 5
#define RADIO_DIO1_PIN 3
#define RADIO_BUSY_PIN 4
// Aditional Config
#define BATTERY_PIN 1
#endif

View File

@@ -0,0 +1,9 @@
[env:heltec_ht-ct62]
board = heltec_wireless_stick_lite
board_build.mcu = esp32c3
build_flags =
${common.build_flags}
-D HELTEC_HTCT62
lib_deps =
${common.lib_deps}
${common.display_libs}

View File

@@ -0,0 +1,34 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
// LoRa Radio
#define HAS_SX1262
#define RADIO_SCLK_PIN 9
#define RADIO_MISO_PIN 11
#define RADIO_MOSI_PIN 10
#define RADIO_CS_PIN 8
#define RADIO_RST_PIN 12
#define RADIO_DIO1_PIN 14
#define RADIO_BUSY_PIN 13
// Display
#define HAS_DISPLAY
#undef OLED_SDA
#undef OLED_SCL
#undef OLED_RST
#define OLED_SDA 17
#define OLED_SCL 18
#define OLED_RST 21
#define OLED_DISPLAY_HAS_RST_PIN
// Aditional Config
#define INTERNAL_LED_PIN 35
#define BATTERY_PIN 1
#define VEXT_CTRL 36
#define ADC_CTRL 37
#define BOARD_I2C_SDA 41
#define BOARD_I2C_SCL 42
#endif

View File

@@ -0,0 +1,9 @@
[env:heltec_wifi_lora_32_V3]
board = heltec_wifi_lora_32_V3
board_build.mcu = esp32s3
build_flags =
${common.build_flags}
-D HELTEC_V3
lib_deps =
${common.lib_deps}
${common.display_libs}

View File

@@ -0,0 +1,32 @@
#ifndef BOARD_PINOUT_H_
#define BOARD_PINOUT_H_
// LoRa Radio
#define HAS_SX1262
#define RADIO_SCLK_PIN 9
#define RADIO_MISO_PIN 11
#define RADIO_MOSI_PIN 10
#define RADIO_CS_PIN 8
#define RADIO_RST_PIN 12
#define RADIO_DIO1_PIN 14
#define RADIO_BUSY_PIN 13
// Display
#define HAS_DISPLAY
#define HAS_EPAPER
#define EPAPER_BUSY 7
#define EPAPER_RST 6
#define EPAPER_DC 5
#define EPAPER_CS 4
#define EPAPER_SCL 3
#define EPAPER_SDA 2
// Aditional Config
#define INTERNAL_LED_PIN 18
#define BATTERY_PIN 20
#define ADC_CTRL 19
#define VEXT_CTRL 45
#define BOARD_I2C_SDA 37
#define BOARD_I2C_SCL 36
#endif

View File

@@ -0,0 +1,8 @@
[env:heltec_wireless_paper]
board = esp32-s3-devkitc-1
board_build.mcu = esp32s3
build_flags =
${common.build_flags}
-D HELTEC_WP
lib_deps =
${common.lib_deps}

Some files were not shown because too many files have changed in this diff Show More