Enhance 5G modem management with integrated web GUI and connection control

- Introduced a web GUI for managing 5G connections, replacing the standalone 5g-router service.
- Updated scripts to ensure exclusive access to the AT port, preventing conflicts.
- Improved troubleshooting documentation in 5G_MODEM_TROUBLESHOOTING.md, adding checks for processes using the AT port.
- Enhanced connection management in the web app, including auto-connect and detailed status APIs.
- Updated installation scripts to reflect changes in service management and dependencies.
This commit is contained in:
nearxos
2026-02-02 10:34:25 +02:00
parent 78f7ccc6db
commit 9dc35a57a2
14 changed files with 1224 additions and 115 deletions

View File

@@ -29,10 +29,11 @@ log_error() { echo -e "${RED}[ERROR]${NC} $1"; }
send_at_cmd() {
local cmd="$1"
local wait="${2:-2}"
[ -c "$AT_PORT" ] || return 1
cat $AT_PORT 2>/dev/null &
local CAT_PID=$!
sleep 0.3
[ -c "$AT_PORT" ] || { kill $CAT_PID 2>/dev/null; return 1; }
echo -e "${cmd}\r" > $AT_PORT
sleep $wait
kill $CAT_PID 2>/dev/null || true
@@ -41,8 +42,9 @@ send_at_cmd() {
get_at_response() {
local cmd="$1"
local wait="${2:-2}"
[ -c "$AT_PORT" ] || return 1
timeout $((wait + 3)) sh -c "
[ -c \"$AT_PORT\" ] || exit 1
cat $AT_PORT 2>/dev/null &
CAT_PID=\$!
sleep 0.3