- Resolved IMEI Mangling Issue - Optimized Logging and AT Operations: Centralized logging to smd7 and redirected all AT operations to smd11 to prevent request conflicts. - Introduced Cell Locking Scheduler - Fixed SMS Inbox Loading Issue: Addressed a bug where the SMS inbox would get stuck during loading. - Enhanced Speedtest Output: Updated speed test results to display values with two decimal points when reaching GBps speeds. - Changed Link Speed from "Unknown!" to "-" when link is not active - Added 5 second cooldown to speedtest Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
30 lines
710 B
Bash
Executable File
30 lines
710 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Ensure the script outputs proper CGI headers
|
|
echo "Content-Type: application/json"
|
|
echo ""
|
|
|
|
# Directory where JSON files are stored (adjust as needed)
|
|
JSON_DIR="/www/signal_graphs/"
|
|
|
|
# Function to safely read JSON file
|
|
read_json_file() {
|
|
local file="$1"
|
|
if [ -f "$file" ]; then
|
|
cat "$file"
|
|
else
|
|
echo "[]" # Return empty array if file doesn't exist
|
|
fi
|
|
}
|
|
|
|
# Collect signal metrics from JSON files
|
|
RSRP=$(read_json_file "${JSON_DIR}/rsrp.json")
|
|
RSRQ=$(read_json_file "${JSON_DIR}/rsrq.json")
|
|
SINR=$(read_json_file "${JSON_DIR}/sinr.json")
|
|
|
|
# Combine metrics into a single JSON object
|
|
printf '{
|
|
"rsrp": %s,
|
|
"rsrq": %s,
|
|
"sinr": %s
|
|
}' "$RSRP" "$RSRQ" "$SINR" |