+
-
-
-
-
-
-
@@ -422,11 +401,11 @@
ttlvalue: 0,
ttlStatus: false,
newTTL: null,
- ethPassStatus: false,
+ ipPassMode: "Unspecified",
+ ipPassStatus: false,
+ usbNetMode: "Unspecified",
+ currentUsbNetMode: "Unknown",
DNSProxyStatus: true,
- USBModeStatus: true,
- fullScanModeType: "",
- scanStart: false,
closeModal() {
this.confirmModal = false;
@@ -461,6 +440,7 @@
this.atCommandResponse = data;
this.isLoading = false;
this.isClean = false;
+ this.fetchCurrentSettings();
})
.catch((error) => {
console.error("Error: ", error);
@@ -502,87 +482,76 @@
this.showRebootModal();
},
- ethPassthroughEnable() {
- this.atcmd = 'AT+QMAP="MPDN_RULE",0,1,0,1,1,"FF:FF:FF:FF:FF:FF"';
- this.sendATCommand();
- this.fetchCurrentSettings();
+ ipPassThroughEnable() {
+ if (this.ipPassMode != "Unspecified") {
+ if (this.ipPassMode == "ETH") {
+ this.atcmd =
+ 'AT+QMAP="MPDN_RULE",0,1,0,1,1,"FF:FF:FF:FF:FF:FF"';
+ this.sendATCommand();
+ } else if (this.ipPassMode == "USB") {
+ this.atcmd =
+ 'AT+QMAP="MPDN_RULE",0,1,0,3,1,"FF:FF:FF:FF:FF:FF"';
+ this.sendATCommand();
+ } else {
+ console.error("Invalid IP Passthrough Mode");
+ }
+ } else {
+ console.error("IP Passthrough Mode not specified");
+ }
},
- ethPassthroughDisable() {
+ ipPassThroughDisable() {
this.atcmd = 'AT+QMAP="MPDN_RULE",0';
this.sendATCommand();
- this.fetchCurrentSettings();
},
onBoardDNSProxyEnable() {
this.atcmd = 'AT+QMAP="DHCPV4DNS","enable"';
- this.sendATCommand();
- this.fetchCurrentSettings();
+ this.sendATCommand().then(() => {
+ this.fetchCurrentSettings();
+ });
},
onBoardDNSProxyDisable() {
this.atcmd = 'AT+QMAP="DHCPV4DNS","disable"';
- this.sendATCommand();
- this.fetchCurrentSettings();
+ this.sendATCommand().then(() => {
+ this.fetchCurrentSettings();
+ });
},
- usbModeEnable() {
- this.atcmd = "AT+QMAPWAC=1";
- this.sendATCommand();
- this.fetchCurrentSettings();
- },
-
- usbModeDisable() {
- this.atcmd = "AT+QMAPWAC=0";
- this.sendATCommand();
- this.fetchCurrentSettings();
- },
-
- scanLTE() {
- this.atcmd = 'AT+QENG="neighbourcell"';
- this.sendATCommand();
- },
-
- scanNSA() {
- this.atcmd =
- 'AT+QNWCFG="nr5g_meas_info",1;+QNWCFG="nr5g_meas_info"';
- this.sendATCommand();
- },
-
- fullScanMode() {
- switch (this.fullScanModeType) {
- case "LTE":
- this.atcmd = "AT+QSCAN=1,1";
- this.scanStart = true;
- this.atCommandResponse =
- "Scanning all available LTE networks... This might take a while.";
- this.sendATCommand();
- this.scanStart = false;
- break;
- case "NR5G":
- this.atcmd = "AT+QSCAN=2,1";
- this.scanStart = true;
- this.atCommandResponse =
- "Scanning all available NR5G-SA networks... This might take a while.";
- this.sendATCommand();
- this.scanStart = false;
- break;
- case "ALL":
- this.atcmd = "AT+QSCAN=3,1";
- this.scanStart = true;
- this.atCommandResponse =
- "Scanning all available networks... This might take a while.";
- this.sendATCommand();
- this.scanStart = false;
- break;
- default:
- alert("Select a Scan Mode First");
+ usbNetModeChanger() {
+ if (this.usbNetMode != "Unspecified") {
+ if (this.usbNetMode == "RMNET") {
+ this.atcmd = 'AT+QCFG="usbnet",0;';
+ this.sendATCommand().then(() => {
+ this.rebootDevice();
+ });
+ } else if (this.usbNetMode == "ECM") {
+ this.atcmd = 'AT+QCFG="usbnet",1;';
+ this.sendATCommand().then(() => {
+ this.rebootDevice();
+ });
+ } else if (this.usbNetMode == "MBIM") {
+ this.atcmd = 'AT+QCFG="usbnet",2;';
+ this.sendATCommand().then(() => {
+ this.rebootDevice();
+ });
+ } else if (this.usbNetMode == "RNDIS") {
+ this.atcmd = 'AT+QCFG="usbnet",3;';
+ this.sendATCommand().then(() => {
+ this.rebootDevice();
+ });
+ } else {
+ console.log("USB Net Mode Invalid");
+ }
+ } else {
+ console.error("USB Net Mode not specified");
}
},
fetchCurrentSettings() {
this.fetchATCommand =
- 'AT+QMAP="MPDN_RULE";+QMAP="DHCPV4DNS";+QMAPWAC?';
+ 'AT+QMAP="MPDN_RULE";+QMAP="DHCPV4DNS";+QCFG="usbnet"';
fetch(
"/cgi-bin/get_atcommand?" +
new URLSearchParams({
@@ -596,15 +565,16 @@
// Set the value of currentSettingsResponse
this.currentSettingsResponse = data;
const currentData = data.split("\n");
+ console.log("Lines: ", currentData);
const testEthpass = currentData[1].match(
/\+QMAP: "MPDN_rule",0,0,0,0,0/
);
if (testEthpass) {
- this.ethPassStatus = false;
+ this.ipPassStatus = false;
} else {
- this.ethPassStatus = true;
+ this.ipPassStatus = true;
}
const testDNSProxy = currentData[6].match(
@@ -617,12 +587,20 @@
this.DNSProxyStatus = false;
}
- const testUSBMode = currentData[8].match(/\+QMAPWAC: 1/);
+ const testUSBNet = currentData[8].match(
+ /\+QCFG: "usbnet",(\d)/
+ );
- if (testUSBMode) {
- this.USBModeStatus = true;
+ if (testUSBNet[1] == "0") {
+ this.currentUsbNetMode = "RMNET";
+ } else if (testUSBNet[1] == "1") {
+ this.currentUsbNetMode = "ECM";
+ } else if (testUSBNet[1] == "2") {
+ this.currentUsbNetMode = "MBIM";
+ } else if (testUSBNet[1] == "3") {
+ this.currentUsbNetMode = "RNDIS";
} else {
- this.USBModeStatus = false;
+ this.currentUsbNetMode = "Unknown";
}
// clear atcmd
@@ -666,8 +644,8 @@
});
},
init() {
- this.fetchTTL();
this.fetchCurrentSettings();
+ this.fetchTTL();
},
};
}
diff --git a/simpleupdates/scripts/update_simpleadmin.sh b/simpleupdates/scripts/update_simpleadmin.sh
index 314356a..cbaea5c 100644
--- a/simpleupdates/scripts/update_simpleadmin.sh
+++ b/simpleupdates/scripts/update_simpleadmin.sh
@@ -158,6 +158,7 @@ echo -e "\e[1;31m2) Installing simpleadmin from the $GITTREE branch\e[0m"
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/settings.html
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/sms.html
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/logout.html
+ wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/scanner.html
sleep 1
cd $SIMPLE_ADMIN_DIR/www/js
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/js/alpinejs.min.js
@@ -178,6 +179,7 @@ echo -e "\e[1;31m2) Installing simpleadmin from the $GITTREE branch\e[0m"
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/cgi-bin/get_ttl_status
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/cgi-bin/set_ttl
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/cgi-bin/send_sms
+ wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/cgi-bin/get_uptime
sleep 1
cd /
chmod +x $SIMPLE_ADMIN_DIR/www/cgi-bin/*