Skip to content

Installation and Deployment

github-actions[bot] edited this page Sep 29, 2026 · 2 revisions

Installation & Deployment Guide

This guide walks through deploying the Fresnel 5G software suite and web interface directly onto a Qualcomm Snapdragon X55 (SDXPRAIRIE) cellular modem or gateway.


πŸ“‹ Prerequisites

  1. Hardware:
    • Qualcomm SDX55 modem module (Tri Cascade SG500M2-X, Quectel RM500Q/RM502Q, Suncomm, or compatible).
    • Connected to your host computer via USB (ECM/RNDIS) or Gigabit Ethernet.
  2. Network:
    • Host must be on the modem's subnet.
    • Common default gateway IPs:
      • 172.16.10.1 (Tri Cascade default)
      • 192.168.225.1 (Quectel default)
  3. SSH Access:
    • SSH server enabled on the modem with root privileges.
    • Verify connection from your terminal:
      ssh root@172.16.10.1 "uname -a"

πŸš€ Automated Deployment with deploy_modem.sh

The Fresnel repository provides an automated SSH streaming deployment script in modem/deploy_modem.sh. It streams scripts and web assets directly into the modem's writeable memory partitions without requiring external archive tools.

Running Deployment:

cd modem
chmod +x deploy_modem.sh

# Option 1: Standalone Deployment (Remote Telemetry Disabled - Default)
./deploy_modem.sh --no-telemetry 172.16.10.1 root

# Option 2: Deploy with Remote VPS Telemetry Enabled
./deploy_modem.sh --telemetry --telemetry-url "https://modem.yourvps.com:8000" --telemetry-token "secret_token" 172.16.10.1 root

# Option 3: Interactive Prompt (Prompts [y/N] on terminal)
./deploy_modem.sh 172.16.10.1 root

CLI Deployment Flags:

Flag Description
--no-telemetry, --skip-telemetry Disables remote telemetry pusher (telemetry_enabled: 0, 0% background resource load).
--telemetry, --enable-telemetry Enables remote telemetry pusher daemon.
--telemetry-url <URL> Specifies remote VPS URL (e.g. https://modem.yourvps.com:8000).
--telemetry-token <TOKEN> Specifies Bearer authentication token for VPS ingestion.

What the Script Executes:

  1. Connectivity Check: Verifies active SSH connectivity and basic shell responsiveness.
  2. Partition Structure Preparation: Creates directories on persistent writeable mounts:
    • /usrdata/simpleadmin/scripts: Core Perl, Python, and shell daemons.
    • /usrdata/simpleadmin/www: HTML, CSS, JavaScript, and Canvas dashboard assets.
    • /usrdata/simpleadmin/www/cgi-bin: CGI entry points for AT execution and live telemetry.
    • /usrdata/simpleadmin/bin: Symlinks to system binaries (e.g., curl).
    • /data/simpleadmin/data: Persistent user passwords, band lock masks, and local SQLite state.
    • /tmp/gw_sessions: Session token storage (permissions 700).
  3. Asset Streaming: Streams scripts and frontend files over SSH.
  4. Permissions & Service State Configuration:
    • Sets executable permissions (chmod +x) on all daemons, CGI scripts, and /usrdata/simpleadmin/scripts/telemetry_ctl.sh.
    • Initializes /data/simpleadmin/services_state.json with "telemetry_enabled": 0 (or 1).
    • Initializes or updates /data/simpleadmin/telemetry.conf.
  5. Daemon Launch: Kills stale processes and launches simpleadmin_daemon.sh as a detached supervisor watchdog:
    nohup /usrdata/simpleadmin/scripts/simpleadmin_daemon.sh >/tmp/simpleadmin_daemon.log 2>&1 &
    (If telemetry is disabled, telemetry_pusher.sh is terminated and never spawned by the supervisor).

βš™οΈ Service Architecture & Daemons

Once deployed, two primary services manage the modem:

1. SimpleAdmin Supervisor Daemon (simpleadmin_daemon.sh)

  • Functions as an automated watchdog process.
  • Loops continuously to ensure httpd and the telemetry engine remain alive.
  • If get_dashboard_data.pl or httpd terminates or crashes due to baseband hiccups, the supervisor automatically restarts them within 5 seconds.
  • Automatically executes firewall_security.sh on startup to apply firewall rules, kernel buffer optimization, and TTL/HL mangling.

2. Embedded Busybox HTTPd

  • Listens on port 8080:
    httpd -p 8080 -h /usrdata/simpleadmin/www/ -c /usrdata/simpleadmin/www/httpd.conf
  • Serves static assets (index.html, login.html) and executes server-side CGI binaries under /cgi-bin/.

3. Baseband Telemetry Daemon (get_dashboard_data.pl --daemon)

  • Runs continuously in the background, updating /tmp/dashboard_data.json at high frequency (1-second intervals).
  • Directly polls Qualcomm's ceiled daemon (CRI_IND_WDS_EVENT_REPORT) for exact 64-bit hardware DMA throughput counters.

πŸ”’ Post-Deployment Verification

  1. Verify Running Processes via SSH:

    • Default Credentials: Username: root β€’ Password: oelinux123 (Port 22)
    ssh root@<modem-ip> "ps -ef | grep -E 'httpd|get_dashboard_data|simpleadmin_daemon' | grep -v grep"

    You should observe three active processes:

    • /usrdata/simpleadmin/scripts/simpleadmin_daemon.sh
    • /usrdata/simpleadmin/scripts/get_dashboard_data.pl --daemon
    • httpd -p 8080 -h /usrdata/simpleadmin/www/
  2. Access Web GUI:

    • Open your browser to: http://<modem-ip>:8080/login.html
    • Default login password: admin
    • Immediately change your password under the Security tab.

πŸ”„ Boot Persistence (Auto-start on Modem Reboot)

To ensure Fresnel starts automatically whenever the modem powers on:

  1. Check your modem's init system (/etc/init.d/ or /data/init.sh).
  2. Append the supervisor startup to /data/init.sh or /etc/rc.local:
    # Add to modem startup file
    if [ -f /usrdata/simpleadmin/scripts/simpleadmin_daemon.sh ]; then
        nohup /usrdata/simpleadmin/scripts/simpleadmin_daemon.sh >/tmp/simpleadmin_daemon.log 2>&1 &
    fi
  3. Test a warm reboot via SSH:
    ssh root@172.16.10.1 "reboot"
    Wait 45 seconds and ensure http://172.16.10.1:8080/ loads normally.

Next Step: Learn how to navigate the dashboard and configure security in Web GUI & Security.

Clone this wiki locally