Connect to existing wifi network (without Luci)

I need connect to existing wi-fi without Luci, because I installed the firmware without Luci.
on existing wi-fi router lan port blocked, so need connect to wi-fi
In the end I want to install web gui luci ,to be able to flash again

Does anyone have any variations?

Use vi to edit the /etc/config/network file. The only change here is to comment out (put a # mark in at the start of the line) any Ethernet interfaces attached to the wan network, since you will not be using Ethernet for the wan.

Then edit the /etc/config/wireless file. Comment out the "disabled" line in the first section (wifi-device) to enable the wifi system globally. Don't change anything else in that section. Make a new section like this:

config wifi-iface
    option network 'wan'
    option device radio0
    option mode 'sta'
    option ssid 'WIFINETWORKNAME'
    option encryption psk2
    option key 'WIFIPASSWORD'

Replace the name and password with your actual name of course.
Execute /etc/init.d/network restart or simply reboot and the router should connect to the Internet. (If the IP range of the network you connected to is 192.168.1.X you will need to edit /etc/config/network and change the lan IP to something like

1 Like

network file

config interface 'loopback'                                                                                                   
        option ifname 'lo'                                                                                                    
        option proto 'static'                                                                                                 
        option ipaddr ''                                                                                             
        option netmask ''                                                                                            
config globals 'globals'                                                                                                      
        option ula_prefix 'fda8:e7c7:d4da::/48'                                                                               
config interface 'lan'                                                                                                        
        option type 'bridge'                                                                                                  
        option ifname 'eth1'                                                                                                  
        option proto 'static'                                                                                                 
        option ipaddr ''                                                                                           
        option netmask ''                                                                                        
        option ip6assign '60'                                                                                                 
#config interface 'wan'                                                                                                       
#       option ifname 'eth0'                                                                                                  
#       option proto 'dhcp'                                                                                                   
#config interface 'wan6'                                                                                                      
#       option ifname 'eth0'                                                                                                  
#       option proto 'dhcpv6'

something does not work
maybe I comment out incorrectly

Don't comment out the whole wan, just the option ifname eth0 line.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.