Compare commits

..

No commits in common. "18b99aa4b37ef31ac0f39bc5dc42c2d20dbfac71" and "9c614d890ac494acf9e23e7c6335e755366ec415" have entirely different histories.

7 changed files with 155 additions and 1297 deletions

View File

@ -62,7 +62,6 @@ adb shell
cd /tmp && wget -O RMxxx_rgmii_toolkit.sh https://code.060070.xyz/sky/simple-admin/raw/branch/main/RMxxx_rgmii_toolkit.sh && chmod +x RMxxx_rgmii_toolkit.sh && ./RMxxx_rgmii_toolkit.sh && cd / cd /tmp && wget -O RMxxx_rgmii_toolkit.sh https://code.060070.xyz/sky/simple-admin/raw/branch/main/RMxxx_rgmii_toolkit.sh && chmod +x RMxxx_rgmii_toolkit.sh && ./RMxxx_rgmii_toolkit.sh && cd /
``` ```
**您应该看到:** **您应该看到:**
![工具包](https://github.com/iamromulan/quectel-rgmii-configuration-notes/blob/main/images/iamromulantoolkit.png?raw=true) ![工具包](https://github.com/iamromulan/quectel-rgmii-configuration-notes/blob/main/images/iamromulantoolkit.png?raw=true)
## Tailscale安装和配置 ## Tailscale安装和配置

View File

@ -458,15 +458,13 @@ tailscale_menu() {
echo -e "\e[1;32mTailscale Menu\e[0m" echo -e "\e[1;32mTailscale Menu\e[0m"
echo -e "\e[1;32m1) Install/Update Tailscale\e[0m" echo -e "\e[1;32m1) Install/Update Tailscale\e[0m"
echo -e "\e[1;36m2) Configure Tailscale\e[0m" echo -e "\e[1;36m2) Configure Tailscale\e[0m"
echo -e "\e[1;31m3) Uninstall Tailscale\e[0m" echo -e "\e[1;31m3) Return to Main Menu\e[0m"
echo -e "\e[1;93m4) Return to Main Menu\e[0m"
read -p "Enter your choice: " tailscale_choice read -p "Enter your choice: " tailscale_choice
case $tailscale_choice in case $tailscale_choice in
1) install_update_tailscale;; 1) install_update_tailscale;;
2) configure_tailscale;; 2) configure_tailscale;;
3) uninstall_tailscale;; 3) break;;
4) break;;
*) echo "Invalid option";; *) echo "Invalid option";;
esac esac
done done
@ -486,37 +484,6 @@ install_update_tailscale() {
echo -e "\e[1;32m Tailscale has been updated/installed.\e[0m" echo -e "\e[1;32m Tailscale has been updated/installed.\e[0m"
} }
# Function to uninstall Tailscale
uninstall_tailscale() {
echo -e "\e[1;31mUninstalling Tailscale...\e[0m"
# Stop and logout from Tailscale
if [ -f "/usrdata/tailscale/tailscale" ]; then
/usrdata/tailscale/tailscale logout
/usrdata/tailscale/tailscale down
fi
# Stop services
systemctl stop tailscale 2>/dev/null
systemctl stop tailscale-webui 2>/dev/null
# Remove service files
rm -f /lib/systemd/system/tailscale.service
rm -f /lib/systemd/system/tailscale-webui.service
rm -f /lib/systemd/system/tailscale-webui-trigger.service
rm -f /lib/systemd/system/multi-user.target.wants/tailscale-webui-trigger.service
# Remove Tailscale files and directories
rm -rf /usrdata/tailscale
rm -f /bin/tailscale
rm -f /bin/tailscaled
# Reload systemd
systemctl daemon-reload
echo -e "\e[1;32mTailscale has been uninstalled.\e[0m"
}
# Function to Configure Tailscale # Function to Configure Tailscale
configure_tailscale() { configure_tailscale() {
while true; do while true; do
@ -801,28 +768,65 @@ else
fi fi
while true; do while true; do
echo "//////////////////////////////////////////////////////////////////"; echo " .%+: "
echo "// //"; echo " .*@@@-. "
echo "// //"; echo " :@@@@- "
echo "// :'######::'####:'##::::'##:'########::'##:::::::'########: //"; echo " @@@@#. "
echo "// '##... ##:. ##:: ###::'###: ##.... ##: ##::::::: ##.....:: //"; echo " -@@@@#. "
echo "// ##:::..::: ##:: ####'####: ##:::: ##: ##::::::: ##::::::: //"; echo " :. %@@@@: -# "
echo "// . ######::: ##:: ## ### ##: ########:: ##::::::: ######::: //"; echo " .+- #@@@@%.+@- "
echo "// :..... ##:: ##:: ##. #: ##: ##.....::: ##::::::: ##...:::: //"; echo " .#- . +@@@@# #@- "
echo "// '##::: ##:: ##:: ##:.:: ##: ##:::::::: ##::::::: ##::::::: //"; echo " -@*@*@% @@@@@::@@= "
echo "// . ######::'####: ##:::: ##: ##:::::::: ########: ########: //"; echo ".+%@@@@@@@@@%=. =@@@@# #@@- .. "
echo "// :......:::....::..:::::..::..:::::::::........::........:: //"; echo " .@@@@@: :@@@@@ =@@@..%= "
echo "// :::'###::::'########::'##::::'##:'####:'##::: ##: //"; echo " -::@-.+. @@@@@.=@@@- =@- "
echo "// ::'## ##::: ##.... ##: ###::'###:. ##:: ###:: ##: //"; echo " .@- .@@@@@:.@@@* @@. "
echo "// :'##:. ##:: ##:::: ##: ####'####:: ##:: ####: ##: //"; echo " .%- -@@@@@:=@@@@ @@# "
echo "// '##:::. ##: ##:::: ##: ## ### ##:: ##:: ## ## ##: //"; echo " .#- .%@@@@@@#. +@@@@@.#@@@@ @@@."
echo "// #########: ##:::: ##: ##. #: ##:: ##:: ##. ####: //"; echo " .*- .@@@@@@@@@@=. @@@@@@ @@@@@ @@@:"
echo "// ##.... ##: ##:::: ##: ##:.:: ##:: ##:: ##:. ###: //"; echo " :. .%@@@@@@@@@@@%. .@@@@@+:@@@@@ @@@-"
echo "// ##:::: ##: ########:: ##:::: ##:'####: ##::. ##: //"; echo " -@@@@@@@@@@@@@@@..@@@@@@.-@@@@@ .@@@-"
echo "// ..:::::..::........:::..:::::..::....::..::::..:: //"; echo " -@@@@@@@@@@%. .@@@@@@. @@@@@+ =@@@="
echo "// //"; echo " =@@@@@@@@* .@@@@@@. @@@@@@..@@@@-"
echo "// By iamromulan //"; echo " #@@@@@@@@-*@@@@@%..@@@@@@+ #@@@@-"
echo "//////////////////////////////////////////////////////////////////"; echo " @@@@@@:.-@@@@@@. @@@@@@= %@@@@@."
echo " .@@@@. *@@@@@@- .+@@@@@@-.@@@@@@+ "
echo " %@@. =@@@@@*. +@@@@@@%.-@@@@@@% "
echo " .@@ .@@@@@= :@@@@@@@@..@@@@@@@= "
echo " =@.+@@@@@. -@@@@@@@*.:@@@@@@@*. "
echo " %.*@@@@= .@@@@@@@-.:@@@@@@@+. "
echo " ..@@@@= .@@@@@@: #@@@@@@@: "
echo " .@@@@ +@@@@..%@@@@@+. "
echo " .@@@. @@@@.:@@@@+. "
echo " @@@. @@@. @@@* .@. "
echo " :@@@ %@@..@@#. *@ "
echo " -*: .@@* :@@. @@. -..@@ "
echo " =@@@@@@.*@- :@% @* =@:=@# "
echo " .@@@-+@@@@:%@..%- ...@%:@@: "
echo " .@@. @@-%@: .%@@*@@%. "
echo " :@@ :+ *@ *@@#*@@@. "
echo " =@@@.@@@@ "
echo " .*@@@:=@@@@: "
echo " .@@@@:.@@@@@: "
echo " .@@@@#.-@@@@@. "
echo " #@@@@: =@@@@@- "
echo " .@@@@@..@@@@@@* "
echo " -@@@@@. @@@@@@#. "
echo " -@@@@@ @@@@@@% "
echo " @@@@@. #@@@@@@. "
echo " :@@@@# =@@@@@@% "
echo " @@@@@: @@@@@@@: "
echo " *@@@@ @@@@@@@. "
echo " .@@@@ @@@@@@@ "
echo " #@@@. @@@@@@* "
echo " @@@# @@@@@@@ "
echo " .@@+=@@@@@@. "
echo " *@@@@@@ "
echo " :@@@@@= "
echo " .@@@@@@. "
echo " :@@@@@*. "
echo " .=@@@@@- "
echo " :+##+. "
echo -e "\e[92m" echo -e "\e[92m"
echo "Welcome to iamromulan's RGMII Toolkit script for Quectel RMxxx Series modems!" echo "Welcome to iamromulan's RGMII Toolkit script for Quectel RMxxx Series modems!"

File diff suppressed because it is too large Load Diff

View File

@ -11,35 +11,89 @@ else
firmware_revision="UNKNOWN" firmware_revision="UNKNOWN"
fi fi
echo "=============================================================="
echo "=============================================================="
echo "=============================================================="
echo "=============================================================="
echo "=============================================================="
echo "=============================================================="
echo "=============================================================="
echo "=============================================================="
echo "=============================================================="
echo "=============================================================="
echo "=============================================================="
echo "=============================================================="
echo "=============================================================="
echo "=============================================================="
echo "=============================================================="
echo "=============================================================="
echo "=============================================================="
# Start your Actual echo output here, 17 lines omitted for mobile compatibility. ttyd font needs to be size 25. # Start your Actual echo output here, 17 lines omitted for mobile compatibility. ttyd font needs to be size 25.
# Echo "Logo" # Echo "Logo"
echo "//////////////////////////////////////////////////////////////////"; echo " .%+: "
echo "// //"; echo " .*@@@-. "
echo "// //"; echo " :@@@@- "
echo "// :'######::'####:'##::::'##:'########::'##:::::::'########: //"; echo " @@@@#. "
echo "// '##... ##:. ##:: ###::'###: ##.... ##: ##::::::: ##.....:: //"; echo " -@@@@#. "
echo "// ##:::..::: ##:: ####'####: ##:::: ##: ##::::::: ##::::::: //"; echo " :. %@@@@: -# "
echo "// . ######::: ##:: ## ### ##: ########:: ##::::::: ######::: //"; echo " .+- #@@@@%.+@- "
echo "// :..... ##:: ##:: ##. #: ##: ##.....::: ##::::::: ##...:::: //"; echo " .#- . +@@@@# #@- "
echo "// '##::: ##:: ##:: ##:.:: ##: ##:::::::: ##::::::: ##::::::: //"; echo " -@*@*@% @@@@@::@@= "
echo "// . ######::'####: ##:::: ##: ##:::::::: ########: ########: //"; echo ".+%@@@@@@@@@%=. =@@@@# #@@- .. "
echo "// :......:::....::..:::::..::..:::::::::........::........:: //"; echo " .@@@@@: :@@@@@ =@@@..%= "
echo "// :::'###::::'########::'##::::'##:'####:'##::: ##: //"; echo " -::@-.+. @@@@@.=@@@- =@- "
echo "// ::'## ##::: ##.... ##: ###::'###:. ##:: ###:: ##: //"; echo " .@- .@@@@@:.@@@* @@. "
echo "// :'##:. ##:: ##:::: ##: ####'####:: ##:: ####: ##: //"; echo " .%- -@@@@@:=@@@@ @@# "
echo "// '##:::. ##: ##:::: ##: ## ### ##:: ##:: ## ## ##: //"; echo " .#- .%@@@@@@#. +@@@@@.#@@@@ @@@."
echo "// #########: ##:::: ##: ##. #: ##:: ##:: ##. ####: //"; echo " .*- .@@@@@@@@@@=. @@@@@@ @@@@@ @@@:"
echo "// ##.... ##: ##:::: ##: ##:.:: ##:: ##:: ##:. ###: //"; echo " :. .%@@@@@@@@@@@%. .@@@@@+:@@@@@ @@@-"
echo "// ##:::: ##: ########:: ##:::: ##:'####: ##::. ##: //"; echo " -@@@@@@@@@@@@@@@..@@@@@@.-@@@@@ .@@@-"
echo "// ..:::::..::........:::..:::::..::....::..::::..:: //"; echo " -@@@@@@@@@@%. .@@@@@@. @@@@@+ =@@@="
echo "// //"; echo " =@@@@@@@@* .@@@@@@. @@@@@@..@@@@-"
echo "// By iamromulan //"; echo " #@@@@@@@@-*@@@@@%..@@@@@@+ #@@@@-"
echo "//////////////////////////////////////////////////////////////////"; echo " @@@@@@:.-@@@@@@. @@@@@@= %@@@@@."
echo "===================================================================" echo " .@@@@. *@@@@@@- .+@@@@@@-.@@@@@@+ "
echo " %@@. =@@@@@*. +@@@@@@%.-@@@@@@% "
echo " .@@ .@@@@@= :@@@@@@@@..@@@@@@@= "
echo " =@.+@@@@@. -@@@@@@@*.:@@@@@@@*. "
echo " %.*@@@@= .@@@@@@@-.:@@@@@@@+. "
echo " ..@@@@= .@@@@@@: #@@@@@@@: "
echo " .@@@@ +@@@@..%@@@@@+. "
echo " .@@@. @@@@.:@@@@+. "
echo " @@@. @@@. @@@* .@. "
echo " :@@@ %@@..@@#. *@ "
echo " -*: .@@* :@@. @@. -..@@ "
echo " =@@@@@@.*@- :@% @* =@:=@# "
echo " .@@@-+@@@@:%@..%- ...@%:@@: "
echo " .@@. @@-%@: .%@@*@@%. "
echo " :@@ :+ *@ *@@#*@@@. "
echo " =@@@.@@@@ "
echo " .*@@@:=@@@@: "
echo " .@@@@:.@@@@@: "
echo " .@@@@#.-@@@@@. "
echo " #@@@@: =@@@@@- "
echo " .@@@@@..@@@@@@* "
echo " -@@@@@. @@@@@@#. "
echo " -@@@@@ @@@@@@% "
echo " @@@@@. #@@@@@@. "
echo " :@@@@# =@@@@@@% "
echo " @@@@@: @@@@@@@: "
echo " *@@@@ @@@@@@@. "
echo " .@@@@ @@@@@@@ "
echo " #@@@. @@@@@@* "
echo " @@@# @@@@@@@ "
echo " .@@+=@@@@@@. "
echo " *@@@@@@ "
echo " :@@@@@= "
echo " .@@@@@@. "
echo " :@@@@@*. "
echo " .=@@@@@- "
echo " :+##+. "
echo "=============================================================="
echo "TTYd session file by iamromulan v1.1" echo "TTYd session file by iamromulan v1.1"
echo "Firmware Revision: $firmware_revision" echo "Firmware Revision: $firmware_revision"
echo "Serial Number: $serial_number" echo "Serial Number: $serial_number"
echo "===================================================================" echo "=============================================================="
# Start a login session # Start a login session
exec /bin/login exec /bin/login

View File

@ -1,41 +0,0 @@
#!/bin/sh
# Send HTTP header for plain text content
echo "Content-Type: text/plain"
echo ""
# Read first CPU statistics
read cpu user nice system idle iowait irq softirq steal guest guest_nice < /proc/stat
# Record first total usage time and idle time
prev_total=$((user+nice+system+idle+iowait+irq+softirq+steal))
prev_idle=$idle
# Wait for a short time to capture CPU usage
sleep 0.5
# Read second CPU statistics
read cpu user nice system idle iowait irq softirq steal guest guest_nice < /proc/stat
# Calculate second total usage time
total=$((user+nice+system+idle+iowait+irq+softirq+steal))
idle=$idle
# Calculate time differences
total_diff=$((total-prev_total))
idle_diff=$((idle-prev_idle))
# Calculate CPU usage percentage
cpu_usage=$(awk -v total_diff="$total_diff" -v idle_diff="$idle_diff" 'BEGIN{printf "%.1f", (total_diff-idle_diff)*100/total_diff}')
# Get memory information
mem_info=$(free -m | grep "Mem:")
mem_total=$(echo "$mem_info" | awk '{print $2}')
mem_used=$(echo "$mem_info" | awk '{print $3}')
mem_usage=$(awk "BEGIN {printf \"%.1f\", ($mem_used * 100) / $mem_total}")
# Output results
echo "CPU Usage: $cpu_usage"
echo "Memory Usage: $mem_usage"
echo "Memory Total: $((mem_total * 1024 * 1024))"
echo "Memory Used: $((mem_used * 1024 * 1024))"

View File

@ -278,76 +278,6 @@
</div> </div>
<div class="col"> <div class="col">
<div class="card mb-3">
<div class="card-header">系统状态</div>
<div class="card-body">
<div class="card-text table-responsive-sm">
<table class="table">
<tbody>
<tr>
<th scope="row">CPU使用率</th>
<td class="gap-4 align-items-center"
x-data="{ getProgressBarClass: function() {
var percentage = parseInt(this.cpuUsage);
if (percentage >= 80) {
return 'progress-bar bg-danger is-medium';
} else if (percentage >= 60) {
return 'progress-bar bg-warning is-warning is-medium';
} else {
return 'progress-bar bg-success is-medium';
}
}}"
>
<div class="progress w-100" role="progressbar"
aria-label="CPU Usage"
:aria-valuenow="cpuUsage"
aria-valuemin="0"
aria-valuemax="100"
style="height: 18px"
>
<div :class="getProgressBarClass()"
:style="'width: ' + cpuUsage + '%'"
>
<span x-text="cpuUsage + '%'"></span>
</div>
</div>
</td>
</tr>
<tr>
<th scope="row">内存使用率</th>
<td class="gap-4 align-items-center"
x-data="{ getProgressBarClass: function() {
var percentage = parseInt(this.memoryUsage);
if (percentage >= 80) {
return 'progress-bar bg-danger is-medium';
} else if (percentage >= 60) {
return 'progress-bar bg-warning is-warning is-medium';
} else {
return 'progress-bar bg-success is-medium';
}
}}"
>
<div class="progress w-100" role="progressbar"
aria-label="Memory Usage"
:aria-valuenow="memoryUsage"
aria-valuemin="0"
aria-valuemax="100"
style="height: 18px"
>
<div :class="getProgressBarClass()"
:style="'width: ' + memoryUsage + '%'"
>
<span x-text="memoryUsage + '% (' + formatBytes(memoryUsed) + ' / ' + formatBytes(memoryTotal) + ')'"></span>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="card"> <div class="card">
<div class="card-header">信号</div> <div class="card-header">信号</div>
<div class="card-body"> <div class="card-body">
@ -719,12 +649,6 @@
nonNrUpload: "0", nonNrUpload: "0",
downloadStat: "0", downloadStat: "0",
uploadStat: "0", uploadStat: "0",
cpuUsage: "0",
memoryUsage: "0",
cacheUsage: "0",
memoryTotal: "0",
memoryUsed: "0",
cacheUsed: "0",
fetchAllInfo() { fetchAllInfo() {
this.atcmd = this.atcmd =
@ -2006,11 +1930,13 @@
// Set the refresh rate for interval // Set the refresh rate for interval
this.intervalId = setInterval(() => { this.intervalId = setInterval(() => {
this.fetchUpTime(); this.fetchUpTime();
this.fetchAllInfo(); this.fetchAllInfo();
this.fetchSystemStats();
this.requestPing() this.requestPing()
.then((data) => { .then((data) => {
const response = data.trim(); const response = data.trim();
// Trim any leading/trailing spaces
if (response === "OK") { if (response === "OK") {
this.internetConnectionStatus = "已连接"; this.internetConnectionStatus = "已连接";
} else { } else {
@ -2021,33 +1947,11 @@
console.error("Error:", error); console.error("Error:", error);
this.internetConnectionStatus = "已断开"; this.internetConnectionStatus = "已断开";
}); });
this.lastUpdate = new Date().toLocaleString(); this.lastUpdate = new Date().toLocaleString();
console.log("Refreshed"); console.log("Refreshed");
}, this.refreshRate * 1000); }, this.refreshRate * 1000);
}, },
fetchSystemStats() {
fetch("/cgi-bin/get_system_stats")
.then(response => response.text())
.then(data => {
const lines = data.split("\n");
// Skip blank lines and Content-Type lines.
const validLines = lines.filter(line => line.trim() !== '' && line.includes(": ")).map(line => line.trim());
this.cpuUsage = parseFloat(validLines[0].split(": ")[1]).toFixed(1);
this.memoryUsage = parseFloat(validLines[1].split(": ")[1]).toFixed(1);
this.memoryTotal = parseInt(validLines[2].split(": ")[1]);
this.memoryUsed = parseInt(validLines[3].split(": ")[1]);
});
},
formatBytes(bytes) {
if (bytes === 0) return '0 B';
const k = 1024;
const sizes = ['B', 'KB', 'MB', 'GB'];
const i = Math.floor(Math.log(bytes) / Math.log(k));
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
},
}; };
} }
</script> </script>

