OpenWRT-based solution for bridging isolated camera access points to existing wireless infrastructure using dual-radio routers as a transparent gateway.
- Overview
- Features
- System Requirements
- Network Architecture
- Installation
- Configuration
- Usage
- Project Structure
- Troubleshooting
- License
This project provides a complete solution for connecting wireless cameras (or any device with a fixed IP and no gateway) to your existing wireless infrastructure. It uses OpenWRT-based routers configured as dual-mode wireless bridges with NGINX reverse proxy capabilities.
- Connect GoPro cameras to remote internet access
- Bridge professional broadcast cameras (Sony PMW-F55, etc.) to production networks
- Integrate isolated IoT devices into existing infrastructure
- Enable remote access to devices with limited networking capabilities
- Dual-Radio Bridge: Connects two separate wireless networks seamlessly
- NGINX Reverse Proxy: Handles HTTP to WebSocket upgrades and header rewriting
- Double-NAT Architecture: Transparent routing between isolated networks
- Automated Firmware Generation: Builds custom OpenWRT images for multiple cameras
- SNMP Support: Monitor router status and location via SNMP
- Web Configuration Interface: Simple web UI for changing camera associations
- Static/DHCP Support: Flexible network configuration options
Supported Routers:
- Mikrotik RouterBoard RB433/RB433AH with two mini-PCI radios
- TP-Link WDR3600 or similar dual-band OpenWRT-capable routers
Minimum Specifications:
- 2x wireless radios (2.4GHz recommended for both, or dual-band)
- 64MB+ RAM
- 16MB+ Flash storage
- Ubuntu Server 14.04 or 18.04 (64-bit)
- 8 GB RAM minimum
- 16 GB free disk space
- Internet connection for downloading dependencies
+----------------+ +------------------+ +----------------+
| | | | | |
| Camera (AP1) | )) 2.4G | OpenWRT Router | 2.4G (( | Infrastructure |
| | | (Dual Radio) | | (AP2) |
| 10.0.0.1 | | | | |
| No Gateway | | IP_A | | IP_B | | DHCP/Static |
| | | 10.0.0.2 | x.x.x.x| | |
+----------------+ +------------------+ +----------------+
|
NGINX Reverse Proxy
(HTTP/WebSocket passthrough)
-
Interface A (Camera Side)
- Static IP within camera subnet (e.g., 10.0.0.2/16)
- Wireless client mode to camera AP
-
Interface B (Infrastructure Side)
- DHCP or static IP from existing network
- Wireless client mode to infrastructure AP
-
LAN Interface
- Management interface (192.168.1.254/24)
- Access to LuCI web interface (port 8880)
git clone https://github.com/AlverGant/camera-router.git
cd camera-routerEdit camera_configs.cfg to match your environment:
nano camera_configs.cfgKey configuration parameters:
numberofnodes: Number of camera routers to generate firmware fordevicetype: Hardware model (rb433 for Mikrotik RB433/RB433AH)camera_ssid[]: Array of camera WiFi SSIDscamera_wpa2key[]: Array of camera WiFi passwordsestudio_ssid: Infrastructure WiFi SSIDestudio_passwd: Infrastructure WiFi passwordestudio_ip[]: Static IPs for each router on infrastructure networknet_config[]: Network configuration (IP ranges, netmasks, gateways)
Make the firmware generator executable and run it:
chmod +x camera_firmware_generator.sh
./camera_firmware_generator.shNote: First compilation takes 1+ hour. Dependencies are downloaded automatically.
Firmware files will be generated in firmwares/ directory:
camera-X_rootfs.tar.gz- Root filesystemcamera-X_kernel.bin- Kernel imagecamera-X_sysupgrade.bin- Sysupgrade image (for updates)
For Mikrotik RB433/RB433AH:
Use the provided installation script:
./Install_OpenWRT_on_Routerboard_RB433AH.shOr use TFTP method:
./TFTP_ServerOpenwrt.sh# System Configuration
numberofnodes='20' # Number of routers to generate
devicetype="rb433" # Hardware platform
# Wireless Configuration
radio_estudio_channel=auto # Infrastructure radio channel
radio_camera_channel=auto # Camera radio channel
# Camera Association (per-camera settings)
camera_ssid[camera-1]=DIRECT-IqF0:PMW-F55_0120112
camera_wpa2key[camera-1]=X23tBk3b
estudio_ip[camera-1]=10.100.176.40
# Infrastructure Settings (shared)
estudio_ssid=GCam
estudio_passwd=mobilidade@123
# Network Configuration
net_config[camera_ip]=10.0.0.1
net_config[camera_iface_ip]=10.0.0.2
net_config[estudio_protocol]=static # or dhcpAfter flashing, you can modify settings via:
- Web Interface: http://[router-ip]:8880 (LuCI)
- SSH:
ssh root@[router-ip] - SSID Change Interface: http://[router-ip]:8080
Once configured, access your camera through the router's infrastructure IP:
# Example: Camera on router with IP 10.100.176.40
http://10.100.176.40The NGINX proxy automatically:
- Forwards requests to camera (10.0.0.1)
- Upgrades HTTP to WebSocket
- Rewrites headers for compatibility
Routers include SNMP support for monitoring:
snmpwalk -v2c -c public [router-ip]GPS coordinates and system contact info configured in camera_configs.cfg.
Access the web interface on port 8080 to change camera SSID/password without reflashing:
http://[router-ip]:8080
Available operations:
- Switch to different camera SSID
- Reset WiFi configuration
- Revert to previous settings
camera-router/
├── README.md # This file
├── camera_configs.cfg # Main configuration file
├── camera_firmware_generator.sh # Firmware build script
├── camera_functions.sh # Build functions
├── configure_node.sh # Manual configuration script
├── Install_OpenWRT_on_Routerboard_RB433AH.sh # RB433 installer
├── TFTP_ServerOpenwrt.sh # TFTP flash utility
├── network.png # Network diagram
├── rb433/ # RB433 configuration files
│ ├── diffconfig # OpenWRT build config
│ ├── wireless # WiFi configuration
│ ├── network_wwan_* # Network configs
│ ├── firewall # Firewall rules
│ ├── nginx.conf # NGINX proxy config
│ └── *.cgi # Web interface scripts
└── firmwares/ # Generated firmware (created during build)
Problem: Compilation fails with missing dependencies
# Update system and retry
sudo apt update
sudo apt upgrade
./camera_firmware_generator.shProblem: Out of disk space during compilation
OpenWRT build requires ~16GB. Free up space and retry.
Problem: Router not connecting to camera WiFi
- Check camera SSID/password in
camera_configs.cfg - Verify camera WiFi is enabled and broadcasting
- Check wireless channel compatibility
Problem: Cannot access camera through router
- Verify NGINX is running:
ssh root@[router] "/etc/init.d/nginx status" - Check firewall rules:
ssh root@[router] "iptables -L -n" - Verify network interfaces:
ssh root@[router] "ifconfig"
Problem: Router not getting IP from infrastructure
- Check infrastructure SSID/password
- Verify DHCP is enabled (or static IP configured correctly)
- Check signal strength:
ssh root@[router] "iwinfo"
# Check WiFi status
ssh root@[router] "wifi status"
# Restart networking
ssh root@[router] "/etc/init.d/network restart"
# View NGINX logs
ssh root@[router] "logread | grep nginx"
# Monitor system logs
ssh root@[router] "logread -f"This project is provided as-is for educational and production use. Modify and distribute freely.
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Test your changes thoroughly
- Submit a pull request
Developed for TV Globo's wireless camera infrastructure.
Note: Default credentials and network configurations in this repository are examples. Always use strong passwords and appropriate security measures in production environments.