Add web GUI, docs, scripts, and 5G router config

- Web app (Flask): status, config, firewall, logs, users, restart
- Docs: AT commands, deploy, DNS, quickstart, web GUI
- Scripts: connect, deploy, diag, healthcheck, modem-status, speedtest, status, troubleshoot
- Init and iptables: 5g-router, 5g-webgui, rules.v4
- CHANGELOG, TODO, REVISION; config and README updates
This commit is contained in:
nearxos
2026-02-02 09:38:23 +02:00
parent 1136a332b5
commit 160ad641ce
46 changed files with 4320 additions and 40 deletions

View File

@@ -1,17 +1,20 @@
#!/bin/bash
# Fibocom FM350-GL 5G Modem Configuration Script
# For Alpine Linux with CYTA Cyprus SIM card
#
# This script configures the 5G modem and establishes a connection
# For Alpine Linux. Supports config file /etc/5g-router.conf
# Usage: ./configure_fm350_5g.sh
# Rev: 1 (see REVISION in repo root)
set -e
# Configuration
AT_PORT="/dev/ttyUSB1"
APN="internet"
WAN_IF="eth1"
LAN_IF="eth0.100"
# Defaults (overridden by /etc/5g-router.conf if present)
AT_PORT="${AT_PORT:-/dev/ttyUSB1}"
APN="${APN:-internet}"
WAN_IF="${WAN_IF:-eth1}"
LAN_IF="${LAN_IF:-eth0.100}"
LOG_SIGNAL="${LOG_SIGNAL:-no}"
WEAK_SIGNAL_CSQ="${WEAK_SIGNAL_CSQ:-0}"
[ -f /etc/5g-router.conf ] && . /etc/5g-router.conf
LOG_FILE="${LOG_FILE:-/var/log/5g-router.log}"
# Colors for output
RED='\033[0;31m'
@@ -62,7 +65,11 @@ check_modem() {
if [ "$usb_id" = "0e8d:7127" ]; then
log_warn "Modem is in Mode 41 (7127). AT commands may not work."
log_warn "Attempting to switch to Mode 40..."
log_warn "Attempting to switch to Mode 40 (modem will reset)..."
get_at_response "AT+GTUSBMODE=40" 2 >/dev/null || true
get_at_response "AT+CFUN=1,1" 5 >/dev/null || true
log_info "Wait ~30s for modem to reappear, then re-run this script."
exit 1
fi
if [ ! -c "$AT_PORT" ]; then
@@ -101,6 +108,11 @@ check_signal() {
else
log_info "Signal strength: $csq (good)"
fi
[ "$LOG_SIGNAL" = "yes" ] && echo "$(date -Iseconds) CSQ=$csq" >> "$LOG_FILE" 2>/dev/null || true
if [ -n "$WEAK_SIGNAL_CSQ" ] && [ "$WEAK_SIGNAL_CSQ" -gt 0 ] && [ "$csq" -lt "$WEAK_SIGNAL_CSQ" ]; then
log_warn "Signal below threshold ($WEAK_SIGNAL_CSQ): $csq"
[ -w "$LOG_FILE" ] && echo "$(date -Iseconds) WARN weak signal CSQ=$csq" >> "$LOG_FILE" || true
fi
else
log_warn "Could not read signal strength"
fi