From b6139c8ed3aae9730b4799eb94a66201321532c0 Mon Sep 17 00:00:00 2001
From: iamromulan <50184035+iamromulan@users.noreply.github.com>
Date: Fri, 23 Feb 2024 19:04:10 -0500
Subject: [PATCH 01/23] Single Command: Download and run the toolkit
-Edit install instructions
---
README.md | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index 50aecb0..7619b93 100644
--- a/README.md
+++ b/README.md
@@ -19,13 +19,21 @@
- Run `adb devices` to make sure your modem is detected by adb
- Run `adb shell ping 8.8.8.8` to make sure the shell can access the internet. If you get an error, make sure the modem is connected to a cellular network and make sure `AT+QMAPWAC=1` as covered in the troubleshooting section: [I Can't get internet access from the Ethernet port (Common)](https://github.com/iamromulan/quectel-rgmii-configuration-notes/tree/main?tab=readme-ov-file#i-cant-get-internet-access-from-the-ethernet-port-common)
- If you don't get an error you should be getting replies back endlessly, press `CTRL-C` to stop it.
- - Run the following commands
+ - Simply Copy/Paste this into your Command Prompt/Shell
```bash
-adb shell wget -P /tmp https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/main/RMxxx_rgmii_toolkit.sh
-adb shell chmod +x /tmp/RMxxx_rgmii_toolkit.sh
-adb shell sh /tmp/RMxxx_rgmii_toolkit.sh
+adb shell "cd /tmp && wget -O RMxxx_rgmii_toolkit.sh https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/development/RMxxx_rgmii_toolkit.sh && chmod +x RMxxx_rgmii_toolkit.sh && ./RMxxx_rgmii_toolkit.sh"
```
-**After running that last command:**
+
+**Or, if you want to stay in the modems shell when you are done**
+
+```
+adb shell
+```
+Then run
+```
+cd /tmp && wget -O RMxxx_rgmii_toolkit.sh https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/development/RMxxx_rgmii_toolkit.sh && chmod +x RMxxx_rgmii_toolkit.sh && ./RMxxx_rgmii_toolkit.sh
+```
+**You should see:**

## Tailscale Installation and Config
From d21816632971ddb28fd3df2f972b884d02319076 Mon Sep 17 00:00:00 2001
From: iamromulan <50184035+iamromulan@users.noreply.github.com>
Date: Fri, 23 Feb 2024 19:06:21 -0500
Subject: [PATCH 02/23] Fix branch name in link
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 7619b93..f641bfe 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,7 @@
- If you don't get an error you should be getting replies back endlessly, press `CTRL-C` to stop it.
- Simply Copy/Paste this into your Command Prompt/Shell
```bash
-adb shell "cd /tmp && wget -O RMxxx_rgmii_toolkit.sh https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/development/RMxxx_rgmii_toolkit.sh && chmod +x RMxxx_rgmii_toolkit.sh && ./RMxxx_rgmii_toolkit.sh"
+adb shell "cd /tmp && wget -O RMxxx_rgmii_toolkit.sh https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/main/RMxxx_rgmii_toolkit.sh && chmod +x RMxxx_rgmii_toolkit.sh && ./RMxxx_rgmii_toolkit.sh"
```
**Or, if you want to stay in the modems shell when you are done**
@@ -31,7 +31,7 @@ adb shell
```
Then run
```
-cd /tmp && wget -O RMxxx_rgmii_toolkit.sh https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/development/RMxxx_rgmii_toolkit.sh && chmod +x RMxxx_rgmii_toolkit.sh && ./RMxxx_rgmii_toolkit.sh
+cd /tmp && wget -O RMxxx_rgmii_toolkit.sh https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/main/RMxxx_rgmii_toolkit.sh && chmod +x RMxxx_rgmii_toolkit.sh && ./RMxxx_rgmii_toolkit.sh
```
**You should see:**

From dd0f74ae39b0122e6aad2e5a90c6ac256264cbab Mon Sep 17 00:00:00 2001
From: iamromulan <50184035+iamromulan@users.noreply.github.com>
Date: Fri, 23 Feb 2024 19:06:48 -0500
Subject: [PATCH 03/23] Update Tree to main
---
RMxxx_rgmii_toolkit.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/RMxxx_rgmii_toolkit.sh b/RMxxx_rgmii_toolkit.sh
index b0bf586..fd14908 100644
--- a/RMxxx_rgmii_toolkit.sh
+++ b/RMxxx_rgmii_toolkit.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Define toolkit paths
-GITTREE="development"
+GITTREE="main"
TMP_DIR="/tmp"
USRDATA_DIR="/usrdata"
SOCAT_AT_DIR="/usrdata/socat-at-bridge"
From d8ed2fd48fbcea3bc46d41caf94bd3d3973ce6fa Mon Sep 17 00:00:00 2001
From: iamromulan <50184035+iamromulan@users.noreply.github.com>
Date: Sun, 25 Feb 2024 02:21:49 -0500
Subject: [PATCH 04/23] Fix Wget links
---
RMxxx_rgmii_toolkit.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/RMxxx_rgmii_toolkit.sh b/RMxxx_rgmii_toolkit.sh
index fd14908..fd0a6a4 100644
--- a/RMxxx_rgmii_toolkit.sh
+++ b/RMxxx_rgmii_toolkit.sh
@@ -13,7 +13,8 @@ SIMPLE_FIREWALL_SCRIPT="$SIMPLE_FIREWALL_DIR/simplefirewall.sh"
SIMPLE_FIREWALL_SYSTEMD_DIR="$SIMPLE_FIREWALL_DIR/systemd"
SIMPLE_FIREWALL_SERVICE="/lib/systemd/system/simplefirewall.service"
GITHUB_URL="https://github.com/iamromulan/quectel-rgmii-toolkit/archive/refs/heads/$GITTREE.zip"
-GITHUB_SIMPADMIN_FULL_URL="https://github.com/iamromulan/quectel-rgmii-toolkit/archive/refs/heads/simpleadminfullatcmds.zip"
+GITHUB_SIMPADMIN_FULL_URL="https://github.com/iamromulan/quectel-rgmii-toolkit/archive/refs/heads/simpleadminfull.zip"
+GITHUB_SIMPADMIN_NOCMD_URL="https://github.com/iamromulan/quectel-rgmii-toolkit/archive/refs/heads/simpleadminnoatcmds.zip"
GITHUB_SIMPADMIN_TTL_URL="https://github.com/iamromulan/quectel-rgmii-toolkit/archive/refs/heads/simpleadminttlonly.zip"
GITHUB_SIMPADMIN_TEST_URL="https://github.com/iamromulan/quectel-rgmii-toolkit/archive/refs/heads/simpleadmintest.zip"
TAILSCALE_DIR="/usrdata/tailscale/"
From 0179c92213abd22bfe166a062c6a6a85d3d305d7 Mon Sep 17 00:00:00 2001
From: iamromulan <50184035+iamromulan@users.noreply.github.com>
Date: Sun, 25 Feb 2024 23:13:50 -0500
Subject: [PATCH 05/23] Add a delay to give /opt time to mount
---
installentware.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/installentware.sh b/installentware.sh
index e5eb933..c7854e7 100644
--- a/installentware.sh
+++ b/installentware.sh
@@ -125,6 +125,8 @@ Description=Start Entware services
[Service]
Type=oneshot
+# Add a delay to give /opt time to mount
+ExecStartPre=/bin/sleep 5
ExecStart=/opt/etc/init.d/rc.unslung start
RemainAfterExit=yes
From 7bf87e4f3bb5bd47e6a5ce944059474606c08c9c Mon Sep 17 00:00:00 2001
From: iamromulan <50184035+iamromulan@users.noreply.github.com>
Date: Sun, 25 Feb 2024 23:18:33 -0500
Subject: [PATCH 06/23] add opkg update process
---
installentware.sh | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/installentware.sh b/installentware.sh
index c7854e7..3e495f7 100644
--- a/installentware.sh
+++ b/installentware.sh
@@ -137,16 +137,12 @@ EOF
systemctl daemon-reload
ln -s /lib/systemd/system/rc.unslung.service /lib/systemd/system/multi-user.target.wants/rc.unslung.service
systemctl start rc.unslung.service
-
echo 'Info: Congratulations!'
echo 'Info: If there are no errors above then Entware was successfully initialized.'
echo 'Info: Add /opt/bin & /opt/sbin to $PATH variable'
-echo 'Info: Run export PATH=/opt/bin:/opt/sbin:$PATH to do it'
+echo 'Info: Run export PATH=/opt/bin:/opt/sbin:$PATH to do it for this session only'
echo 'Info: opkg at /opt/bin will be linked to /bin but any package you install with opkg will not be automatically.'
ln -sf /opt/bin/opkg /bin
-if [ $TYPE = 'alternative' ]; then
- echo 'Info: Use ssh server from Entware for better compatibility.'
-fi
-echo 'Info: Found a Bug? Please report at https://github.com/Entware/Entware/issues'
+opkg update
# Remount filesystem as read-only
mount -o remount,ro /
From 0b25cbefd8ceb3c9e676a2ff72d03d2926e7829b Mon Sep 17 00:00:00 2001
From: iamromulan <50184035+iamromulan@users.noreply.github.com>
Date: Thu, 29 Feb 2024 00:20:15 -0500
Subject: [PATCH 07/23] Fixed unknown NR5G band
---
simpleadmin/scripts/modemstatus_parse.sh | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/simpleadmin/scripts/modemstatus_parse.sh b/simpleadmin/scripts/modemstatus_parse.sh
index 63e0d44..d2514bf 100644
--- a/simpleadmin/scripts/modemstatus_parse.sh
+++ b/simpleadmin/scripts/modemstatus_parse.sh
@@ -36,11 +36,6 @@ nr_bw() {
esac
}
-if [ ! -f /tmp/modemstatus.txt ]
-then
- /usrdata/simpleadmin/scripts/get_modem_data.py > /dev/null
-fi
-
# Read File
OX=$( /tmp/modnetwork
- if [ -n "$QENG5" ] && [ -n "$LBAND" ] && [ "$RSCP" != "-" ] && [ "$ECIO" != "-" ]; then
- PCI="$PCI, "$(echo $QENG5 | cut -d, -f4)
+ if [ -n "$QENG5" ]; then
+ QENG5=$QENG5",,"
+ PCI=$(echo $QENG5 | cut -d, -f4)
SCHV=$(echo $QENG5 | cut -d, -f8)
- SLBV=$(echo $QENG5 | cut -d, -f9)
+ SLBV=$(echo $QENG5 | cut -d, -f9) # Now correctly captures the NR band
BW=$(echo $QENG5 | cut -d, -f10 | grep -o "[0-9]\{1,3\}")
if [ -n "$SLBV" ]; then
LBAND=$LBAND" n"$SLBV
From 42ef30877f8f291eea5ba2440aea250d15c10405 Mon Sep 17 00:00:00 2001
From: iamromulan <50184035+iamromulan@users.noreply.github.com>
Date: Mon, 11 Mar 2024 23:15:35 -0400
Subject: [PATCH 08/23] Update README.md
Add && cd / to the command to ensure you are working in / again upon script exit
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index f641bfe..66109b5 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,7 @@
- If you don't get an error you should be getting replies back endlessly, press `CTRL-C` to stop it.
- Simply Copy/Paste this into your Command Prompt/Shell
```bash
-adb shell "cd /tmp && wget -O RMxxx_rgmii_toolkit.sh https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/main/RMxxx_rgmii_toolkit.sh && chmod +x RMxxx_rgmii_toolkit.sh && ./RMxxx_rgmii_toolkit.sh"
+adb shell "cd /tmp && wget -O RMxxx_rgmii_toolkit.sh https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/main/RMxxx_rgmii_toolkit.sh && chmod +x RMxxx_rgmii_toolkit.sh && ./RMxxx_rgmii_toolkit.sh" && cd /
```
**Or, if you want to stay in the modems shell when you are done**
@@ -31,7 +31,7 @@ adb shell
```
Then run
```
-cd /tmp && wget -O RMxxx_rgmii_toolkit.sh https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/main/RMxxx_rgmii_toolkit.sh && chmod +x RMxxx_rgmii_toolkit.sh && ./RMxxx_rgmii_toolkit.sh
+cd /tmp && wget -O RMxxx_rgmii_toolkit.sh https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/main/RMxxx_rgmii_toolkit.sh && chmod +x RMxxx_rgmii_toolkit.sh && ./RMxxx_rgmii_toolkit.sh && cd /
```
**You should see:**

From a08f65d02dab5e44ded503dedc90fec3c2d30218 Mon Sep 17 00:00:00 2001
From: iamromulan <50184035+iamromulan@users.noreply.github.com>
Date: Wed, 13 Mar 2024 16:16:09 -0400
Subject: [PATCH 09/23] Add LICENSE
---
LICENSE | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 LICENSE
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..e90cf5c
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,22 @@
+MIT License with Additional Stipulations
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+1. A clear and visible attribution to the original author (you) must be provided in an obvious place in any product, documentation, or interface where the software is utilized. This attribution should include your name and a reference to the original source repository.
+
+2. The Software, or any modified version of it, must not be sold or charged for. However, selling physical products that include the Software is permitted, provided that a clear and visible attribution to the original author (you) is included in an obvious place in the product or accompanying documentation.
+
+3. Any modifications made to the Software must be made available upon request by any party. This includes providing access to the modified source code, along with any accompanying documentation necessary for understanding the modifications.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
From 08e5bc7359db3eee6d19cd5bb09f6b6ffaa86d43 Mon Sep 17 00:00:00 2001
From: dr-dolomite
Date: Sat, 16 Mar 2024 11:01:03 +0800
Subject: [PATCH 10/23] added various fixes and new data fields
---
simpleadmin/scripts/build_modem_status | 16 +-
simpleadmin/scripts/modemstatus_parse.sh | 60 ++-
simpleadmin/scripts/tojson.sh | 39 +-
simpleadmin/www/atcommander.html | 4 +-
simpleadmin/www/index.html | 443 ++++++++++++-----------
simpleadmin/www/ttl.html | 2 +-
6 files changed, 323 insertions(+), 241 deletions(-)
diff --git a/simpleadmin/scripts/build_modem_status b/simpleadmin/scripts/build_modem_status
index 23b5215..def3a5d 100644
--- a/simpleadmin/scripts/build_modem_status
+++ b/simpleadmin/scripts/build_modem_status
@@ -1,9 +1,21 @@
#!/bin/bash
+# Run AT+CGMM to get the modem model
+echo -en "AT+CGMM\r\n" | microcom -t 1000 /dev/ttyOUT > /tmp/modemmodel.txt
+sleep 2
+
+# Run AT+CGCONTRDP once then proceed to while loop
+echo -en "AT+CGCONTRDP\r\n" | microcom -t 1000 /dev/ttyOUT > /tmp/apn.txt
+sleep 2
+
+# Run AT+QUIMSLOT? to get the current sim slot
+echo -en "AT+QUIMSLOT?\r\n" | microcom -t 1000 /dev/ttyOUT > /tmp/simslot.txt
+sleep 2
+
while true; do
# Send request to modem and wait 5 seconds for data
echo -en "AT+QSPN;+CEREG=2;+CEREG?;+CEREG=0;+C5GREG=2;+C5GREG?;+C5GREG=0;+CSQ;+QENG=\"servingcell\";+QRSRP;+QCAINFO;+QNWPREFCFG=\"mode_pref\";+QTEMP\r\n" \
- | microcom -t 3000 /dev/ttyOUT > /tmp/modemstatus.txt
+ | microcom -t 5000 /dev/ttyOUT > /tmp/modemstatus.txt
if [ $? -eq 0 ]
then
# Parse
@@ -13,4 +25,4 @@ while true; do
fi
fi
sleep 25 # Add a sleep to avoid CPU overload
-done
+done
\ No newline at end of file
diff --git a/simpleadmin/scripts/modemstatus_parse.sh b/simpleadmin/scripts/modemstatus_parse.sh
index d2514bf..461f72c 100644
--- a/simpleadmin/scripts/modemstatus_parse.sh
+++ b/simpleadmin/scripts/modemstatus_parse.sh
@@ -36,6 +36,40 @@ nr_bw() {
esac
}
+# Function to get the secondary LTE bands
+get_secondary_bands() {
+ # Extract LTE BANDs from SCC lines
+ SCC_BANDS=$(echo "$OX" | grep '+QCAINFO: "SCC"' | grep -o '"LTE BAND [0-9]\+"' | tr -d '"' | sed '1d')
+
+ # Extract NR5G BANDs from SCC lines
+ NR_BAND=$(echo "$OX" | grep '+QCAINFO: "SCC"' | grep -o '"NR5G BAND [0-9]\+"' | tr -d '"')
+
+ # Check if both SCC and NR bands are non-empty
+ if [ -n "$SCC_BANDS" ] && [ -n "$NR_BAND" ]; then
+ # Concatenate LTE BANDs with NR5G BANDs
+ SC_BANDS="$SCC_BANDS $NR_BAND"
+ else
+ # Set SC_BANDS to the non-empty variable or empty if both are empty
+ SC_BANDS="${SCC_BANDS}${NR_BAND}"
+ fi
+}
+
+# Get the modem model from /tmp/modemmodel.txt and parse it
+MODEM_MODEL=$(n"$SLBV
if [ -n "$BW" ]; then
@@ -194,7 +235,8 @@ case $RAT in
CHANNEL=$CHANNEL", -"
fi
else
- LBAND=$LBAND" nxx (unknown NR5G band)"
+ # removed the (unknown NR5G BAND) and replaced with No NR5G Band to avoid confusion
+ LBAND=$LBAND" No NR5G Band Detected"
CHANNEL=$CHANNEL", -"
fi
RSCP=$RSCP" dBm "$(echo $QENG5 | cut -d, -f5)
@@ -261,6 +303,7 @@ case $RAT in
PCI=$(echo $QENG5 | cut -d, -f8)
CHANNEL=$(echo $QENG5 | cut -d, -f10)
LBAND=$(echo $QENG5 | cut -d, -f11)
+ PC_BAND="NR5G BAND "$LBAND
BW=$(echo $QENG5 | cut -d, -f12)
LBAND="n"$LBAND" (Bandwidth $BW MHz)"
RSCP=$(echo $QENG5 | cut -d, -f13)
@@ -429,12 +472,11 @@ if [ -z "$LAC" ]; then
RNC="-"
fi
-
LUPDATE=$(date +%s)
rm -fR /tmp/signal.txt
MODEZ=$(echo $MODE | tr -d '"')
{
- echo 'PROVIDER="'"$PROVIDER"'"'
+ echo 'PROVIDER="'"$PROVIDER"'"'
echo 'CSQ="'"$CSQ"'"'
echo 'CSQ_PER="'"$CSQ_PER"'"'
echo 'CSQ_RSSI="'"$CSQ_RSSI"'"'
@@ -447,6 +489,11 @@ MODEZ=$(echo $MODE | tr -d '"')
echo 'NETMODE="'"$NETMODE"'"'
echo 'CHANNEL="'"$CHANNEL"'"'
echo 'LBAND="'"$LBAND"'"'
+ echo 'PC_BAND="'"$PC_BAND"'"'
+ echo 'SC_BANDS="'"$SC_BANDS"'"'
+ echo 'APN="'"$APN"'"'
+ echo 'MODEM_MODEL="'"$MODEM_MODEL"'"'
+ echo 'SIMSLOT="'"$SIMSLOT"'"'
echo 'PCI="'"$PCI"'"'
echo 'TEMP="'"$CTEMP"'"'
echo 'SINR="'"$SINR"'"'
@@ -454,6 +501,7 @@ MODEZ=$(echo $MODE | tr -d '"')
echo 'COPS="'"$COPS"'"'
echo 'COPS_MCC="'"$COPS_MCC"'"'
echo 'COPS_MNC="'"$COPS_MNC"'"'
+ echo 'MCCMNC="'"$MCCMNC"'"'
echo 'LAC="'"$LAC"'"'
echo 'LAC_NUM="'""'"'
echo 'CID="'"$CID"'"'
@@ -463,4 +511,4 @@ MODEZ=$(echo $MODE | tr -d '"')
} > /tmp/signal.txt
# Pregenerate JSON File
-/usrdata/simpleadmin/scripts/tojson.sh /tmp/signal.txt > /tmp/modemstatus.json
+/usrdata/simpleadmin/scripts/tojson.sh /tmp/signal.txt > /tmp/modemstatus.json
\ No newline at end of file
diff --git a/simpleadmin/scripts/tojson.sh b/simpleadmin/scripts/tojson.sh
index 199bd94..80295ad 100644
--- a/simpleadmin/scripts/tojson.sh
+++ b/simpleadmin/scripts/tojson.sh
@@ -2,21 +2,32 @@
# sarav (hello@grity.com)
# convert key=value to json
# Created at Gritfy ( Devops Junction )
-#
+# Updated by: dr-dolomite to make it more robust since it was failing on some casess
-file_name=$1
-last_line=$(wc -l < $file_name)
-current_line=0
+file_name="$1"
echo "{"
-while read line
-do
- current_line=$(($current_line + 1))
- if [[ $current_line -ne $last_line ]]; then
- [ -z "$line" ] && continue
- echo $line|awk -F'=' '{ print " \""$1"\" : "$2","}'|grep -iv '\"#'
- else
- echo $line|awk -F'=' '{ print " \""$1"\" : "$2""}'|grep -iv '\"#'
- fi
-done < $file_name
+last_line=$(wc -l < "$file_name")
+
+while IFS='=' read -r key value || [[ -n "$key" ]]; do
+ # Skip empty lines and comments
+ if [[ -z "$key" || "$key" == \#* ]]; then
+ continue
+ fi
+
+ # Trim leading and trailing whitespace from key and value
+ key=$(echo "$key" | awk '{$1=$1};1')
+ value=$(echo "$value" | awk '{$1=$1};1')
+
+ # Print key-value pair in JSON format without surrounding double quotes on value
+ printf ' "%s" : %s' "$key" "$value"
+
+ # Check if not the last line, add comma
+ if [ $((++current_line)) -lt "$last_line" ]; then
+ printf ','
+ fi
+
+ printf '\n'
+done < "$file_name"
+
echo "}"
\ No newline at end of file
diff --git a/simpleadmin/www/atcommander.html b/simpleadmin/www/atcommander.html
index 0896aa2..fd76614 100644
--- a/simpleadmin/www/atcommander.html
+++ b/simpleadmin/www/atcommander.html
@@ -19,7 +19,7 @@