From 7af7ca5fba0a74010e942c0658057c4e815f4ffb Mon Sep 17 00:00:00 2001 From: SQ2CPA Date: Thu, 7 Mar 2024 17:45:41 +0100 Subject: [PATCH 1/5] feat: enable esp prog debugger --- platformio.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platformio.ini b/platformio.ini index f3bbf1c..231db75 100644 --- a/platformio.ini +++ b/platformio.ini @@ -40,6 +40,8 @@ lib_deps = extra_scripts = pre:tools/compress.py +debug_tool = esp-prog + [env:ttgo-lora32-v21] board = ttgo-lora32-v21 build_flags = -Werror -Wall -DTTGO_T_LORA32_V2_1 -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 From 8a7d91a7f6fd2bd659cb4cb0a5264da7b383d2d6 Mon Sep 17 00:00:00 2001 From: SQ2CPA Date: Thu, 7 Mar 2024 17:46:11 +0100 Subject: [PATCH 2/5] improvement: workaround for windows via lnk --- installer/Install Upgrade.lnk | Bin 0 -> 1648 bytes installer/Install with Factory Reset.lnk | Bin 0 -> 1670 bytes installer/install_upgrade.sh | 8 +++++++- installer/install_with_factory_reset.sh | 17 +++++++++++++++++ 4 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 installer/Install Upgrade.lnk create mode 100644 installer/Install with Factory Reset.lnk diff --git a/installer/Install Upgrade.lnk b/installer/Install Upgrade.lnk new file mode 100644 index 0000000000000000000000000000000000000000..e9f7c7be38d37ce056e04a9257a1a8dda5e0015e GIT binary patch literal 1648 zcmah}ZA_C_6n=_|;HpAk2u7t&F_?|g0)EvI(K_sm0cIU7OAWBLn-xlnt+bjf>My_W zBN!bfO2FaB5?R86VzQ5*3H~Ar!-P!|w`Kc*ahVRXMRZHpb8cxBB=NjC_nz~-=bn4c zJ@?!l05qv_9D!anqWCi;Ku5W=;ILntKCDS?`>U&9&#|^5^O)4_W zek~o)Jv4ceuKbjMHw}i%8OSx895JKkLOF~|DYrMZCBf#YbNNC66d@6_@%X!=r6Eg& zeMyI&HdXOrIDNYt-H%{{2X%14hY$j^Ny7(Iyjl+gf^Khq9OR}bP92@izx(&EkBYEPKC3JyddQ@kre6lAf*lt}owf?va00WX92I=PcxM z2Wo;oe~!}=*zXV2WBj5{v+qgOJB=%!?R+ci@5E27IZdN?A0?mBbn7pk9z6J}|NZpI zOV~OW|L|m1uLxtA+9x_BFxs_L&hj+Ptacr%<6~~ss_MJ23&jczGTTbpee$-f%q{)* z5OD9o%@omo*lv4Y^bAo*QkW=9g(H_5&}y~7x?!ZWEr995ee^BN#IZ%qxOEBW@9#%L zLjyL3Cy;hWi|U~vj9ALijTSr|y^681F=X(d5}C^b`ZQY0taIaS+6%LOHeas(eff{S zl&zAQstYY$H$fI)K3Ps*kpS{j0TVP4AVC0?2xkFUyQvmxxmZk)#DY;omP7%S;)}a5 z)2SBo1bERxPH0LTavfuU$ZcfF(=eLV^LX3hq^qNGRgEowT$6jHHq4|TemC%>%)B1B&vkyY;&QHVZE0xl%8B}rq&_40O!SV5Km|1^9% zY{v0z9peKj?SYTpC?xI@1KC?TaeCM5kj>j>f@9h{vsxCBPLaj&Zzt@<-|Sd#{`$X^ zbE}%Y-`5k5Wu8mL%BD7w*O2p+ln(>AxjSB}1ebF2$R=HB-mRUd o{FV+&k-oh!+_;qZ9xJsZKWt_>1ONa4 literal 0 HcmV?d00001 diff --git a/installer/Install with Factory Reset.lnk b/installer/Install with Factory Reset.lnk new file mode 100644 index 0000000000000000000000000000000000000000..a20d19af82ef60e1aa292261aed55fa3a4783f00 GIT binary patch literal 1670 zcmah}e@xR?5dRbvVe1qEGB9q`DF(AqT0l4Jh-_8pi~+Pt%hCm~t)XaXv6WU6v+XbU z1Gj}`iU|^MIAS6u7!(tK1WnjqWMP=#B+)JI4~)xn5RKrLu+P2HPLO2x&AoT``QE#C zckkZY20)V<#}VjPBZ|LA0(6wS3qJ8{(?>O_9e?!{)Q)QECnGxcEmW48h<$8ar%6R- z`EO-Ix(6mt(y3n(@TS3VG6T70lOtyIpHKm#QY!4t9Z9fx>RrB207Xc|LOi;5q%35q zw6EyW)22FJ4CiilvG*Zt@Sq+p_z*&XHfi{9mRIY+K+x^Y&ja3{$M2>k^ZD&Djlqh8 z^cRF1UgU$zk&X(PnYz!mx?2aQ*QIxd-LZHDt+a>EO1!N{(mBq=8w_`LcQCLt z6Q8}>g6plo;NTz{8ym4PJdLy;wWt{x!I-52y=cSK_-RZ`Odx}WN@Ong>C}Ff2mB<>Oe*<0@C+_yl7Y<8OojybQ-T3JLoN*2fW zzOWZx+4he4@;@oxu4(c9)IdCzc`g+zuey=Ej-02Yd>E)1`Q(TsnEW$h12sVkh~=qS z&B=OS$9oW#o7vcgG7S z!KK_hvPn;xcXRhqzopAkr0*;YH@!x@RtzlU_^K}-oH?&A?Hp+9kGrwSBY2el1&!%F AyZ`_I literal 0 HcmV?d00001 diff --git a/installer/install_upgrade.sh b/installer/install_upgrade.sh index 81a238e..8a1b947 100644 --- a/installer/install_upgrade.sh +++ b/installer/install_upgrade.sh @@ -4,6 +4,12 @@ echo "IF THIS IS YOUR FIRST FLASH ON THIS BOARD PLEASE USE install_with_factory_ read -p "Enter COM port (for example /dev/ttyS5): " port -python3 ./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 +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" \ No newline at end of file diff --git a/installer/install_with_factory_reset.sh b/installer/install_with_factory_reset.sh index e69de29..0d70661 100644 --- a/installer/install_with_factory_reset.sh +++ b/installer/install_with_factory_reset.sh @@ -0,0 +1,17 @@ +#!/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" \ No newline at end of file From a46a97691d26bb2c84c5bab444c2d135dd4bd7b1 Mon Sep 17 00:00:00 2001 From: SQ2CPA Date: Thu, 7 Mar 2024 17:46:38 +0100 Subject: [PATCH 3/5] feat: stationMode removed --- data/igate_conf.json | 48 ++-- data_embed/index.html | 581 +++++++++++++++++++++++++++++----------- data_embed/script.js | 218 +++++++++------ src/LoRa_APRS_iGate.cpp | 75 +++--- src/aprs_is_utils.cpp | 50 ++-- src/aprs_is_utils.h | 2 +- src/configuration.cpp | 205 ++++++++++---- src/configuration.h | 51 +++- src/digi_utils.cpp | 47 +--- src/digi_utils.h | 2 +- src/gps_utils.cpp | 55 ++-- src/lora_utils.cpp | 66 ++--- src/ota_utils.cpp | 3 + src/power_utils.cpp | 10 - src/power_utils.h | 1 - src/query_utils.cpp | 6 +- src/syslog_utils.cpp | 5 +- src/utils.cpp | 162 ++++------- src/utils.h | 2 +- src/web_utils.cpp | 61 +++-- src/web_utils.h | 2 - src/wifi_utils.cpp | 39 +-- 22 files changed, 991 insertions(+), 700 deletions(-) diff --git a/data/igate_conf.json b/data/igate_conf.json index 9c6974f..6dd0b59 100644 --- a/data/igate_conf.json +++ b/data/igate_conf.json @@ -1,46 +1,43 @@ { "callsign": "NOCALL-10", - "stationMode": 2, - "iGateComment": "LoRa_APRS_iGate", "wifi": { "autoAP": { "password": "1234567890", "powerOff": 10 }, - "AP": [ - { - "ssid": "WIFI_1", - "password": "WIFI_1_password", - "latitude": 0.0, - "longitude": 0.0 - }, - { - "ssid": "WIFI_2", - "password": "WIFI_2_password", - "latitude": 0.0, - "longitude": 0.0 - } - ] + "AP": [] + }, + "beacon": { + "latitude": 0.0, + "longitude": 0.0, + "comment": "LoRa APRS", + "interval": 15, + "overlay": "L", + "symbol": "#", + "path": "WIDE1-1", + "sendViaAPRSIS": false, + "sendViaRF": false }, "digi": { - "comment": "LoRa_APRS_Digirepeater", - "latitude": 0.0, - "longitude": 0.0 + "mode": 0 }, "aprs_is": { + "active": false, "passcode": "XYZVW", "server": "rotate.aprs2.net", "port": 14580, - "reportingDistance": 30 + "filter": "", + "toRF": false }, "lora": { - "iGateFreq": 433775000, - "digirepeaterTxFreq": 433775000, - "digirepeaterRxFreq": 433900000, + "txFreq": 433775000, + "rxFreq": 433775000, "spreadingFactor": 12, "signalBandwidth": 125000, "codingRate4": 5, - "power": 20 + "power": 20, + "txActive": false, + "rxActive": true }, "display": { "alwaysOn": true, @@ -60,9 +57,6 @@ "password": "" }, "other": { - "beaconInterval": 15, - "igateSendsLoRaBeacons": false, - "igateRepeatsLoRaPackets": false, "rememberStationTime": 30, "sendBatteryVoltage": false, "externalVoltageMeasurement": false, diff --git a/data_embed/index.html b/data_embed/index.html index dcf0771..296e6b4 100644 --- a/data_embed/index.html +++ b/data_embed/index.html @@ -3,7 +3,7 @@ - LoRa iGate + LoRa iGate & Digi software − Ricardo Guzman CA2RXU @@ -18,6 +18,7 @@ >CA2RXU's LoRa iGate Configuration
+ OTA
@@ -479,55 +651,62 @@ Digipeating - Define the location coordinates for the - Digipeater mode, and a special comment if - you like. + Define the Digipeater mode
-
+
Repeater Mode - -
-
- - + + +
-
- - -
+

@@ -572,7 +751,7 @@ >Password
+
+
+
+ + + + Telemetry +
+ Define the telemetry +
+
+
+
+
+ + +
+
+
+
+
+
+
@@ -606,17 +831,34 @@
-
+
+
+ + +
+
+
+
+
@@ -625,25 +867,6 @@ >
-
- -
- - minutes -
-
@@ -693,39 +916,6 @@ >
-
-
-
- - -
-
-
-
- - -
-
-

@@ -763,7 +953,7 @@ Enable syslog
@@ -825,17 +1015,47 @@
+
+
+ + +
+
+
+
+ + +
+
@@ -853,18 +1073,17 @@
Hz
-
+
+
+ + +
@@ -950,10 +1206,13 @@ >
diff --git a/data_embed/script.js b/data_embed/script.js index eed32c2..e4f5446 100644 --- a/data_embed/script.js +++ b/data_embed/script.js @@ -75,9 +75,13 @@ function loadSettings(settings) { currentSettings = settings; // General document.getElementById("callsign").value = settings.callsign; - document.getElementById("stationMode").value = settings.stationMode; + // document.getElementById("stationMode").value = settings.stationMode; document.getElementById("bme.active").checked = settings.bme.active; - document.getElementById("iGateComment").value = settings.iGateComment; + document.getElementById("beacon.comment").value = settings.beacon.comment; + document.getElementById("beacon.symbol").value = settings.beacon.symbol; + document.getElementById("beacon.overlay").value = settings.beacon.overlay; + + document.getElementById("action.symbol").value = settings.beacon.overlay + settings.beacon.symbol; document.querySelector(".list-networks").innerHTML = ""; @@ -94,23 +98,15 @@ function loadSettings(settings) { // Increment the name, id, and for attributes const attributeName = `wifi.AP.${networkCount}`; networkElement.innerHTML = ` -
+
-
- +
+
-
- - -
-
- - -
-
+