This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
products:sbc:vim4:applications:wifi-sta-ap-mode [2022/07/13 05:40] nick |
products:sbc:vim4:applications:wifi-sta-ap-mode [2025/05/15 06:30] (current) nick |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== VIM4 Wi-Fi STA/AP Mode Configuration ====== | ||
| - | ====== VIM4 Wi-Fi STA/AP Mode ====== | + | ===== Overview |
| + | This guide explains how to configure dual Wi-Fi mode using the provided script (v1.0), enabling simultaneous operation in: | ||
| + | STA+AP Mode: '' | ||
| - | {{page> | + | ETH+AP Mode: '' |
| + | ===== Prerequisites ===== | ||
| + | |||
| + | Root privileges required | ||
| + | |||
| + | Ensure wireless interfaces are properly identified: | ||
| + | |||
| + | STA interface: '' | ||
| + | |||
| + | AP interface: '' | ||
| + | |||
| + | Ethernet interface: '' | ||
| + | |||
| + | ===== Configuration Script Usage ===== | ||
| + | Run the script with root privileges: | ||
| + | |||
| + | ``` | ||
| + | sudo khadas_ap.sh | ||
| + | ``` | ||
| + | |||
| + | |||
| + | ==== Main Menu Options ==== | ||
| + | ``` | ||
| + | ======================================== | ||
| + | WiFi Configuration Tool v1.0 | ||
| + | ======================================== | ||
| + | 1. STA+AP Mode | ||
| + | 2. ETH+AP Mode | ||
| + | 3. Stop All Services | ||
| + | 4. Exit | ||
| + | ======================================== | ||
| + | Please select an option [1-4]: | ||
| + | ``` | ||
| + | 1.STA+AP Mode - Recommended for most devices: creates NAT forwarding between '' | ||
| + | |||
| + | 2.ETH+AP Mode - For devices with Ethernet port: creates NAT forwarding between '' | ||
| + | |||
| + | 3.Stop All Services - Terminates AP/DHCP/NAT services | ||
| + | |||
| + | 4.Exit - Quit the script | ||
| + | |||
| + | ==== Configuration Steps ==== | ||
| + | |||
| + | Select operation mode from menu | ||
| + | |||
| + | For AP modes (1 or 2): | ||
| + | |||
| + | * Enter SSID for hotspot | ||
| + | * Set password (WPA2-PSK required) | ||
| + | * Script automatically handles: | ||
| + | * Hostapd configuration | ||
| + | * Dnsmasq DHCP setup | ||
| + | * IP forwarding | ||
| + | * iptables NAT rules | ||
| + | |||
| + | ===== Verification ===== | ||
| + | Check interface status after configuration: | ||
| + | |||
| + | ``` | ||
| + | ifconfig wlan0 && ifconfig wlan1 | ||
| + | ``` | ||
| + | Verify internet connectivity (STA+AP mode): | ||
| + | |||
| + | ``` | ||
| + | ping -I wlan0 google.com | ||
| + | ``` | ||
| + | Test hotspot access: | ||
| + | |||
| + | SSID: [Your configured SSID] | ||
| + | |||
| + | Password: [Your set password] | ||
| + | |||
| + | Client IP range: 192.168.43.2-254 | ||
| + | |||
| + | ===== Important Notes ===== | ||
| + | <WRAP important> | ||
| + | Edge2 Device Limitations: | ||
| + | |||
| + | No Ethernet interface ('' | ||
| + | |||
| + | ETH+AP Mode (Option 2) will not function | ||
| + | |||
| + | Use STA+AP Mode (Option 1) exclusively | ||
| + | |||
| + | </ | ||
| + | ===== Technical Details ===== | ||
| + | |||
| + | IP Configuration: | ||
| + | |||
| + | * AP Static IP: 192.168.43.1/ | ||
| + | * DHCP Range: 192.168.43.2-254 | ||
| + | * DNS: Google DNS (8.8.8.8) via port 5353 | ||
| + | |||
| + | Security: | ||
| + | |||
| + | * WPA2-PSK encryption | ||
| + | * CCMP/AES cipher mandatory | ||
| + | |||
| + | Default channel: 6 | ||
| + | |||
| + | Dependencies: | ||
| + | |||
| + | * dnsmasq (DHCP server) | ||
| + | * hostapd (AP configuration) | ||
| + | * iptables (NAT forwarding) | ||
| + | |||
| + | ===== Troubleshooting ===== | ||
| + | |||
| + | AP Not Appearing: | ||
| + | |||
| + | Confirm '' | ||
| + | |||
| + | Check for conflicting services: | ||
| + | |||
| + | ``` | ||
| + | ps aux | grep -E ' | ||
| + | ``` | ||
| + | No Internet Access: | ||
| + | |||
| + | Verify STA connection: | ||
| + | |||
| + | ``` | ||
| + | iwconfig wlan0 | ||
| + | ``` | ||
| + | Check NAT rules: | ||
| + | |||
| + | ``` | ||
| + | iptables -t nat -L -n -v | ||
| + | ``` | ||
| + | DHCP Failures: | ||
| + | |||
| + | Confirm dnsmasq running: | ||
| + | |||
| + | ``` | ||
| + | systemctl status dnsmasq | ||
| + | ``` | ||