diff --git a/simpleadmin/www/cgi-bin/get_atcommand b/simpleadmin/www/cgi-bin/get_atcommand index 710625b..9d81981 100644 --- a/simpleadmin/www/cgi-bin/get_atcommand +++ b/simpleadmin/www/cgi-bin/get_atcommand @@ -16,8 +16,8 @@ fi MYATCMD=$(printf '%b\n' "${atcmd//%/\\x}") if [ -n "${MYATCMD}" ]; then x=$(urldecode "$atcmd") - # Initialize wait time to 1 second - wait_time=1000 + # Initialize wait time to 200 ms + wait_time=200 while true; do runcmd=$(echo -en "$x\r\n" | microcom -t $wait_time /dev/ttyOUT2) # Check if "OK" or "ERROR" is present in the response diff --git a/simpleadmin/www/cgi-bin/get_ttl_status b/simpleadmin/www/cgi-bin/get_ttl_status index dc2d54b..03d366b 100644 --- a/simpleadmin/www/cgi-bin/get_ttl_status +++ b/simpleadmin/www/cgi-bin/get_ttl_status @@ -1,7 +1,7 @@ #!/bin/bash # Check iptables for ttlvalue -ttlvalue=$(/opt/bin/sudo /usr/sbin/iptables -w 5 -t mangle -vnL | grep TTL | awk '{print $13}' | head -n1) +ttlvalue=$(iptables -t mangle -vnL | awk '/TTL/ {print $13; exit}') ttlenabled=true; # Set Variables @@ -17,4 +17,4 @@ cat </dev/null || true - /opt/bin/sudo /usr/sbin/ip6tables -w 5 -t mangle -D POSTROUTING -o rmnet+ -j HL --hl-set ${ttlcheck} &>/dev/null || true + if [ !-z "${ttlcheck}" ]; then + iptables -t mangle -D POSTROUTING -o rmnet+ -j TTL --ttl-set ${ttlcheck} &>/dev/null || true + ip6tables -t mangle -D POSTROUTING -o rmnet+ -j HL --hl-set ${ttlcheck} &>/dev/null || true fi # Echo TTL to file echo $setTTL > /usrdata/simplefirewall/ttlvalue # Set Start Service - /opt/bin/sudo /usrdata/simplefirewall/ttl-override start + /usrdata/simplefirewall/ttl-override start fi # Check iptables for ttlvalue -ttlvalue=$(/opt/bin/sudo /usr/sbin/iptables -w 5 -t mangle -vnL | grep TTL | awk '{print $13}') +ttlvalue=$(iptables -t mangle -vnL | grep TTL | awk '{print $13}') ttlenabled=true; # Set Variables @@ -58,5 +58,4 @@ cat </dev/null || true + ip6tables -t mangle -D POSTROUTING -o rmnet+ -j HL --hl-set ${ttlcheck} &>/dev/null || true + fi + + # Echo TTL to file + echo $setTTL > /usrdata/simplefirewall/ttlvalue + + # Set Start Service + /usrdata/simplefirewall/ttl-override start +fi + + + +# Check iptables for ttlvalue +ttlvalue=$(iptables -t mangle -vnL | grep TTL | awk '{print $13}') +ttlenabled=true; + +# Set Variables +if [ -z "${ttlvalue}" ]; then + ttlvalue=0 + ttlenabled=false +fi + +echo "Content-type: text/json" +echo "" +cat < --> - - + + - - + +
@@ -52,18 +52,19 @@ SMS - - + - - - @@ -208,7 +209,7 @@
- + - + +
@@ -40,7 +43,9 @@ @@ -272,7 +275,6 @@ } } }" > -
- +
@@ -322,7 +326,9 @@ :class="getProgressBarClass()" :style="'width: ' + rsrqNRPercentage + '%'" > - + @@ -360,7 +366,9 @@ :class="getProgressBarClass()" :style="'width: ' + rsrpLTEPercentage + '%'" > - + @@ -398,7 +406,9 @@ :class="getProgressBarClass()" :style="'width: ' + rsrpNRPercentage + '%'" > - + @@ -436,7 +446,9 @@ :class="getProgressBarClass()" :style="'width: ' + sinrLTEPercentage +'%'" > - + @@ -474,7 +486,9 @@ :class="getProgressBarClass()" :style="'width: ' + sinrNRPercentage +'%'" > - + @@ -503,7 +517,7 @@
- + @@ -43,7 +46,12 @@ Home - - + - - - @@ -552,7 +558,7 @@ updatedLockedBands: null, sim: "-", newSim: null, - cellLockStatus: null, + cellLockStatus: "Unknown", bands: "Fetching Bands...", init() { // Function to populate checkboxes @@ -787,11 +793,10 @@ } // Construct the AT command using the valid pairs - let atcmd = `+QNWLOCK="common/4g",${cellNum},${validPairs + let atcmd = `AT+QNWLOCK="common/4g",${cellNum},${validPairs .map((pair) => `${pair.earfcn},${pair.pci}`) .join(",")}`; - atcmd = "AT+CFUN=0;" + atcmd + ";+CFUN=1"; - + // Mock data this.showModal = true; @@ -824,8 +829,7 @@ } // Construct the AT command using the valid pairs - let atcmd = `+QNWLOCK="common/5g",${earfcn},${pci},${scs},${band}`; - atcmd = "AT+CFUN=0;" + atcmd + ";+CFUN=1"; + let atcmd = `AT+QNWLOCK="common/5g",${earfcn},${pci},${scs},${band}`; // Mock data this.showModal = true; @@ -844,7 +848,7 @@ }, cellLockDisableLTE() { // Send the atcmd command to reset the locked bands - const atcmd = 'AT+CFUN=0;+QNWLOCK="common/4g,0;+CFUN=1"'; + const atcmd = 'AT+QNWLOCK="common/4g,0"'; this.showModal = true; this.sendATcommand(atcmd); @@ -860,7 +864,7 @@ }, cellLockDisableNR() { // Send the atcmd command to reset the locked bands - const atcmd = 'AT+CFUN=0;+QNWLOCK="common/5g,0;+CFUN=1"'; + const atcmd = 'AT+QNWLOCK="common/5g,0"'; this.showModal = true; @@ -925,6 +929,6 @@ }); }); - + diff --git a/simpleadmin/www/settings.html b/simpleadmin/www/settings.html index b205cad..da1fbdd 100644 --- a/simpleadmin/www/settings.html +++ b/simpleadmin/www/settings.html @@ -4,12 +4,15 @@ Simple Admin - - + + + + + - - + +
@@ -39,14 +42,16 @@ Simple Network -
- + - - + + +
@@ -50,11 +53,13 @@ Simple Settings -
- +