Testing interoperability between ONUs and various GPON/XGSPON OLTs often requires handling vendor-specific Managed Entities (ME). Traditionally, supporting a new ME requires modifying the core OMCI application and performing a full Firmware (FW) upgrade—a process that is time-consuming and risky for field deployments.
me_proxy is an experimental project designed to solve this. Leveraging OpenWrt’s powerful opkg package management and high-performance Lua integration, me_proxy allows ODMs and Telecommunications providers to customize ME behavior on-the-fly. By simply installing a specific .ipk plugin, the system can support new MEs without a reboot or firmware flash.
The system is divided into three layers: the CLI Trigger, the Communication Bridge, and the Logic Engine.
- omci_pkt (CLI Tool): A lightweight test tool that sends OMCI commands (Get/Set) to a Named Pipe (FIFO).
- omci_app (Daemon): Reads from the FIFO and acts as a ubus client, forwarding requests to the core proxy.
- me_proxy (Core Engine):
- C Core: Manages
ubusregistration and system signals. - Lua Binding: Provides an abstraction layer for ME logic.
- Hot-Reload (SIGHUP): Supports reloading Lua plugins without restarting the process.
- C Core: Manages
- Plugins (Lua): User-defined logic stored in
/etc/omci/plugins/, distributed via independentipkpackages (e.g., Mesh Control, Robot Manager).
The following diagram illustrates the lifecycle of an omci_pkt set command as it traverses from the CLI to the Lua callback.
- Trigger: User executes
omci_pkt set 33100.... - IPC: The command is written to
/tmp/omci_fifo. - Dispatch:
omci_appinvokes theomci.me_proxy setmethod viaubus. - Parsing:
me_proxyparses the attribute mask and looks up the corresponding handler. - Execution: The C core calls the specific Lua function defined in the plugin (e.g.,
robot_manager.lua). - Response: The result is bubbled back up to the CLI tool.
- Decoupled Logic: Keep the stable C core intact while iterating on business logic in Lua.
- Dynamic Deployment: Use
opkg installto add support for new MEs (e.g., Mesh, VoIP, or proprietary OAM). - Zero Downtime: Supports
SIGHUPsignal to refresh the Lua environment without droppingubusconnections. - Lightweight: Minimal memory footprint, ideal for embedded resource-constrained ONUs.
/etc/init.d/me_proxy start./omci_pkt get 33000 0 c000
# Result: 4 (Not Supported)opkg install me-33000-mesh
# The postinst script automatically sends SIGHUP to me_proxy./omci_pkt get 33000 0 c000
# Result: 0 (Success)- Extended Schema Validation: Using Lua tables to define ME constraints (Range, Type).
- MIB Persistence: Allowing Lua plugins to store state across reboots via UCI.

