Configure wired first
Set the lan ip address (that is, the IP address used to access the route)
- UCI set network. Lan. ipaddr = [lan ip]
Copy code
Pppoe user
- UCI set network. Wan. proto = pppoe // set the WAN port type to pppoe
- UCI set network. Wan. Username = [Internet account]
- UCI set network. Wan. Password = [Internet password] // set the pppoe user name and password
Copy code
If you want to attach it to a higher-level route
- UCI set network. Wan. proto = NONE // disable Wan
- UCI set network. Lan. Gateway = [upper-level Route IP address] // The Gateway points to the upper-level route
- UCI set network. Lan. DNS = [upper-level Route IP address] // DNS points to the upper-level route
- UCI set DHCP. Lan. Ignore = 1 // disable DHCP for the LAN
Copy code
Then wireless
- UCI set wireless. @ WiFi-device [0]. Disabled = 0 // enable wireless
- UCI set wireless. @ WiFi-device [0]. txpower = 17 // if the power is set to 17dbm, the wireless module will be burned if the power is too high.
- UCI set wireless. @ WiFi-device [0]. Channel = 6 // set the wireless channel to 6
- UCI set wireless. @ WiFi-iface [0]. mode = ap // set the wireless mode to AP
- UCI set wireless. @ WiFi-iface [0]. SSID = [set your own SSID] // set the wireless SSID
- UCI set wireless. @ WiFi-iface [0]. Network = LAN // link to the LAN wirelessly
- UCI set wireless. @ WiFi-iface [0]. Encryption = psk2 // set encryption as WPA2-PSK
- UCI set wireless. @ WiFi-iface [0]. Key = [Password] // set the wireless password
Copy code
Final application configuration
- UCI commit // Application
- /Etc/init. d/network restart // restart the network service