View File

@ -90,28 +90,6 @@ remount_rw
uninstall_simpleadmin() { uninstall_simpleadmin() {
echo "Uninstalling Simpleadmin..." echo "Uninstalling Simpleadmin..."
# Clean up Tailscale if present
if [ -d "/usrdata/tailscale" ]; then
echo "Cleaning up Tailscale..."
# Stop and logout from Tailscale
if [ -f "/usrdata/tailscale/tailscale" ]; then
/usrdata/tailscale/tailscale logout
/usrdata/tailscale/tailscale down
fi
systemctl stop tailscale 2>/dev/null
systemctl stop tailscale-webui 2>/dev/null
rm -f /lib/systemd/system/tailscale.service
# Remove Tailscale files and directories
rm -rf /usrdata/tailscale
rm -f /bin/tailscale
rm -f /bin/tailscaled
# Reload systemd
systemctl daemon-reload
fi
# Check if Lighttpd service is installed and remove it if present # Check if Lighttpd service is installed and remove it if present
if [ -f "/lib/systemd/system/lighttpd.service" ]; then if [ -f "/lib/systemd/system/lighttpd.service" ]; then
echo "Lighttpd detected, uninstalling Lighttpd webserver and its modules..." echo "Lighttpd detected, uninstalling Lighttpd webserver and its modules..."
@ -231,7 +209,6 @@ echo -e "\e[1;31m2) Installing simpleadmin from the $GITTREE branch\e[0m"
wget $GITROOT/simpleadmin/www/cgi-bin/user_atcommand wget $GITROOT/simpleadmin/www/cgi-bin/user_atcommand
wget $GITROOT/simpleadmin/www/cgi-bin/get_ping wget $GITROOT/simpleadmin/www/cgi-bin/get_ping
wget $GITROOT/simpleadmin/www/cgi-bin/get_sms wget $GITROOT/simpleadmin/www/cgi-bin/get_sms
wget $GITROOT/simpleadmin/www/cgi-bin/get_system_stats
wget $GITROOT/simpleadmin/www/cgi-bin/get_ttl_status wget $GITROOT/simpleadmin/www/cgi-bin/get_ttl_status
wget $GITROOT/simpleadmin/www/cgi-bin/set_ttl wget $GITROOT/simpleadmin/www/cgi-bin/set_ttl
wget $GITROOT/simpleadmin/www/cgi-bin/send_sms wget $GITROOT/simpleadmin/www/cgi-bin/send_sms