Skip to content
dexter939Public

About

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

645 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ACS - Auto Configuration Server

Carrier-grade TR-069 (CWMP) and TR-369 (USP) device management system built with Laravel 11

PHP Laravel License

πŸš€ Features

Multi-Protocol Support

  • βœ… TR-069 (CWMP) - Legacy device management protocol
  • βœ… TR-369 (USP) - Next-generation User Services Platform
  • βœ… Dual Protocol - Devices can operate with both protocols

TR-369 USP Transport Layers (MTP)

  • πŸ”Œ MQTT - Broker-based pub/sub communication
  • 🌐 WebSocket - Direct device connections (RFC 6455 compliant)
  • πŸ“‘ HTTP - Polling-based for restricted networks

Core Capabilities

  • πŸ“Š 100,000+ Device Management - Scalable architecture
  • ⚑ Zero-Touch Provisioning - Automated device configuration
  • πŸ”„ Firmware Management - Upload, version, and deploy firmware
  • πŸ“ˆ Real-time Monitoring - Dashboard with metrics and charts
  • πŸ”” Subscribe/Notify - Event-based device notifications
  • πŸ§ͺ Remote Diagnostics - Ping, traceroute, speed tests (TR-143)
  • πŸ” API Security - Key-based authentication
  • πŸ“‘ Queue Processing - Laravel Horizon for async tasks

πŸ“‹ Quick Start

Prerequisites

  • PHP 8.3+
  • PostgreSQL 16+ (or SQLite for development)
  • Redis (for queue processing)
  • Composer
  • MQTT Broker (optional, test.mosquitto.org available)

Installation

1. Clone & Install Dependencies

git clone https://github.com/dexter939/EvoAcs.git
cd EvoAcs
composer install

2. Environment Setup (Automated)

# Run interactive setup wizard
./scripts/setup-env.sh

Or Manual Setup:

cp .env.example .env
php artisan key:generate

# Edit .env with your configuration
nano .env

See Environment Setup Guide for detailed configuration.

3. Database Migration

# Run database migrations
php artisan migrate

# Optional: Seed sample data
php artisan db:seed

4. Start Services

Development Server:

php artisan serve --host=0.0.0.0 --port=5000

Background Services (Optional):

# Terminal 1: MQTT Subscriber (for MQTT transport)
php artisan usp:mqtt-subscribe

# Terminal 2: WebSocket Server (for WebSocket transport)
php artisan usp:websocket-server

# Terminal 3: Queue Worker (for async tasks)
php artisan horizon

5. Access Dashboard

http://localhost:5000/acs/dashboard

πŸ”§ Configuration

Essential Environment Variables

# Application
APP_KEY=                          # Auto-generated

# Database
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_DATABASE=acs_database
DB_USERNAME=acs_user
DB_PASSWORD=your_password

# ACS API Key (REQUIRED)
ACS_API_KEY=your-secret-api-key

# TR-369 USP
USP_CONTROLLER_ENDPOINT_ID=proto::acs-controller
USP_WEBSOCKET_PORT=9000

# MQTT Broker
MQTT_HOST=test.mosquitto.org
MQTT_PORT=1883

# Redis (for queues & WebSocket)
REDIS_HOST=127.0.0.1
QUEUE_CONNECTION=redis

πŸ“– Complete Reference: Environment Variables Documentation


πŸ“‘ Protocol Endpoints

TR-069 (CWMP)

POST /tr069

SOAP-based endpoint for TR-069 device communication.

TR-369 (USP)

POST /usp

Binary protobuf endpoint for USP Records (HTTP MTP).

RESTful API

POST /api/v1/usp/devices/{device}/get-params
POST /api/v1/usp/devices/{device}/set-params
POST /api/v1/usp/devices/{device}/operate
POST /api/v1/usp/devices/{device}/add-object
DELETE /api/v1/usp/devices/{device}/delete-object
POST /api/v1/usp/devices/{device}/reboot
POST /api/v1/usp/devices/{device}/subscribe
DELETE /api/v1/usp/devices/{device}/subscriptions/{id}

Authentication: API Key required in X-API-Key header.

πŸ“– Complete API Docs: USP API Documentation


πŸ—οΈ Architecture

