From e93970e67989059456f53c94ddbad88ef5daffdc Mon Sep 17 00:00:00 2001 From: Russel Yasol Date: Sat, 11 May 2024 10:42:10 +0800 Subject: [PATCH 1/3] fixed NSA bandwidth parsing and SMS layout --- simpleadmin/www/index.html | 7 +- simpleadmin/www/sms.html | 574 +++++++++++++++++++------------------ 2 files changed, 292 insertions(+), 289 deletions(-) diff --git a/simpleadmin/www/index.html b/simpleadmin/www/index.html index 3bcce41..b89ec70 100644 --- a/simpleadmin/www/index.html +++ b/simpleadmin/www/index.html @@ -925,9 +925,10 @@ // Calculate the LTE bandwidth this.bandwidth = + "UL " + this.calculate_lte_bw(lte_bw_ul) + - " MHz, " + - "NR " + + " MHz / " + + "DL " + this.calculate_lte_bw(lte_bw_dl) + " MHz"; @@ -1003,7 +1004,7 @@ // Calculate the NR bandwidth this.bandwidth += - " / " + this.calculate_nr_bw(nr_bw).toString() + " MHz"; + " / NR " + this.calculate_nr_bw(nr_bw).toString() + " MHz"; // Parse the PCIs this.pcc_pci = lines[28].split(",")[5].replace(/"/g, ""); diff --git a/simpleadmin/www/sms.html b/simpleadmin/www/sms.html index 32f0597..a45ef65 100644 --- a/simpleadmin/www/sms.html +++ b/simpleadmin/www/sms.html @@ -1,301 +1,303 @@ - - - - Simple Admin - - - - - - - + + + + Simple Admin + + + + + + + - - - - - - -
-
- + + + + + + +
+
+ -
-
-
-
SMS Manager
-
-
-
-
- - -
-

Fetching SMS...

-
- - - - -
-
-
-
-
- - -
+
+
+
+
SMS Manager
+
+
+
+
+ + +
+

Fetching SMS...

+
+ + + + +
+
+
+ + -
- - -
-
- - - -
- -
-
-
-
-
-
-
- - + - + init() { + // Send AT+CMGF=1 once to set the modem to text mode + const atcmd = "AT+CMGF=1"; + fetch( + "/cgi-bin/get_atcommand?" + + new URLSearchParams({ + atcmd: atcmd, + }) + ) + .then((response) => response.text()) + .then((data) => { + console.log(data); + }) + .finally(() => { + this.requestSMS(); + }); + }, + }; + } + + From 969602cfdceb330f5fd2bb3bf17ec1abf193b433 Mon Sep 17 00:00:00 2001 From: Russel Yasol Date: Sun, 12 May 2024 08:59:12 +0800 Subject: [PATCH 2/3] added init() to network save change --- simpleadmin/www/network.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/simpleadmin/www/network.html b/simpleadmin/www/network.html index 737322d..057f06a 100644 --- a/simpleadmin/www/network.html +++ b/simpleadmin/www/network.html @@ -589,6 +589,8 @@ this.prefNetwork = settings.prefNetwork; this.nrModeControl = settings.nrModeControl; this.bands = settings.bands; + }).then(() => { + this.init(); }); }, lockSelectedBands() { From 2c062c51ff9445758dad9482cb5e7ee9a004cce6 Mon Sep 17 00:00:00 2001 From: Russel Yasol Date: Sun, 12 May 2024 10:51:41 +0800 Subject: [PATCH 3/3] fixed network settings endless loop --- simpleadmin/www/network.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/simpleadmin/www/network.html b/simpleadmin/www/network.html index 057f06a..a53e3bf 100644 --- a/simpleadmin/www/network.html +++ b/simpleadmin/www/network.html @@ -589,9 +589,7 @@ this.prefNetwork = settings.prefNetwork; this.nrModeControl = settings.nrModeControl; this.bands = settings.bands; - }).then(() => { - this.init(); - }); + }) }, lockSelectedBands() { // Get the updated this.currentNetworkMode = selectedMode; and this.updatedLockedBands = newCheckedValues;