Update socat-bridge and QuecManager
Created quecmanager services Removed SMS for now Updated socat start priority and add smd7 as an option
This commit is contained in:
@@ -4,63 +4,8 @@
|
||||
mv /www/index.html /www/index.html.old
|
||||
cp /www/login.html /www/index.html
|
||||
|
||||
# Define the commands to add to rc.local
|
||||
COMMANDS="/www/cgi-bin/settings/change_sms_code.sh
|
||||
/www/cgi-bin/home/log_signal_metrics.sh &"
|
||||
|
||||
# Create a new rc.local with commands correctly placed
|
||||
TMP_RC_LOCAL=$(mktemp)
|
||||
|
||||
awk -v commands="$COMMANDS" '
|
||||
BEGIN {
|
||||
split(commands, cmdArr, "\n") # Split commands into an array
|
||||
for (i in cmdArr) alreadyAdded[cmdArr[i]] = 0
|
||||
added = 0
|
||||
}
|
||||
{
|
||||
if ($0 in alreadyAdded) {
|
||||
alreadyAdded[$0] = 1
|
||||
next
|
||||
}
|
||||
if (/^# the system init finished. By default/) {
|
||||
print
|
||||
if (!added) {
|
||||
for (i in cmdArr) if (!alreadyAdded[cmdArr[i]]) {
|
||||
print cmdArr[i]
|
||||
alreadyAdded[cmdArr[i]] = 1
|
||||
}
|
||||
print ""
|
||||
added = 1
|
||||
}
|
||||
} else {
|
||||
print
|
||||
}
|
||||
}
|
||||
END {
|
||||
# Add any missing commands at the end of the section
|
||||
for (i in cmdArr) if (!alreadyAdded[cmdArr[i]]) print cmdArr[i]
|
||||
}
|
||||
' /etc/rc.local > "$TMP_RC_LOCAL"
|
||||
|
||||
# Replace the original rc.local with the modified one
|
||||
mv "$TMP_RC_LOCAL" /etc/rc.local
|
||||
chmod +x /etc/rc.local
|
||||
|
||||
# Ensure log_signal_metrics.sh is running
|
||||
if ! pgrep -f "/www/cgi-bin/home/log_signal_metrics.sh" > /dev/null; then
|
||||
echo "Starting log_signal_metrics.sh..."
|
||||
/www/cgi-bin/home/log_signal_metrics.sh &
|
||||
else
|
||||
echo "log_signal_metrics.sh is already running. Skipping start."
|
||||
fi
|
||||
|
||||
# Ensure change_sms_code.sh is running
|
||||
if ! pgrep -f "/www/cgi-bin/settings/change_sms_code.sh" > /dev/null; then
|
||||
echo "Starting change_sms_code.sh..."
|
||||
/www/cgi-bin/settings/change_sms_code.sh
|
||||
else
|
||||
echo "change_sms_code.sh is already running. Skipping start."
|
||||
fi
|
||||
service quecmanager-services enable
|
||||
service quecmanager-services start
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
@@ -36,6 +36,9 @@ for SCRIPT in $SCRIPTS; do
|
||||
fi
|
||||
done
|
||||
|
||||
service quecmanager-services stop
|
||||
service quecmanager-services disable
|
||||
|
||||
echo "Cleanup complete."
|
||||
exit 0
|
||||
|
||||
|
||||
25
ipk-source/sdxpinn-quecmanager-beta/root/etc/init.d/quecmanager-services
Executable file
25
ipk-source/sdxpinn-quecmanager-beta/root/etc/init.d/quecmanager-services
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=49
|
||||
STOP=10
|
||||
|
||||
USE_PROCD=1
|
||||
|
||||
start_service() {
|
||||
echo "Starting QuecManager services"
|
||||
echo "Starting Signal Metrics Logger"
|
||||
# Start Signal Metrics Logger
|
||||
procd_open_instance
|
||||
procd_set_param command /www/cgi-bin/services/log_signal_metrics.sh
|
||||
procd_set_param respawn
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
procd_close_instance
|
||||
echo "Signal Metrics Logger Running"
|
||||
echo "All QuecManager services Running"
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
# procd will handle stopping all instances automatically
|
||||
echo "Stopping QuecManager services."
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
#!/bin/sh
|
||||
# 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/smd7" ]; then
|
||||
echo "Error: Device /dev/smd7 not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Set SMS text mode
|
||||
if ! echo "AT+CMGF=1" | atinout - /dev/smd7 -; then
|
||||
echo "Error: Failed to set SMS text mode"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 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
|
||||
|
||||
# Exit successfully
|
||||
exit 0
|
||||
@@ -1,8 +1,8 @@
|
||||
Package: socat-at-bridge
|
||||
Version: 1.0.1
|
||||
Version: 1.1.0
|
||||
Depends: libc socat
|
||||
Source: github/iamromulan/quectel-rgmii-toolkit
|
||||
Section: utils
|
||||
URL: https://github.com/iamromulan/quectel-rgmii-toolkit
|
||||
Architecture: aarch64_cortex-a53
|
||||
Description: Sets up a tty from SMD11
|
||||
Description: Sets up a tty from SMD11, SMD7 optional
|
||||
|
||||
@@ -4,6 +4,8 @@ echo "Enabling socat-at-bridge at startup"
|
||||
service socat-at-bridge enable
|
||||
echo "Starting socat-at-bridge"
|
||||
service socat-at-bridge start
|
||||
echo "/dev/ttySMD11 is now available"
|
||||
echo "If you want /dev/ttySMD7 as well you can use service socat-at-bridge"
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ echo "Disabling socat-at-bridge at startup"
|
||||
service socat-at-bridge disable
|
||||
echo "Stopping socat-at-bridge"
|
||||
service socat-at-bridge stop
|
||||
service socat-at-bridge-smd7 stop
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
START=30
|
||||
STOP=10
|
||||
|
||||
USE_PROCD=1
|
||||
@@ -8,7 +8,7 @@ USE_PROCD=1
|
||||
start_service() {
|
||||
procd_open_instance
|
||||
|
||||
# Start socat to create /dev/ttyIN and /dev/ttyOUT
|
||||
# Start socat to create /dev/ttySMD11IN and /dev/ttySMD11
|
||||
procd_set_param command \
|
||||
socat -d -d pty,link=/dev/ttySMD11IN,raw,echo=0,group=20,perm=660 \
|
||||
pty,link=/dev/ttySMD11,raw,echo=1,group=20,perm=660
|
||||
|
||||
40
ipk-source/socat-at-bridge/root/etc/init.d/socat-at-bridge-smd7
Executable file
40
ipk-source/socat-at-bridge/root/etc/init.d/socat-at-bridge-smd7
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=30
|
||||
STOP=10
|
||||
|
||||
USE_PROCD=1
|
||||
|
||||
start_service() {
|
||||
procd_open_instance
|
||||
|
||||
# Start socat to create /dev/ttySMD7IN and /dev/ttySMD7
|
||||
procd_set_param command \
|
||||
socat -d -d pty,link=/dev/ttySMD7IN,raw,echo=0,group=20,perm=660 \
|
||||
pty,link=/dev/ttySMD7,raw,echo=1,group=20,perm=660
|
||||
procd_set_param respawn
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
procd_close_instance
|
||||
|
||||
# Start cat process for /dev/smd11 to /dev/ttySMD11IN
|
||||
procd_open_instance
|
||||
procd_set_param command sh -c "cat /dev/smd7 > /dev/ttySMD7IN"
|
||||
procd_set_param respawn
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
procd_close_instance
|
||||
|
||||
# Start cat process for /dev/ttySMD7IN to /dev/smd7
|
||||
procd_open_instance
|
||||
procd_set_param command sh -c "cat /dev/ttySMD7IN > /dev/smd7"
|
||||
procd_set_param respawn
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
# procd will handle stopping all instances automatically
|
||||
echo "Stopping socat and cat instances."
|
||||
}
|
||||
@@ -111,15 +111,15 @@ License: GPLv3
|
||||
|
||||
|
||||
Package: sdxpinn-quecmanager-beta
|
||||
Version: 1.1.0-3
|
||||
Version: 1.1.0-4
|
||||
Depends: libc, uhttpd, sdxpinn-mount-fix, atinout, jq, ookla-speedtest
|
||||
Conflicts: sdxpinn-quecmanager
|
||||
Section: admin
|
||||
Architecture: aarch64_cortex-a53
|
||||
Maintainer: Russel Yasol <https://github.com/dr-dolomite> Cameron Thompson <https://github.com/iamromulan>
|
||||
MD5Sum: 68f4e9fad3555637608b8baccd6d8f2b
|
||||
Size: 844475
|
||||
Filename: sdxpinn-quecmanager-beta_1.1.0-3_aarch64_cortex-a53.ipk
|
||||
MD5Sum: c2d8b8a29001ba3821280ccd0f220ce4
|
||||
Size: 884577
|
||||
Filename: sdxpinn-quecmanager-beta_1.1.0-4_aarch64_cortex-a53.ipk
|
||||
Source: github/iamromulan
|
||||
Description: BETA: A custom web UI desgined to run alongside luci for Quectel RM55x modems
|
||||
License: GPLv3
|
||||
@@ -139,14 +139,14 @@ Description: SMS Tool for 3G/4G/5G modem
|
||||
|
||||
|
||||
Package: socat-at-bridge
|
||||
Version: 1.0.1
|
||||
Version: 1.1.0
|
||||
Depends: libc, socat
|
||||
Section: utils
|
||||
Architecture: aarch64_cortex-a53
|
||||
Maintainer: iamromulan
|
||||
MD5Sum: 3d7142e53c634bf23c31bd3a940f040b
|
||||
Size: 1238
|
||||
Filename: socat-at-bridge_1.0.1_aarch64_cortex-a53.ipk
|
||||
MD5Sum: 8192ace5fa449a8989eecdec09138dc8
|
||||
Size: 1392
|
||||
Filename: socat-at-bridge_1.1.0_aarch64_cortex-a53.ipk
|
||||
Source: https://github.com/iamromulan/quectel-rgmii-toolkit
|
||||
Description: Sets up a tty from SMD11
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,16 +1,16 @@
|
||||
Starting package analysis - Sun Jan 12 08:10:17 PM EST 2025
|
||||
Starting package analysis - Sun Jan 12 11:48:14 PM EST 2025
|
||||
No update needed for atinout (version 0.9.1, MD5: 6c8d3c910477e31940ee7740111a7fdf, size: 4226)
|
||||
No update needed for luci-app-atinout-mod (version 1.3.4-20241006, MD5: 2dac55de763333c37dd1728957fc8294, size: 4827)
|
||||
No update needed for ookla-speedtest (version 1.2.0, MD5: 2183f2df42a00380e761cace096e17c3, size: 1075762)
|
||||
No update needed for sdxpinn-console-menu (version 0.0.2, MD5: 42d2fd4c85b36a9c29e66092899080a4, size: 7365)
|
||||
No update needed for sdxpinn-mount-fix (version 1.2.0, MD5: 3f1279109adfba02bb7ca31026ec1c51, size: 55275)
|
||||
No update needed for sdxpinn-quecmanager (version 1.0.1, MD5: 142068c54af185e673b9e0ba0686b0f4, size: 715428)
|
||||
No update needed for sdxpinn-quecmanager-beta (version 1.1.0-3, MD5: 68f4e9fad3555637608b8baccd6d8f2b, size: 844475)
|
||||
Updating package info for sdxpinn-quecmanager-beta...
|
||||
Updated sdxpinn-quecmanager-beta to version 1.1.0-4 with MD5: c2d8b8a29001ba3821280ccd0f220ce4 and size: 884577
|
||||
No update needed for sms-tool (version 2025.1.12-APmod-iamromulan, MD5: 24ad9e7380b8390764e8e55cbf2b658a, size: 13590)
|
||||
No update needed for socat-at-bridge (version 1.0.1, MD5: 3d7142e53c634bf23c31bd3a940f040b, size: 1238)
|
||||
Updating package info for tailscale...
|
||||
Updated tailscale to version 1.78.1-1 with MD5: f909644bc5a7bd23fa1827e3276cc2c3 and size: 9906361
|
||||
Updating package info for tailscaled...
|
||||
Updated tailscaled to version 1.78.1-1 with MD5: 950b788a00dccf5349e6bac1ec0cca6e and size: 18014482
|
||||
Updating package info for socat-at-bridge...
|
||||
Updated socat-at-bridge to version 1.1.0 with MD5: 8192ace5fa449a8989eecdec09138dc8 and size: 1392
|
||||
No update needed for tailscale (version 1.78.1-1, MD5: f909644bc5a7bd23fa1827e3276cc2c3, size: 9906361)
|
||||
No update needed for tailscaled (version 1.78.1-1, MD5: 950b788a00dccf5349e6bac1ec0cca6e, size: 18014482)
|
||||
Package file and signature updated successfully.
|
||||
Package analysis completed - Sun Jan 12 08:10:17 PM EST 2025
|
||||
Package analysis completed - Sun Jan 12 11:48:14 PM EST 2025
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
untrusted comment: signed by key 6262698f038d1226
|
||||
RWRiYmmPA40SJkuYEbJ0y3Za6IfBsV/gktifEV55lni9fFidxswRCKi5Gib2rbgUI4MbZ6yq2wXR6W3/WPv6RdnEMPRlDvtG/ws=
|
||||
RWRiYmmPA40SJtSOg0ce8FngcGi6wDVTbuIT/KGbZUJx9VtyZtVVdVdOr0Ght1iSImw+q7sBYyttQPQOBzzfSvHueFlUNVfI1QM=
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
opkg-feed/socat-at-bridge_1.1.0_aarch64_cortex-a53.ipk
Normal file
BIN
opkg-feed/socat-at-bridge_1.1.0_aarch64_cortex-a53.ipk
Normal file
Binary file not shown.
Reference in New Issue
Block a user