diff --git a/RMxxx_rgmii_toolkit.sh b/RMxxx_rgmii_toolkit.sh index 3a50c56..08e8820 100644 --- a/RMxxx_rgmii_toolkit.sh +++ b/RMxxx_rgmii_toolkit.sh @@ -834,7 +834,7 @@ install_ttyd() { wget -O scripts/ttyd.bash "https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/ttyd/scripts/ttyd.bash" && chmod +x scripts/ttyd.bash wget -O systemd/ttyd.service "https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/ttyd/systemd/ttyd.service" cp systemd/ttyd.service /lib/systemd/system/ - ln -sf /lib/systemd/system/ttyd.service /etc/systemd/system/multi-user.target.wants/ + ln -sf /lib/systemd/system/ttyd.service /lib/systemd/system/multi-user.target.wants/ # Enabling and starting ttyd service systemctl daemon-reload diff --git a/simpleadmin/scripts/modemstatus_parse.sh b/simpleadmin/scripts/modemstatus_parse.sh index cab2c34..74eb0ee 100644 --- a/simpleadmin/scripts/modemstatus_parse.sh +++ b/simpleadmin/scripts/modemstatus_parse.sh @@ -44,7 +44,7 @@ get_secondary_bands() { 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 '"') + NR_BAND=$(echo "$OX" | grep '+QCAINFO: "SCC"' | grep -o '"NR5G BAND [0-9]\+"' | tr -d '"'| sed '1d') # Check if both SCC and NR bands are non-empty if [ -n "$SCC_BANDS" ] && [ -n "$NR_BAND" ]; then @@ -530,4 +530,4 @@ MODEZ=$(echo $MODE | tr -d '"') } > /tmp/signal.txt # Pregenerate JSON File -/usrdata/simpleadmin/scripts/tojson.sh /tmp/signal.txt > /tmp/modemstatus.json \ No newline at end of file +/usrdata/simpleadmin/scripts/tojson.sh /tmp/signal.txt > /tmp/modemstatus.json diff --git a/simpleadmin/www/index.html b/simpleadmin/www/index.html index 1b340b9..d392ef1 100644 --- a/simpleadmin/www/index.html +++ b/simpleadmin/www/index.html @@ -256,28 +256,28 @@ }, }; } - // function getSignalData() { - // return { - // csqData: {}, - // lastUpdate: new Date().toLocaleString(), - // getcsq() { - // fetch("/cgi-bin/get_csq") - // .then((res) => res.json()) - // .then((data) => { - // this.csqData = data; - // this.lastUpdate = new Date( - // data.LASTUPDATE * 1000 - // ).toLocaleString(); - // }); - // }, - // init() { - // this.getcsq(); - // setInterval(() => { - // this.getcsq(); - // }, 30000); - // }, - // }; - // } + function getSignalData() { + return { + csqData: {}, + lastUpdate: new Date().toLocaleString(), + getcsq() { + fetch("/cgi-bin/get_csq") + .then((res) => res.json()) + .then((data) => { + this.csqData = data; + this.lastUpdate = new Date( + data.LASTUPDATE * 1000 + ).toLocaleString(); + }); + }, + init() { + this.getcsq(); + setInterval(() => { + this.getcsq(); + }, 30000); + }, + }; + }