+
Here are some useful commands:
@@ -240,7 +252,7 @@
return {
isLoading: false,
atcmd: null,
- atCommandResponse: '',
+ atCommandResponse: "",
sendAtCommand() {
this.isLoading = true;
fetch(
@@ -265,6 +277,27 @@
},
};
}
+
+ function sendRebootCommand() {
+ var isRebootClicked = true;
+ console.log("Reboot command triggered");
+ var atcmd = "AT+CFUN=1,1";
+ fetch(
+ "/cgi-bin/get_atcommand?" +
+ new URLSearchParams({
+ atcmd: atcmd,
+ })
+ )
+ .then((res) => {
+ return res.text();
+ })
+ .then((data) => {
+ console.log(data); // Logging the response for debugging purposes
+ })
+ .catch((error) => {
+ console.error("Error:", error);
+ });
+ }