configuration path repack
This commit is contained in:
parent
353d7357dc
commit
20687cd9d2
25
README.md
25
README.md
|
|
@ -1,16 +1,17 @@
|
|||
# Richonguzman / CD2RXU LoRa APRS iGate
|
||||
# Richonguzman / CD2RXU LoRa APRS iGate/Digirepeater
|
||||
# Firmware for Tx and Rx !!!
|
||||
|
||||
LoRa APRS iGATE for:
|
||||
- LILYGO ESP32 LoRa v2-1-1.6
|
||||
LoRa APRS iGATE/Digirepeater for:
|
||||
- LILYGO ESP32 LoRa32 v2-1-1.6
|
||||
- ESP32 Wroom Dev + SX1278 LoRa Module for a DIY Version
|
||||
|
||||
__________________________________________
|
||||
|
||||
Achievements:
|
||||
- listening to LoRa packets the same as messages for Stations/Callsing in near 80Kms.
|
||||
- transmiting messages listened from APRS-IS to LoRa
|
||||
|
||||
- Rx LoRa packets and upload to APRS-IS servers
|
||||
- Be able to listen for 80kms or more Stations/Callsing.
|
||||
- Tx LoRa packets from APRS-IS feed.
|
||||
- Digirepeater Modes.
|
||||
__________________________________________
|
||||
|
||||
Instrucctions (add your information into the '/data/igate_conf.json'):
|
||||
|
|
@ -25,7 +26,16 @@ Instrucctions (add your information into the '/data/igate_conf.json'):
|
|||
|
||||
5.- Change "aprs_is">"passcode" from "XYZVW" to yours (remember that is 5 digits integer).
|
||||
|
||||
6.- Change "lora">"enableTx" to _"true"_ ONLY(!) if you are an valid Ham Operator
|
||||
6.- Change "stationMode" value to other than 1 ONLY(!) if you are an valid Ham Operator.
|
||||
|
||||
__________________________________________
|
||||
|
||||
Digirepeater Modes:
|
||||
1.- iGate (only Rx).
|
||||
2.- iGate (Tx and Rx) HAM LICENSE REQUIRED!
|
||||
3.- Digirepeater (Rx Freq = Tx Freq) HAM LICENSE REQUIRED!
|
||||
4.- Digirepeater (Rx Freq != Tx Freq) HAM LICENSE REQUIRED!
|
||||
5.- iGate changes to Digirepeater when it looses APRS-IS+WiFi connection (on development).
|
||||
|
||||
__________________________________________
|
||||
Versions:
|
||||
|
|
@ -36,6 +46,7 @@ Versions:
|
|||
- 2023.05.19 Saving Last-Heard Stations for validating Tx Responses
|
||||
- 2023.05.23 Processing Query's from RF/LoRa or APRS-IS (Send "Help" Message to test)
|
||||
- 2023.06.06 Full repack of Code and adding _enableTx_ only for Ham Ops
|
||||
- 2023.06.08 Adding Digirepeater Funtions
|
||||
__________________________________________
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
"server": "soam.aprs2.net",
|
||||
"port": 14580,
|
||||
"softwareName": "ESP32_LoRa_iGate",
|
||||
"softwareVersion": "0.1.1",
|
||||
"softwareVersion": "1.2",
|
||||
"reportingDistance": 30
|
||||
},
|
||||
"lora": {
|
||||
|
|
|
|||
|
|
@ -17,12 +17,11 @@
|
|||
#include <ESPAsyncWebServer.h>
|
||||
#include <AsyncElegantOTA.h>*/
|
||||
|
||||
#define VERSION "2023.06.07"
|
||||
#define VERSION "2023.06.08"
|
||||
|
||||
Configuration Config;
|
||||
WiFiClient espClient;
|
||||
//AsyncWebServer server(80);
|
||||
String ConfigurationFilePath = "/igate_conf.json";
|
||||
Configuration Config(ConfigurationFilePath);
|
||||
|
||||
int myWiFiAPIndex = 0;
|
||||
int myWiFiAPSize = Config.wifiAPs.size();
|
||||
|
|
@ -63,6 +62,9 @@ void loop() {
|
|||
utils::checkBeaconInterval();
|
||||
show_display(firstLine, secondLine, thirdLine, fourthLine, 0);
|
||||
DIGI_Utils::processPacket(LoRa_Utils::receivePacket());
|
||||
if (statusAfterBoot) {
|
||||
utils::processStatus();
|
||||
}
|
||||
} else if (stationMode==1 || stationMode==2 ) { // iGate (1 Only Rx / 2 Rx+Tx)
|
||||
unsigned long currentWiFiMillis = millis();
|
||||
if ((WiFi.status() != WL_CONNECTED) && (currentWiFiMillis - previousWiFiMillis >= currentWiFi->checkInterval*1000)) {
|
||||
|
|
@ -143,6 +145,7 @@ void loop() {
|
|||
}
|
||||
} else {
|
||||
Serial.println(stationMode);
|
||||
// stationMode = 5
|
||||
// this mode is only for when iGate loses Wifi and transforms into Digirepeater
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +1,13 @@
|
|||
#include "configuration.h"
|
||||
#include "display.h"
|
||||
|
||||
Configuration::Configuration(const String &filePath) {
|
||||
_filePath = filePath;
|
||||
Configuration::Configuration() {
|
||||
_filePath = "/igate_conf.json";
|
||||
if (!SPIFFS.begin(false)) {
|
||||
Serial.println("SPIFFS Mount Failed");
|
||||
return;
|
||||
}
|
||||
readFile(SPIFFS, _filePath.c_str());
|
||||
readFile(SPIFFS, _filePath.c_str());
|
||||
}
|
||||
|
||||
void Configuration::readFile(fs::FS &fs, const char *fileName) {
|
||||
|
|
@ -60,7 +61,8 @@ void Configuration::readFile(fs::FS &fs, const char *fileName) {
|
|||
|
||||
void Configuration::validateConfigFile(String currentBeaconCallsign) {
|
||||
if (currentBeaconCallsign == "NOCALL-10") {
|
||||
Serial.println("Change Callsign in /data/wx_report_config.json");
|
||||
Serial.println("Change Callsign in /data/igate_conf.json");
|
||||
show_display("ERROR", "Change your settings", "'igate_conf.json'", "--> File System image", 0);
|
||||
while (true) {
|
||||
delay(1000);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,11 +60,10 @@ public:
|
|||
Display display;
|
||||
|
||||
|
||||
Configuration(const String &filePath);
|
||||
Configuration();
|
||||
void validateConfigFile(String currentBeaconCallsign);
|
||||
|
||||
private:
|
||||
Configuration() {}; // Hide default constructor
|
||||
void readFile(fs::FS &fs, const char *fileName) ;
|
||||
String _filePath;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,8 +22,16 @@ extern String iGateBeaconPacket;
|
|||
namespace utils {
|
||||
|
||||
void processStatus() {
|
||||
delay(1000);
|
||||
espClient.write((Config.callsign + ">APLRG1,qAC:>" + Config.defaultStatus + "\n").c_str());
|
||||
String status = Config.callsign + ">APLRG1";
|
||||
if (stationMode==1 || stationMode==2) {
|
||||
delay(1000);
|
||||
status += ",qAC:>" + Config.defaultStatus;
|
||||
espClient.write((status + "\n").c_str());
|
||||
} else {
|
||||
delay(5000);
|
||||
status += ":>" + Config.defaultStatus;
|
||||
LoRa_Utils::sendNewPacket("APRS", status);
|
||||
}
|
||||
statusAfterBoot = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue