mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-03-28 16:52:33 +01:00
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f07d35861 | ||
|
|
91240c5be6 | ||
|
|
b4308a95d5 | ||
|
|
6c301795d6 | ||
|
|
5f0c6f4986 | ||
|
|
7c989e6e9e | ||
|
|
2bcda6d3a4 | ||
|
|
848492dc36 | ||
|
|
413bef67fb | ||
|
|
3fa4c9371a | ||
|
|
e846c38f97 | ||
|
|
b8446e3f1d | ||
|
|
c3984bc8da | ||
|
|
601b72da9f | ||
|
|
5d9493314d | ||
|
|
86cf12d6c1 | ||
|
|
e5e2c6a980 | ||
|
|
3b9d49c5f9 | ||
|
|
ab9443140b |
20
README.md
20
README.md
@@ -5,27 +5,23 @@ This firmware is for using ESP32 based boards with LoRa Modules and GPS to live
|
||||

|
||||
|
||||
__(This iGate Firmware works with all LoRa Tracker Firmwares (specially this <a href="https://github.com/richonguzman/LoRa_APRS_Tracker" target="_blank">LoRa APRS Tracker Firmware</a>))__
|
||||
|
||||
___________________________________________________
|
||||
<br />
|
||||
|
||||
## You can support this project to continue to grow:
|
||||
|
||||
[<img src="https://github.com/richonguzman/LoRa_APRS_Tracker/blob/main/images/github-sponsors.png">](https://github.com/sponsors/richonguzman) [<img src="https://github.com/richonguzman/LoRa_APRS_Tracker/blob/main/images/paypalme.png">](http://paypal.me/richonguzman)
|
||||
|
||||
____________________________________________________
|
||||
<br />
|
||||
|
||||
# WEB FLASHER/INSTALLER is <a href="https://richonguzman.github.io/lora-igate-web-flasher/installer.html" target="_blank">here</a>
|
||||
|
||||
____________________________________________________
|
||||
<br />
|
||||
|
||||
# WIKI
|
||||
|
||||
### FAQ, BME280, TNC and more --> <a href="https://github.com/richonguzman/LoRa_APRS_iGate/wiki/00.-FAQ-(frequently-asked-questions)" target="_blank">here</a>.
|
||||
|
||||
### Installation Guide --> <a href="https://github.com/richonguzman/LoRa_APRS_iGate/wiki/01.-Installation-Guide" target="_blank">here</a>.
|
||||
|
||||
|
||||
____________________________________________________
|
||||
<br />
|
||||
|
||||
# SUPPORTED BOARDS
|
||||
|
||||
@@ -47,10 +43,14 @@ ____________________________________________________
|
||||
|
||||
- Wemos Lolin32 Oled + SX1278 DIY Version.
|
||||
|
||||
____________________________________________________
|
||||
<br />
|
||||
|
||||
## Timeline (Versions):
|
||||
|
||||
- 2024.06.21 Tx packets coming from APRS-IS are (now) formatted into 3rd Party (as they should have been since the beginning).
|
||||
- 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.
|
||||
- 2024.06.21 Tx packets coming from APRS-IS are (now) formatted into 3rd Party (as they should have been since the beginning). Thanks Lynn KJ4ERJ and Geoffrey F4FXL.
|
||||
- 2024.06.18 All boards with 433 / 868 / 915 MHz versions.
|
||||
- 2024.06.10 ESP32C3 + 1W LoRa Module (E22 400M30S) support added.
|
||||
- 2024.06.09 Si7021 module added (with autodetected I2C Address)
|
||||
|
||||
@@ -52,7 +52,9 @@
|
||||
"sendExternalVoltage": false,
|
||||
"externalVoltagePin": 34,
|
||||
"monitorExternalVoltage": false,
|
||||
"externalSleepVoltage": 10.9
|
||||
"externalSleepVoltage": 10.9,
|
||||
"voltageDividerR1": 100.0,
|
||||
"voltageDividerR2": 27.0
|
||||
},
|
||||
"bme": {
|
||||
"active": false,
|
||||
@@ -80,5 +82,6 @@
|
||||
"backupDigiMode": false,
|
||||
"rebootMode": false,
|
||||
"rebootModeTime": 6
|
||||
}
|
||||
},
|
||||
"personalNote": ""
|
||||
}
|
||||
@@ -107,10 +107,14 @@
|
||||
Station
|
||||
</h5>
|
||||
<small
|
||||
>Add your ham callsign and SSID. Optionally,
|
||||
you can leave a comment describing your
|
||||
station.</small
|
||||
>
|
||||
>Add your Ham callsign and SSID.
|
||||
<br>
|
||||
<br>
|
||||
You can leave a comment describing your station.
|
||||
<br>
|
||||
<br>
|
||||
In the bottom there is a field for personal note that can only be seen in WEB GUI.
|
||||
</small>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-12">
|
||||
<div class="row">
|
||||
@@ -237,6 +241,20 @@
|
||||
class="form-control"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 mt-3">
|
||||
<label
|
||||
for="personalNote"
|
||||
class="form-label"
|
||||
>Personal Note</label
|
||||
>
|
||||
<input
|
||||
type="text"
|
||||
name="personalNote"
|
||||
id="personalNote"
|
||||
class="form-control"
|
||||
placeholder="A Couple of words."
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -474,8 +492,8 @@
|
||||
for="beacon.sendViaAPRSIS"
|
||||
class="form-label"
|
||||
>Send our beacon to
|
||||
APRS-IS</label
|
||||
>
|
||||
APRS-IS
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
@@ -489,8 +507,8 @@
|
||||
<label
|
||||
for="beacon.sendViaRF"
|
||||
class="form-label"
|
||||
>Send beacon via RF</label
|
||||
>
|
||||
>Send beacon via RF
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 d-grid gap-2">
|
||||
@@ -502,8 +520,8 @@
|
||||
<label
|
||||
for="beacon.interval"
|
||||
class="form-label"
|
||||
>Interval</label
|
||||
>
|
||||
>Interval
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<input
|
||||
type="number"
|
||||
@@ -516,8 +534,8 @@
|
||||
min="1"
|
||||
/>
|
||||
<span class="input-group-text"
|
||||
>minutes</span
|
||||
>
|
||||
>minutes
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -625,8 +643,8 @@
|
||||
<label
|
||||
for="lora.txFreq"
|
||||
class="form-label"
|
||||
>Tx Frequency</label
|
||||
>
|
||||
>Tx Frequency
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<input
|
||||
type="text"
|
||||
@@ -644,17 +662,17 @@
|
||||
class="form-control"
|
||||
required=""
|
||||
/>
|
||||
<span class="input-group-text"
|
||||
>Hz</span
|
||||
>
|
||||
<span class="input-group-text">
|
||||
Hz
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<label
|
||||
for="lora.rxFreq"
|
||||
class="form-label"
|
||||
>Rx Frequency</label
|
||||
>
|
||||
class="form-label">
|
||||
Rx Frequency
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<input
|
||||
type="text"
|
||||
@@ -664,8 +682,8 @@
|
||||
class="form-control"
|
||||
/>
|
||||
<span class="input-group-text"
|
||||
>Hz</span
|
||||
>
|
||||
>Hz
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -674,8 +692,8 @@
|
||||
<label
|
||||
for="action.speed"
|
||||
class="form-label"
|
||||
>Predefined speeds</label
|
||||
>
|
||||
>Predefined speeds
|
||||
</label>
|
||||
<select
|
||||
class="form-select form-select"
|
||||
name="action.speed"
|
||||
@@ -710,8 +728,8 @@
|
||||
<label
|
||||
for="lora.signalBandwidth"
|
||||
class="form-label"
|
||||
>Bandwidth</label
|
||||
>
|
||||
>Bandwidth
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<select
|
||||
class="form-select form-select"
|
||||
@@ -735,8 +753,8 @@
|
||||
<label
|
||||
for="lora.spreadingFactor"
|
||||
class="form-label"
|
||||
>Spreading Factor</label
|
||||
>
|
||||
>Spreading Factor
|
||||
</label>
|
||||
<select
|
||||
class="form-select form-select"
|
||||
name="lora.spreadingFactor"
|
||||
@@ -760,9 +778,9 @@
|
||||
<div class="col-6">
|
||||
<label
|
||||
for="lora.codingRate4"
|
||||
class="form-label"
|
||||
>Coding Rate</label
|
||||
>
|
||||
class="form-label">
|
||||
Coding Rate
|
||||
</label>
|
||||
<select
|
||||
class="form-select form-select"
|
||||
name="lora.codingRate4"
|
||||
@@ -779,9 +797,9 @@
|
||||
<div class="col-6">
|
||||
<label
|
||||
for="lora.power"
|
||||
class="form-label"
|
||||
>Power</label
|
||||
>
|
||||
class="form-label">
|
||||
Power
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<input
|
||||
type="number"
|
||||
@@ -925,7 +943,15 @@
|
||||
</svg>
|
||||
Battery
|
||||
</h5>
|
||||
<small>Battery Monitor & Health</small>
|
||||
<small>
|
||||
Battery Monitor & Health
|
||||
<br>
|
||||
<br>
|
||||
Max Voltage on input pin is 3.3V.
|
||||
<br>
|
||||
<br>
|
||||
Calculate voltage divider accordingly.
|
||||
</small>
|
||||
</div>
|
||||
<div class="col-9 mt-2">
|
||||
<div class="row mt-2">
|
||||
@@ -943,19 +969,6 @@
|
||||
>Send Internal Voltage</label
|
||||
>
|
||||
</div>
|
||||
<div class="form-check form-switch">
|
||||
<input
|
||||
type="checkbox"
|
||||
name="battery.sendExternalVoltage"
|
||||
id="battery.sendExternalVoltage"
|
||||
class="form-check-input"
|
||||
/>
|
||||
<label
|
||||
for="battery.sendExternalVoltage"
|
||||
class="form-label"
|
||||
>Send External Voltage</label
|
||||
>
|
||||
</div>
|
||||
<div class="form-check form-switch mt-3">
|
||||
<input
|
||||
type="checkbox"
|
||||
@@ -991,21 +1004,20 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="form-floating col-7">
|
||||
<div class="form-check form-switch">
|
||||
<input
|
||||
type="text"
|
||||
name="battery.externalVoltagePin"
|
||||
id="battery.externalVoltagePin"
|
||||
value="34"
|
||||
class="form-control"
|
||||
type="checkbox"
|
||||
name="battery.sendExternalVoltage"
|
||||
id="battery.sendExternalVoltage"
|
||||
class="form-check-input"
|
||||
/>
|
||||
<label
|
||||
for="battery.externalVoltagePin"
|
||||
for="battery.sendExternalVoltage"
|
||||
class="form-label"
|
||||
>External Voltage Pin</label
|
||||
>Send External Voltage</label
|
||||
>
|
||||
</div>
|
||||
<div class="form-check form-switch mt-4">
|
||||
<div class="form-check form-switch mt-3">
|
||||
<input
|
||||
type="checkbox"
|
||||
name="battery.monitorExternalVoltage"
|
||||
@@ -1038,6 +1050,52 @@
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-floating col-7 mt-3">
|
||||
<input
|
||||
type="text"
|
||||
name="battery.externalVoltagePin"
|
||||
id="battery.externalVoltagePin"
|
||||
value="34"
|
||||
class="form-control"
|
||||
/>
|
||||
<label
|
||||
for="battery.externalVoltagePin"
|
||||
class="form-label"
|
||||
>External Voltage Pin</label
|
||||
>
|
||||
</div>
|
||||
<div class="col">
|
||||
<label for="battery.voltageDividerR1" class="form-label">External Voltage divider R1</label>
|
||||
<div class="input-group">
|
||||
<input
|
||||
type="number"
|
||||
name="battery.voltageDividerR1"
|
||||
id="battery.voltageDividerR1"
|
||||
placeholder="100.0"
|
||||
class="form-control"
|
||||
step="0.1"
|
||||
min="1"
|
||||
max="1000"
|
||||
/>
|
||||
<span class="input-group-text">kOhm</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<label for="battery.voltageDividerR2" class="form-label">External Voltage divider R2</label>
|
||||
<div class="input-group">
|
||||
<input
|
||||
type="number"
|
||||
name="battery.voltageDividerR2"
|
||||
id="battery.voltageDividerR2"
|
||||
placeholder="27.0"
|
||||
class="form-control"
|
||||
step="0.1"
|
||||
min="1"
|
||||
max="1000"
|
||||
/>
|
||||
<span class="input-group-text">kOhm</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1061,7 +1119,7 @@
|
||||
</svg>
|
||||
Telemetry
|
||||
</h5>
|
||||
<small>Define the telemetry</small>
|
||||
<small>Define Wx telemetry</small>
|
||||
</div>
|
||||
<div class="col-9 mt-2">
|
||||
<div class="row">
|
||||
@@ -1078,9 +1136,7 @@
|
||||
class="form-label"
|
||||
><b>Activate Wx Telemetry</b>
|
||||
<small
|
||||
>Requires a BME/BMP280 or
|
||||
BME680 sensor
|
||||
installed</small
|
||||
>Requires a BME/BMP280, BME680 or Si7021 sensor installed</small
|
||||
></label
|
||||
>
|
||||
</div>
|
||||
@@ -1339,7 +1395,7 @@
|
||||
type="number"
|
||||
name="other.rebootModeTime"
|
||||
id="other.rebootModeTime"
|
||||
placeholder="0"
|
||||
placeholder="6"
|
||||
class="form-control"
|
||||
step="6"
|
||||
min="6"
|
||||
@@ -1537,7 +1593,7 @@
|
||||
<label
|
||||
for="other.lowPowerMode"
|
||||
class="form-label"
|
||||
>Low power mode</label
|
||||
>Low power mode (only for HT-CT62)</label
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1702,4 +1758,4 @@
|
||||
</body>
|
||||
<script src="/bootstrap.js"></script>
|
||||
<script src="/script.js"></script>
|
||||
</html>
|
||||
</html>
|
||||
@@ -79,7 +79,7 @@ function loadSettings(settings) {
|
||||
document.getElementById("beacon.path").value = settings.beacon.path;
|
||||
document.getElementById("beacon.symbol").value = settings.beacon.symbol;
|
||||
document.getElementById("beacon.overlay").value = settings.beacon.overlay;
|
||||
|
||||
document.getElementById("personalNote").value = settings.personalNote;
|
||||
document.getElementById("action.symbol").value = settings.beacon.overlay + settings.beacon.symbol;
|
||||
|
||||
document.querySelector(".list-networks").innerHTML = "";
|
||||
@@ -162,6 +162,8 @@ function loadSettings(settings) {
|
||||
document.getElementById("battery.internalSleepVoltage").value = settings.battery.internalSleepVoltage.toFixed(1);
|
||||
document.getElementById("battery.sendExternalVoltage").checked = settings.battery.sendExternalVoltage;
|
||||
document.getElementById("battery.externalVoltagePin").value = settings.battery.externalVoltagePin;
|
||||
document.getElementById("battery.voltageDividerR1").value = settings.battery.voltageDividerR1.toFixed(1);
|
||||
document.getElementById("battery.voltageDividerR2").value = settings.battery.voltageDividerR2.toFixed(1);
|
||||
document.getElementById("battery.monitorExternalVoltage").checked = settings.battery.monitorExternalVoltage;
|
||||
document.getElementById("battery.externalSleepVoltage").value = settings.battery.externalSleepVoltage.toFixed(1);
|
||||
|
||||
@@ -271,8 +273,9 @@ function toggleFields() {
|
||||
'input[name="battery.externalVoltagePin"]'
|
||||
);
|
||||
|
||||
externalVoltagePinInput.disabled =
|
||||
!sendExternalVoltageCheckbox.checked;
|
||||
externalVoltagePinInput.disabled = !sendExternalVoltageCheckbox.checked;
|
||||
voltageDividerR1.disabled = !sendExternalVoltageCheckbox.checked;
|
||||
voltageDividerR2.disabled = !sendExternalVoltageCheckbox.checked;
|
||||
}
|
||||
|
||||
const sendExternalVoltageCheckbox = document.querySelector(
|
||||
@@ -282,8 +285,18 @@ const externalVoltagePinInput = document.querySelector(
|
||||
'input[name="battery.externalVoltagePin"]'
|
||||
);
|
||||
|
||||
const voltageDividerR1 = document.querySelector(
|
||||
'input[name="battery.voltageDividerR1"]'
|
||||
);
|
||||
|
||||
const voltageDividerR2 = document.querySelector(
|
||||
'input[name="battery.voltageDividerR2"]'
|
||||
);
|
||||
|
||||
sendExternalVoltageCheckbox.addEventListener("change", function () {
|
||||
externalVoltagePinInput.disabled = !this.checked;
|
||||
voltageDividerR1.disabled = !this.checked;
|
||||
voltageDividerR2.disabled = !this.checked;
|
||||
});
|
||||
|
||||
document.querySelector(".new button").addEventListener("click", function () {
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
@echo off
|
||||
echo Loading...
|
||||
|
||||
where /q python.exe
|
||||
if %errorlevel% neq 0 (
|
||||
echo "Python is not installed. Please install it and try again."
|
||||
exit /b
|
||||
)
|
||||
|
||||
where /q pip
|
||||
if %errorlevel% neq 0 (
|
||||
echo "pip is not installed. Please install it and try again."
|
||||
exit /b
|
||||
)
|
||||
|
||||
pip show pyserial >nul 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo "Installing pyserial..."
|
||||
pip install pyserial
|
||||
)
|
||||
|
||||
echo Your firmware will be upgraded without factory reset.
|
||||
|
||||
echo:
|
||||
|
||||
echo IF THIS IS YOUR FIRST FLASH ON THIS BOARD PLEASE USE install_with_factory_reset.bat INSTEAD!
|
||||
|
||||
echo:
|
||||
|
||||
echo Available COM ports:
|
||||
python.exe -c "import serial.tools.list_ports; print('\n'.join([str(c) for c in serial.tools.list_ports.comports()]))"
|
||||
|
||||
echo:
|
||||
|
||||
set /p port="Enter COM port (for example COM5): "
|
||||
|
||||
python.exe ./bin/esptool/esptool.py --chip esp32 --port "%port%" --baud 460800 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size 4MB 0x1000 firmware/bootloader.bin 0x8000 firmware/partitions.bin 0xe000 firmware/boot_app0.bin 0x10000 firmware/firmware.bin
|
||||
|
||||
pause
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
echo "Your firmware will be upgraded without factory reset."
|
||||
echo "IF THIS IS YOUR FIRST FLASH ON THIS BOARD PLEASE USE install_with_factory_reset.sh INSTEAD!"
|
||||
|
||||
read -p "Enter COM port (for example /dev/ttyS5): " port
|
||||
|
||||
PYTHON_CMD=python
|
||||
if command -v python3 &> /dev/null
|
||||
then
|
||||
PYTHON_CMD=python3
|
||||
fi
|
||||
|
||||
PYTHON_CMD ./bin/esptool/esptool.py --chip esp32 --port "$port" --baud 460800 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size 4MB 0x1000 firmware/bootloader.bin 0x8000 firmware/partitions.bin 0xe000 firmware/boot_app0.bin 0x10000 firmware/firmware.bin
|
||||
|
||||
echo "Firmware flashed"
|
||||
@@ -1,44 +0,0 @@
|
||||
@echo off
|
||||
echo Loading...
|
||||
|
||||
where /q python.exe
|
||||
if %errorlevel% neq 0 (
|
||||
echo "Python is not installed. Please install it and try again."
|
||||
exit /b
|
||||
)
|
||||
|
||||
where /q pip
|
||||
if %errorlevel% neq 0 (
|
||||
echo "pip is not installed. Please install it and try again."
|
||||
exit /b
|
||||
)
|
||||
|
||||
pip show pyserial >nul 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo "Installing pyserial..."
|
||||
pip install pyserial
|
||||
)
|
||||
|
||||
|
||||
echo Your current configuration will be LOST!!!
|
||||
echo Your current configuration will be LOST!!!
|
||||
echo Your current configuration will be LOST!!!
|
||||
|
||||
echo:
|
||||
|
||||
echo If you already have this board flashed with our firmware please use install_upgrade.bat instead!
|
||||
|
||||
echo:
|
||||
|
||||
echo Available COM ports:
|
||||
python.exe -c "import serial.tools.list_ports; print('\n'.join([str(c) for c in serial.tools.list_ports.comports()]))"
|
||||
|
||||
echo:
|
||||
|
||||
set /p port="Enter COM port (for example COM5): "
|
||||
|
||||
python.exe bin/esptool/esptool.py --chip esp32 --port "%port%" --baud 460800 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size 4MB 2686976 firmware/spiffs.bin
|
||||
|
||||
python.exe bin/esptool/esptool.py --chip esp32 --port "%port%" --baud 460800 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size 4MB 0x1000 firmware/bootloader.bin 0x8000 firmware/partitions.bin 0xe000 firmware/boot_app0.bin 0x10000 firmware/firmware.bin
|
||||
|
||||
pause
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
echo "Your firmware will be upgraded without factory reset."
|
||||
echo "IF THIS IS YOUR FIRST FLASH ON THIS BOARD PLEASE USE install_with_factory_reset.sh INSTEAD!"
|
||||
|
||||
read -p "Enter COM port (for example /dev/ttyS5): " port
|
||||
|
||||
PYTHON_CMD=python
|
||||
if command -v python3 &> /dev/null
|
||||
then
|
||||
PYTHON_CMD=python3
|
||||
fi
|
||||
|
||||
$PYTHON_CMD ./bin/esptool/esptool.py --chip esp32 --port "$port" --baud 460800 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size 4MB 2686976 firmware/spiffs.bin
|
||||
|
||||
$PYTHON_CMD ./bin/esptool/esptool.py --chip esp32 --port "$port" --baud 460800 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size 4MB 0x1000 firmware/bootloader.bin 0x8000 firmware/partitions.bin 0xe000 firmware/boot_app0.bin 0x10000 firmware/firmware.bin
|
||||
|
||||
echo "Firmware flashed"
|
||||
@@ -37,7 +37,7 @@ ________________________________________________________________________________
|
||||
#include "A7670_utils.h"
|
||||
#endif
|
||||
|
||||
String versionDate = "2024.06.25";
|
||||
String versionDate = "2024.06.28";
|
||||
Configuration Config;
|
||||
WiFiClient espClient;
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace APRS_IS_Utils {
|
||||
aprsauth += Config.callsign;
|
||||
aprsauth += " pass ";
|
||||
aprsauth += Config.aprs_is.passcode;
|
||||
aprsauth += " vers CA2RXU_LoRa_iGate 1.3 filter ";
|
||||
aprsauth += " vers CA2RXU_LoRa_iGate 1.4 filter ";
|
||||
aprsauth += Config.aprs_is.filter;
|
||||
upload(aprsauth);
|
||||
delay(200);
|
||||
@@ -129,7 +129,7 @@ namespace APRS_IS_Utils {
|
||||
return buildedPacket;
|
||||
}
|
||||
|
||||
bool processReceivedLoRaMessage(const String& sender, const String& packet) {
|
||||
bool processReceivedLoRaMessage(const String& sender, const String& packet, bool thirdParty) {
|
||||
String receivedMessage;
|
||||
if (packet.indexOf("{") > 0) { // ack?
|
||||
String ackMessage = "ack";
|
||||
@@ -162,7 +162,7 @@ namespace APRS_IS_Utils {
|
||||
if (!Config.display.alwaysOn && Config.display.timeout != 0) {
|
||||
display_toggle(true);
|
||||
}
|
||||
STATION_Utils::addToOutputPacketBuffer(QUERY_Utils::process(receivedMessage, sender, 0)); // LoRa
|
||||
STATION_Utils::addToOutputPacketBuffer(QUERY_Utils::process(receivedMessage, sender, false, thirdParty));
|
||||
lastScreenOn = millis();
|
||||
show_display(firstLine, secondLine, thirdLine, fourthLine, fifthLine, "Callsign = " + sender, "TYPE --> QUERY", 0);
|
||||
return true;
|
||||
@@ -187,7 +187,7 @@ namespace APRS_IS_Utils {
|
||||
Addressee.trim();
|
||||
bool queryMessage = false;
|
||||
if (packet.indexOf("::") > 10 && Addressee == Config.callsign) { // its a message for me!
|
||||
queryMessage = processReceivedLoRaMessage(Sender, checkForStartingBytes(AddresseeAndMessage));
|
||||
queryMessage = processReceivedLoRaMessage(Sender, checkForStartingBytes(AddresseeAndMessage), false);
|
||||
}
|
||||
if (!queryMessage) {
|
||||
const String& aprsPacket = buildPacketToUpload(packet);
|
||||
@@ -291,7 +291,7 @@ namespace APRS_IS_Utils {
|
||||
}
|
||||
if (receivedMessage.indexOf("?") == 0) {
|
||||
Utils::println("Received Query APRS-IS : " + packet);
|
||||
String queryAnswer = QUERY_Utils::process(receivedMessage, Sender, 1); // APRSIS
|
||||
String queryAnswer = QUERY_Utils::process(receivedMessage, Sender, true, false);
|
||||
//Serial.println("---> QUERY Answer : " + queryAnswer.substring(0,queryAnswer.indexOf("\n")));
|
||||
if (!Config.display.alwaysOn && Config.display.timeout != 0) {
|
||||
display_toggle(true);
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace APRS_IS_Utils {
|
||||
String checkForStartingBytes(const String& packet);
|
||||
|
||||
String buildPacketToUpload(const String& packet);
|
||||
bool processReceivedLoRaMessage(const String& sender, const String& packet);
|
||||
bool processReceivedLoRaMessage(const String& sender, const String& packet, bool thirdParty);
|
||||
void processLoRaPacket(const String& packet);
|
||||
|
||||
String buildPacketToTx(const String& aprsisPacket, uint8_t packetType);
|
||||
|
||||
@@ -12,12 +12,8 @@ bool shouldSleepLowVoltage = false;
|
||||
|
||||
float adcReadingTransformation = (3.3/4095);
|
||||
float voltageDividerCorrection = 0.288;
|
||||
|
||||
// for External Voltage Measurment (MAX = 15Volts !!!)
|
||||
float R1 = 100.000; //in Kilo-Ohms
|
||||
float R2 = 27.000; //in Kilo-Ohms
|
||||
float readingCorrection = 0.125;
|
||||
float multiplyCorrection = 0.035;
|
||||
float readingCorrection = 0.125;
|
||||
float multiplyCorrection = 0.035;
|
||||
|
||||
|
||||
namespace BATTERY_Utils {
|
||||
@@ -81,8 +77,8 @@ namespace BATTERY_Utils {
|
||||
sampleSum += sample;
|
||||
delayMicroseconds(50);
|
||||
}
|
||||
|
||||
float voltage = ((((sampleSum/100)* adcReadingTransformation) + readingCorrection) * ((R1+R2)/R2)) - multiplyCorrection;
|
||||
float voltageDividerTransformation = (Config.battery.voltageDividerR1 + Config.battery.voltageDividerR2) / Config.battery.voltageDividerR2;
|
||||
float voltage = ((((sampleSum/100)* adcReadingTransformation) + readingCorrection) * voltageDividerTransformation) - multiplyCorrection;
|
||||
|
||||
return voltage; // raw voltage without mapping
|
||||
|
||||
|
||||
@@ -73,6 +73,9 @@ void Configuration::writeFile() {
|
||||
data["battery"]["externalVoltagePin"] = battery.externalVoltagePin;
|
||||
data["battery"]["monitorExternalVoltage"] = battery.monitorExternalVoltage;
|
||||
data["battery"]["externalSleepVoltage"] = battery.externalSleepVoltage;
|
||||
data["battery"]["voltageDividerR1"] = battery.voltageDividerR1;
|
||||
data["battery"]["voltageDividerR2"] = battery.voltageDividerR2;
|
||||
|
||||
|
||||
data["bme"]["active"] = bme.active;
|
||||
data["bme"]["heightCorrection"] = bme.heightCorrection;
|
||||
@@ -97,7 +100,9 @@ void Configuration::writeFile() {
|
||||
data["other"]["backupDigiMode"] = backupDigiMode;
|
||||
|
||||
data["other"]["lowPowerMode"] = lowPowerMode;
|
||||
data["other"]["lowVoltageCutOff"] = lowVoltageCutOff;
|
||||
data["other"]["lowVoltageCutOff"] = lowVoltageCutOff;
|
||||
|
||||
data["personalNote"] = personalNote;
|
||||
|
||||
serializeJson(data, configFile);
|
||||
|
||||
@@ -142,6 +147,8 @@ bool Configuration::readFile() {
|
||||
battery.externalVoltagePin = data["battery"]["externalVoltagePin"].as<int>();
|
||||
battery.monitorExternalVoltage = data["battery"]["monitorExternalVoltage"].as<bool>();
|
||||
battery.externalSleepVoltage = data["battery"]["externalSleepVoltage"].as<float>();
|
||||
battery.voltageDividerR1 = data["battery"]["voltageDividerR1"].as<float>();
|
||||
battery.voltageDividerR2 = data["battery"]["voltageDividerR2"].as<float>();
|
||||
|
||||
aprs_is.passcode = data["aprs_is"]["passcode"].as<String>();
|
||||
aprs_is.server = data["aprs_is"]["server"].as<String>();
|
||||
@@ -179,6 +186,8 @@ bool Configuration::readFile() {
|
||||
rebootMode = data["other"]["rebootMode"].as<bool>();
|
||||
rebootModeTime = data["other"]["rebootModeTime"].as<int>();
|
||||
|
||||
personalNote = data["personalNote"].as<String>();
|
||||
|
||||
int stationMode = data["stationMode"].as<int>(); // deprecated but need to specify config version
|
||||
|
||||
if (stationMode == 0) {
|
||||
@@ -330,7 +339,6 @@ void Configuration::init() {
|
||||
ota.username = "";
|
||||
ota.password = "";
|
||||
|
||||
|
||||
rememberStationTime = 30;
|
||||
|
||||
battery.sendInternalVoltage = false;
|
||||
@@ -341,6 +349,8 @@ void Configuration::init() {
|
||||
battery.externalVoltagePin = 34;
|
||||
battery.monitorExternalVoltage = false;
|
||||
battery.externalSleepVoltage = 3.0;
|
||||
battery.voltageDividerR1 = 100.0;
|
||||
battery.voltageDividerR2 = 27.0;
|
||||
|
||||
lowPowerMode = false;
|
||||
lowVoltageCutOff = 0;
|
||||
@@ -350,6 +360,8 @@ void Configuration::init() {
|
||||
rebootMode = false;
|
||||
rebootModeTime = 0;
|
||||
|
||||
personalNote = "";
|
||||
|
||||
Serial.println("All is Written!");
|
||||
}
|
||||
|
||||
|
||||
@@ -75,6 +75,8 @@ public:
|
||||
int externalVoltagePin;
|
||||
bool monitorExternalVoltage;
|
||||
float externalSleepVoltage;
|
||||
float voltageDividerR1;
|
||||
float voltageDividerR2;
|
||||
};
|
||||
|
||||
class BME {
|
||||
@@ -114,6 +116,7 @@ public:
|
||||
bool backupDigiMode;
|
||||
bool rebootMode;
|
||||
int rebootModeTime;
|
||||
String personalNote;
|
||||
std::vector<WiFi_AP> wifiAPs;
|
||||
WiFi_Auto_AP wifiAutoAP;
|
||||
BEACON beacon;
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace DIGI_Utils {
|
||||
String Addressee = AddresseeAndMessage.substring(0, AddresseeAndMessage.indexOf(":"));
|
||||
Addressee.trim();
|
||||
if (Addressee == Config.callsign) { // it's a message for me!
|
||||
queryMessage = APRS_IS_Utils::processReceivedLoRaMessage(Sender, AddresseeAndMessage);
|
||||
queryMessage = APRS_IS_Utils::processReceivedLoRaMessage(Sender, AddresseeAndMessage, thirdPartyPacket);
|
||||
}
|
||||
}
|
||||
if (!queryMessage) {
|
||||
|
||||
@@ -12,12 +12,12 @@ extern int freqError;
|
||||
|
||||
namespace QUERY_Utils {
|
||||
|
||||
String process(const String& query, const String& station, const uint8_t queryOrigin) {
|
||||
String process(const String& query, const String& station, bool queryFromAPRSIS, bool thirdParty) {
|
||||
String answer;
|
||||
if (query=="?APRS?" || query=="?aprs?" || query=="?Aprs?" || query=="H" || query=="h" || query=="HELP" || query=="Help" || query=="help" || query=="?") {
|
||||
answer.concat("?APRSV ?APRSP ?APRSL ?APRSH ?WHERE callsign");
|
||||
} else if (query=="?APRSV" || query=="?aprsv" || query=="?Aprsv") {
|
||||
answer = "CA2RXU_LoRa_iGate 1.3 v";
|
||||
answer = "CA2RXU_LoRa_iGate 1.4 v";
|
||||
answer.concat(versionDate);
|
||||
} else if (query=="?APRSP" || query=="?aprsp" || query=="?Aprsp") {
|
||||
answer = "iGate QTH: ";
|
||||
@@ -53,18 +53,17 @@ namespace QUERY_Utils {
|
||||
processedStation += ' ';
|
||||
}
|
||||
String queryAnswer = Config.callsign;
|
||||
queryAnswer += ">APLRG1,";
|
||||
if (queryOrigin == 1) { // from APRS-IS
|
||||
queryAnswer += "TCPIP,qAC::";
|
||||
} else { // else == 0 , from LoRa
|
||||
if (Config.beacon.path == "") {
|
||||
queryAnswer += "RFONLY::";
|
||||
} else {
|
||||
queryAnswer += "RFONLY,";
|
||||
queryAnswer += ">APLRG1";
|
||||
if (queryFromAPRSIS) {
|
||||
queryAnswer += ",TCPIP,qAC";
|
||||
} else {
|
||||
if (!thirdParty) queryAnswer += ",RFONLY";
|
||||
if (Config.beacon.path != "") {
|
||||
queryAnswer += ",";
|
||||
queryAnswer += Config.beacon.path;
|
||||
queryAnswer += "::";
|
||||
}
|
||||
}
|
||||
queryAnswer += "::";
|
||||
queryAnswer += processedStation;
|
||||
queryAnswer += ":";
|
||||
queryAnswer += answer;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
namespace QUERY_Utils {
|
||||
|
||||
String process(const String& query, const String& station, const uint8_t queryOrigin);
|
||||
String process(const String& query, const String& station, bool queryFromAPRSIS, bool thirdParty);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ extern const char web_bootstrap_js[] asm("_binary_data_embed_bootstrap_js_gz_sta
|
||||
extern const char web_bootstrap_js_end[] asm("_binary_data_embed_bootstrap_js_gz_end");
|
||||
extern const size_t web_bootstrap_js_len = web_bootstrap_js_end - web_bootstrap_js;
|
||||
|
||||
|
||||
namespace WEB_Utils {
|
||||
|
||||
AsyncWebServer server(80);
|
||||
@@ -141,16 +140,17 @@ namespace WEB_Utils {
|
||||
|
||||
Config.battery.sendInternalVoltage = request->hasParam("battery.sendInternalVoltage", true);
|
||||
Config.battery.monitorInternalVoltage = request->hasParam("battery.monitorInternalVoltage", true);
|
||||
Config.battery.internalSleepVoltage = request->getParam("battery.internalSleepVoltage", true)->value().toFloat();
|
||||
Config.battery.internalSleepVoltage = request->getParam("battery.internalSleepVoltage", true)->value().toFloat();
|
||||
|
||||
Config.battery.sendExternalVoltage = request->hasParam("battery.sendExternalVoltage", true);
|
||||
if (Config.battery.sendExternalVoltage) {
|
||||
Config.battery.externalVoltagePin = request->getParam("battery.externalVoltagePin", true)->value().toInt();
|
||||
Config.battery.voltageDividerR1 = request->getParam("battery.voltageDividerR1", true)->value().toFloat();
|
||||
Config.battery.voltageDividerR2 = request->getParam("battery.voltageDividerR2", true)->value().toFloat();
|
||||
}
|
||||
Config.battery.monitorExternalVoltage = request->hasParam("battery.monitorExternalVoltage", true);
|
||||
Config.battery.externalSleepVoltage = request->getParam("battery.externalSleepVoltage", true)->value().toFloat();
|
||||
|
||||
|
||||
Config.battery.externalSleepVoltage = request->getParam("battery.externalSleepVoltage", true)->value().toFloat();
|
||||
|
||||
Config.bme.active = request->hasParam("bme.active", true);
|
||||
Config.bme.heightCorrection = request->getParam("bme.heightCorrection", true)->value().toInt();
|
||||
Config.bme.temperatureCorrection = request->getParam("bme.temperatureCorrection", true)->value().toFloat();
|
||||
@@ -158,36 +158,30 @@ namespace WEB_Utils {
|
||||
Config.beacon.symbol = "_";
|
||||
}
|
||||
|
||||
|
||||
Config.syslog.active = request->hasParam("syslog.active", true);
|
||||
if (Config.syslog.active) {
|
||||
Config.syslog.server = request->getParam("syslog.server", true)->value();
|
||||
Config.syslog.port = request->getParam("syslog.port", true)->value().toInt();
|
||||
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);
|
||||
|
||||
Config.tnc.enableServer = request->hasParam("tnc.enableServer", true);
|
||||
Config.tnc.enableSerial = request->hasParam("tnc.enableSerial", true);
|
||||
Config.tnc.acceptOwn = request->hasParam("tnc.acceptOwn", true);
|
||||
|
||||
|
||||
Config.rebootMode = request->hasParam("other.rebootMode", true);
|
||||
Config.rebootModeTime = request->getParam("other.rebootModeTime", true)->value().toInt();
|
||||
|
||||
|
||||
Config.ota.username = request->getParam("ota.username", true)->value();
|
||||
Config.ota.password = request->getParam("ota.password", true)->value();
|
||||
|
||||
Config.rememberStationTime = request->getParam("other.rememberStationTime", true)->value().toInt();
|
||||
|
||||
Config.rememberStationTime = request->getParam("other.rememberStationTime", true)->value().toInt();
|
||||
|
||||
|
||||
Config.backupDigiMode = request->hasParam("other.backupDigiMode", true);
|
||||
|
||||
|
||||
Config.lowPowerMode = request->hasParam("other.lowPowerMode", true);
|
||||
Config.lowVoltageCutOff = request->getParam("other.lowVoltageCutOff", true)->value().toDouble();
|
||||
|
||||
Config.personalNote = request->getParam("personalNote", true)->value();
|
||||
|
||||
Config.writeFile();
|
||||
|
||||
AsyncWebServerResponse *response = request->beginResponse(302, "text/html", "");
|
||||
|
||||
Reference in New Issue
Block a user