From e93970e67989059456f53c94ddbad88ef5daffdc Mon Sep 17 00:00:00 2001 From: Russel Yasol Date: Sat, 11 May 2024 10:42:10 +0800 Subject: [PATCH] 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(); + }); + }, + }; + } + +