System Components

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   ACS Controller                    β”‚
β”‚                                                     β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚  TR-069 SOAP β”‚  β”‚  TR-369 USP  β”‚  β”‚  RESTful  β”‚ β”‚
β”‚  β”‚   Endpoint   β”‚  β”‚   Endpoint   β”‚  β”‚    API    β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚                                                     β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚         Transport Layer (MTP)                β”‚  β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚  β”‚
β”‚  β”‚  β”‚ MQTT β”‚  β”‚ WebSocketβ”‚  β”‚  HTTP Polling  β”‚ β”‚  β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                                                     β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚         Queue System (Laravel Horizon)       β”‚  β”‚
β”‚  β”‚         Database (PostgreSQL)                β”‚  β”‚
β”‚  β”‚         Cache & Session (Redis)              β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         ↕
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                CPE Devices (100K+)                  β”‚
β”‚   TR-069 CWMP Devices  β”‚  TR-369 USP Devices       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Technologies

  • Backend: Laravel 11, PHP 8.3
  • Database: PostgreSQL 16 (optimized for 100K+ devices)
  • Queue: Redis + Laravel Horizon
  • Protocols: Protocol Buffers (TR-369), SOAP (TR-069)
  • Transport: MQTT (php-mqtt/laravel-client), WebSocket (native PHP), HTTP
  • Frontend: Soft UI Dashboard, Chart.js
  • Icons: FontAwesome 6

πŸ§ͺ Testing

Manual Testing Scripts

# Test USP API endpoints
./tests/test_usp_api.sh

# Test Subscribe/Notify pattern
./tests/test_subscribe_notify.sh

USP Protocol Testing

# Test message encoding/decoding
php artisan usp:test-message

# Test MQTT communication
php artisan usp:test-mqtt

# Test controller functionality
php artisan usp:test-controller

πŸ“Š Dashboard Features

Statistics Cards (12 total)

  • Legacy Metrics: Devices Online, Tasks Pending, Firmware Deploys, Tests, etc.
  • TR-069 Metrics: CWMP device count
  • TR-369 Metrics: USP device count, MQTT/HTTP transport statistics

Charts (4 interactive)

  • Device Status (Doughnut Chart)
  • Provisioning Tasks (Bar Chart)
  • Diagnostics (Polar Area Chart)
  • Firmware Deployments (Line Chart)

Device Management

  • Protocol filtering (TR-069 / TR-369)
  • MTP transport filtering (MQTT / WebSocket / HTTP)
  • Status badges and icons
  • Real-time auto-refresh (30s)

πŸ“– Documentation


πŸ” Security

Production Checklist

  • Change ACS_API_KEY to strong random value (32+ chars)
  • Set APP_ENV=production and APP_DEBUG=false
  • Enable SSL/TLS for MQTT (port 8883)
  • Enable WebSocket SSL (USP_WEBSOCKET_SSL=true)
  • Configure trusted proxies for load balancer
  • Implement multi-tenant authentication (roadmap)
  • Enable rate limiting
  • Configure monitoring (Sentry, metrics)

API Authentication

All /api/v1/* endpoints require API key:

curl -H "X-API-Key: your-api-key" \
  http://localhost:5000/api/v1/usp/devices

πŸš€ Production Deployment

Background Services (Required)

Use a process manager (systemd, supervisor, or PM2):

# /etc/systemd/system/acs-mqtt.service
[Unit]
Description=ACS MQTT Subscriber
After=network.target

[Service]
Type=simple
User=www-data
WorkingDirectory=/var/www/acs
ExecStart=/usr/bin/php artisan usp:mqtt-subscribe
Restart=always

[Install]
WantedBy=multi-user.target

Repeat for:

  • acs-websocket.service β†’ php artisan usp:websocket-server
  • acs-horizon.service β†’ php artisan horizon

Performance Optimization

# Cache configuration
php artisan config:cache
php artisan route:cache
php artisan view:cache

# Optimize autoloader
composer install --optimize-autoloader --no-dev

πŸ› οΈ Troubleshooting

Common Issues

1. WebSocket connection failed

# Check if port is configured
grep USP_WEBSOCKET_PORT .env

# Start WebSocket server
php artisan usp:websocket-server

2. MQTT connection failed

# Test MQTT connection
php artisan usp:test-mqtt

# Check broker settings
grep MQTT_ .env

3. Queue not processing

# Check queue configuration
grep QUEUE_CONNECTION .env

# Start Horizon
php artisan horizon

4. API authentication failed

# Verify API key is set
grep ACS_API_KEY .env

# Use in request
curl -H "X-API-Key: your-key" http://localhost:5000/api/v1/...

πŸ—ΊοΈ Roadmap

Current Version (v1.0)

  • βœ… TR-069 CWMP support
  • βœ… TR-369 USP support
  • βœ… MQTT/WebSocket/HTTP transport
  • βœ… Subscribe/Notify pattern
  • βœ… RESTful API
  • βœ… Web dashboard

Future Enhancements

  • Multi-tenant authentication system
  • Bulk device operations
  • Device grouping and tagging
  • Scheduled provisioning (cron-based)
  • Advanced analytics and reporting
  • Prometheus metrics export
  • High-availability clustering
  • Rate limiting and throttling

πŸ“„ License

This project is licensed under the MIT License.


πŸ™ Acknowledgments


πŸ“ž Support

For issues and questions:


Built with ❀️ for telecom operators managing large-scale CPE deployments

About

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages