QuecManager BETA 1.0.7
- Resolved SMS Inbox Display Issue: Fixed a bug preventing messages from being displayed in the SMS inbox. - Enhanced SMS Inbox Functionality: Optimized the SMS inbox to group messages with the same sender and timestamp. - Corrected Signal Metrics Calculation: Addressed inaccuracies in the calculation of signal metrics. - Updated Speedtest Cooldown: Increased the cooldown period for speed tests from 5 seconds to 10 seconds. - Improved Speedtest Cleanup: Ensured the pipe is removed automatically after the speed test completes. - Updated to NextJS 15 - Improved Quecwatch script Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
This commit is contained in:
@@ -1,24 +1,37 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Script to configure SMS text mode on a modem device
|
||||
# Usage: ./sms_config.sh
|
||||
|
||||
# Check if atinout is installed
|
||||
if ! command -v atinout &> /dev/null; then
|
||||
echo "Error: atinout is not installed"
|
||||
# Script for SMS initialization and initial fetch
|
||||
# Check if atinout and jq are installed
|
||||
if ! command -v atinout &> /dev/null || ! command -v jq &> /dev/null; then
|
||||
echo "Error: Required tools (atinout or jq) are not installed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if the device exists
|
||||
if [ ! -c "/dev/smd11" ]; then
|
||||
echo "Error: Device /dev/smd11 not found"
|
||||
if [ ! -c "/dev/smd7" ]; then
|
||||
echo "Error: Device /dev/smd7 not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Send AT command to set SMS text mode
|
||||
if ! echo "AT+CMGF=1" | atinout - /dev/smd11 -; then
|
||||
echo "Error: Failed to send AT command"
|
||||
# Set SMS text mode
|
||||
if ! echo "AT+CMGF=1" | atinout - /dev/smd7 -; then
|
||||
echo "Error: Failed to set SMS text mode"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Successfully configured SMS text mode"
|
||||
# Wait for 2 seconds
|
||||
sleep 2
|
||||
|
||||
# Fetch initial SMS messages
|
||||
if ! echo "AT+CMGL=\"ALL\"" | atinout - /dev/smd7 - | jq -R -s '
|
||||
split("\n") |
|
||||
map(select(length > 0)) |
|
||||
map(
|
||||
select(startswith("+CMGL:") or (. != "OK" and . != "ERROR"))
|
||||
) |
|
||||
{messages: .}
|
||||
' > /tmp/sms_inbox.json; then
|
||||
echo "Error: Failed to fetch SMS messages"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "SMS initialization completed successfully"
|
||||
Reference in New Issue
Block a user