Overview & Problem Statement
The Tenda F3 is one of the most widely deployed wireless routers in small businesses and homes in East Africa. However, administering it through its default embedded web UI is frustrating: it lacks per-device friendly labels, offers no unified QoS dashboard, does not remember passwords safely, and becomes unreachable when configured in Universal Repeater or Access Point mode because the default gateway IP changes dynamically.
Key Implemented Features
-
Automatic Gateway & Repeater Discovery: Scans active Windows IPv4 network interfaces and ARP tables, identifying Tenda OUI hardware even when operating on secondary subnets (such as
192.168.100.8) in Universal Repeater mode. -
Modular Router Adapter Pattern: Different F3 firmware revisions employ disparate authentication schemas (Base64 vs. MD5 vs. unauthenticated
ecos_pw). TendaManager implements discrete adapter classes (F3V2Adapter,F3V3Adapter,F3V4Adapter,F3V5Adapter) that auto-negotiate protocol compatibility seamlessly. -
Windows DPAPI Vault: Instead of plaintext configuration files, credentials are encrypted using Electron's
safeStorageAPI backed by Windows Data Protection API (DPAPI). -
Per-Device Bandwidth Throttling (QoS): Enables administrators to assign upload and download speed caps (from 256 Kbps up to custom Mbps) or block MAC addresses with a single click via
/goform/setQos. - Integrated Diagnostic Suite: Executes a comprehensive 7-step hardware and link test (adapter state, gateway ping, HTTP response, signature verification, auth validation, and QoS response), exporting sanitized diagnostic reports.
My Work & Engineering Contributions
I reversed-engineered the router firmware protocols and built the entire desktop application:
- Protocol Reverse-Engineering: Analyzed HTTP payloads and authentication handshakes across Tenda F3 firmware revisions v2 through v5.
- Hardware Service Layer: Engineered the Electron Node.js backend executing router HTTP commands, session refresh routines, and automated reconnect backoffs.
- React Desktop Frontend: Designed the administrative UI in React 18, TypeScript, and Vite with device inventory management and bandwidth dials.
-
Credential Security: Integrated OS-level DPAPI encryption via
safeStorage, securing router administrator credentials against local file extraction.
Technical Implementation & Architecture
The desktop client maintains strict separation between network operations and UI rendering:
- Secure IPC Boundary: The React interface communicates with router endpoints strictly through verified IPC channels, isolating authentication tokens from the browser context.
- Firmware Reconnect Pipeline: Background pollers handle temporary device unresponsiveness during router reboots or Wi-Fi channel switches gracefully without crashing the UI.
Engineering Challenges & Solutions
-
Challenge: Vanishing Gateway in Universal Repeater Mode: When configured to extend an upstream Wi-Fi network, the F3 router ceases listening on
192.168.0.1and obtains a DHCP address from the primary router.
Solution: Engineered a subnet discovery scanner that checks active ARP entries against known Tenda MAC OUI prefixes (e.g.C8:3A:35), identifying the router's new IP address automatically. -
Challenge: Multiple Incompatible Authentication Mechanisms: Older v2 firmware expects Base64 cookies while v4 firmware requires an MD5 password hash token.
Solution: Implemented a probe-and-negotiate adapter pattern that inspects the HTTP 401 response and HTML meta tags to select the appropriate authentication strategy dynamically.