diff --git a/data/igate_conf.json b/data/igate_conf.json
index 46cb1b3..d08594d 100644
--- a/data/igate_conf.json
+++ b/data/igate_conf.json
@@ -1,13 +1,13 @@
{
- "callsign": "CD2RXU-11",
- "stationMode": 2,
+ "callsign": "NOCALL-10",
+ "stationMode": 1,
"iGateComment": "LoRa_APRS_iGate",
"wifi": {
"AP": [
- { "ssid": "Richon",
- "password": "k4fPnmg5qnyf",
- "latitude": -32.8805195,
- "longitude": -71.4282433
+ { "ssid": "Wifi_1",
+ "password": "wifi_1_password",
+ "latitude": 0.0000000,
+ "longitude": 0.0000000
},
{ "ssid": "Wifi_2",
"password": "wifi_2_password",
@@ -22,8 +22,8 @@
"longitude": 0.0000000
},
"aprs_is": {
- "passcode": "23201",
- "server": "soam.aprs2.net",
+ "passcode": "VWXYZ",
+ "server": "euro.aprs2.net",
"port": 14580,
"reportingDistance": 30
},
@@ -50,8 +50,8 @@
"active": false
},
"ota": {
- "username":"richon",
- "password": "totoro"
+ "username":"",
+ "password": ""
},
"other": {
"beaconInterval": 15,
diff --git a/data/script.js b/data/script.js
new file mode 100644
index 0000000..f7873f1
--- /dev/null
+++ b/data/script.js
@@ -0,0 +1,16 @@
+// Retrieve JSON data from the JSON file in SPIFFS
+fetch('igate_conf.json')
+ .then(response => response.json())
+ .then(data => {
+ // Process the JSON data
+ displayJSONData(data);
+ })
+ .catch(error => {
+ console.error('Error fetching JSON:', error);
+ });
+
+// Display JSON data in the HTML
+function displayJSONData(data) {
+ const jsonContainer = document.getElementById('json-container');
+ jsonContainer.innerHTML = JSON.stringify(data, null, 2);
+}
diff --git a/data/testx.html b/data/testx.html
new file mode 100644
index 0000000..42411f8
--- /dev/null
+++ b/data/testx.html
@@ -0,0 +1,10 @@
+
+
+
+ JSON Data Example
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/LoRa_APRS_iGate.cpp b/src/LoRa_APRS_iGate.cpp
index f5f79b6..100280a 100644
--- a/src/LoRa_APRS_iGate.cpp
+++ b/src/LoRa_APRS_iGate.cpp
@@ -20,7 +20,7 @@
Configuration Config;
WiFiClient espClient;
-String versionDate = "2023.08.27";
+String versionDate = "2023.08.29";
int myWiFiAPIndex = 0;
int myWiFiAPSize = Config.wifiAPs.size();
WiFi_AP *currentWiFi = &Config.wifiAPs[myWiFiAPIndex];
@@ -53,7 +53,7 @@ void setup() {
LoRa_Utils::setup();
Utils::validateDigiFreqs();
iGateBeaconPacket = GPS_Utils::generateBeacon();
- Utils::startOTAServer();
+ Utils::startServer();
SYSLOG_Utils::setup();
BME_Utils::setup();
}
@@ -77,7 +77,7 @@ void loop() {
if (lastStationModeState == 1) {
iGateBeaconPacket = GPS_Utils::generateBeacon();
lastStationModeState = 0;
- Utils::startOTAServer();
+ Utils::startServer();
}
APRS_IS_Utils::loop();
} else { // DigiRepeater Mode
diff --git a/src/utils.cpp b/src/utils.cpp
index b3a1763..78148ac 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -262,7 +262,7 @@ void typeOfPacket(String packet, String packetType) {
}
}
-void startOTAServer() {
+void startServer() {
if (stationMode==1 || stationMode==2 || (stationMode==5 && WiFi.status() == WL_CONNECTED)) {
server.on("/", HTTP_GET, [](AsyncWebServerRequest *request) {
request->send(200, "text/plain", "Hi " + Config.callsign + ", \n\nthis is your (Richonguzman/CD2RXU) LoRa iGate , version " + versionDate + ".\n\nTo update your firmware or filesystem go to: http://" + getLocalIP().substring(getLocalIP().indexOf(":")+3) + "/update\n\n\n73!");
@@ -276,6 +276,10 @@ void startOTAServer() {
request->send(LittleFS, "/index2.html", "text/html");
});
+ server.on("/testx", HTTP_GET, [](AsyncWebServerRequest *request) {
+ request->send(LittleFS, "/testx.html", "text/html");//"application/json");
+ });
+
if (Config.ota.username != "" && Config.ota.password != "") {
AsyncElegantOTA.begin(&server, Config.ota.username.c_str(), Config.ota.password.c_str());
} else {
diff --git a/src/utils.h b/src/utils.h
index d37e405..f70f164 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -14,7 +14,7 @@ void checkDisplayInterval();
void checkWiFiInterval();
void validateDigiFreqs();
void typeOfPacket(String packet, String packetType);
-void startOTAServer();
+void startServer();
}