Skip to content

#67 — cpe-alignment-tool

PLANIFIÉ

Priorité: 🟠 HAUTE · Type: TYPE G · Conteneur: rgz-tools · Code: tools/cpe_alignment/

Dépendances: Aucune


Description

Guide terrain interactif pour l'alignement des antennes CPE LiteBeam sur les sites revendeurs. Affiche en temps réel le SNR et le CCQ via SSH sur le CPE, guidant le technicien pendant l'alignement physique de l'antenne pour maximiser le signal.

L'outil s'exécute depuis un PC portable ou tablet sur le terrain, connecté au CPE via câble Ethernet ou WiFi de gestion. Il lit les métriques directement depuis le firmware LiteBeam (Air View, UBNT API) et affiche un indicateur visuel de qualité du signal mis à jour toutes les secondes.

À la fin de l'alignement, intègre un test iperf3 automatique pour valider que le débit atteint les seuils minimaux (DL>5 Mbps, UL>1 Mbps) avant validation go-live.


Architecture Interne

Technicien terrain

PC portable → SSH → CPE LiteBeam (10.[vlan].0.2)

Lecture métriques UBNT:
  - SNR (dB)      → objectif: >25 dB
  - CCQ (%)       → objectif: >85%
  - RSSI (dBm)    → objectif: >-70 dBm
  - TX Rate (Mbps)
  - RX Rate (Mbps)

Affichage terminal temps réel (refresh 1s)

[Ajustement physique antenne]

Test iperf3: DL>5Mbps / UL>1Mbps

Rapport JSON: {snr, ccq, rssi, dl_mbps, ul_mbps, result: pass|fail}

Seuils d'acceptation

MétriqueMinimumOptimal
SNR15 dB>25 dB
CCQ70 %>90 %
RSSI-80 dBm>-65 dBm
DL5 Mbps>20 Mbps
UL1 Mbps>5 Mbps

Configuration

Variables d'environnement

env
CPE_SSH_USER=ubnt
CPE_SSH_KEY_PATH=/home/tech/.ssh/rgz_cpe_key
CPE_DEFAULT_PASSWORD=ubnt
IPERF3_SERVER=10.0.0.1     # Serveur iperf3 NOC
IPERF3_DURATION=30          # Secondes
MIN_DL_MBPS=5
MIN_UL_MBPS=1

Installation

bash
pip install paramiko rich iperf3
# OU via Docker
docker run --rm -it --network host rgz-tools python3 cpe_align.py --ip 10.142.0.2

Utilisation CLI

bash
# Alignement simple (mode interactif)
python3 tools/cpe_alignment/cpe_align.py --ip 10.142.0.2

# Avec authentification par clé SSH
python3 tools/cpe_alignment/cpe_align.py \
  --ip 10.142.0.2 \
  --user ubnt \
  --key ~/.ssh/rgz_cpe_key

# Avec test iperf3 automatique après alignement
python3 tools/cpe_alignment/cpe_align.py \
  --ip 10.142.0.2 \
  --iperf-server 10.0.0.1 \
  --validate

# Export rapport JSON
python3 tools/cpe_alignment/cpe_align.py \
  --ip 10.142.0.2 \
  --output /tmp/alignment_report.json

Affichage terminal (exemple)

╔══════════════════════════════════╗
║  RGZ CPE Alignment Tool v1.0    ║
║  CPE: 10.142.0.2 (access_kossou)║
╠══════════════════════════════════╣
║  SNR:   28 dB  ████████████ ✓   ║
║  CCQ:   94 %   ███████████████  ║
║  RSSI: -62 dBm █████████████ ✓  ║
║  TX:   45 Mbps                   ║
║  RX:   38 Mbps                   ║
╠══════════════════════════════════╣
║  STATUS: 🟢 EXCELLENT            ║
║  [Appuyer ENTER pour valider]   ║
╚══════════════════════════════════╝

Commandes Utiles

bash
# Test connexion SSH CPE
ssh -i ~/.ssh/rgz_cpe_key ubnt@10.142.0.2 "cat /proc/net/wireless"

# Lire SNR via UBNT API directement
curl -sk https://10.142.0.2/api/board.cgi | python3 -m json.tool

# Test iperf3 manuel
iperf3 -c 10.0.0.1 -t 30 -R   # Download
iperf3 -c 10.0.0.1 -t 30       # Upload

# Alignement + validation + rapport
python3 tools/cpe_alignment/cpe_align.py \
  --ip 10.142.0.2 --validate \
  --output /tmp/report_$(date +%Y%m%d_%H%M).json

Implémentation TODO

  • [ ] CLI Python tools/cpe_alignment/cpe_align.py
  • [ ] Connexion SSH Paramiko + lecture métriques UBNT
  • [ ] Affichage temps réel avec rich (refresh 1s)
  • [ ] Indicateur visuel SNR/CCQ (barre de progression colorée)
  • [ ] Intégration iperf3 post-alignement
  • [ ] Génération rapport JSON
  • [ ] Mode batch (aligner plusieurs CPE en séquence)
  • [ ] Docker image rgz-tools intégrant cet outil

Dernière mise à jour: 2026-02-21

PROJET MOSAÏQUE — 81 outils, 22 conteneurs, 500+ revendeurs WiFi Zone