Steps to configuring wifi client

Hi,

Having trawled through the docs, I'm not quite clear on what I need in place to have one of the 2 wifi radios (netgear wndr 3700) connect as a client to my domestic ap.

Clearly (/etc/config/) wireless. I have enabled the radios (disabled 0), included the ssid, channel, key and encryption mode. The radios come up (lights fires up) but nothing else. Ifconfig shows the interfaces, but with no traffic.

So some Qs:

  1. Do I need to make another interface for the radios, currently they are just set to point to the lan (that has a fixed static address)

  2. given that I have the ssid key etc, do I need a wifi supplicant file, and if so what is it used for beyond the ap key? (Log read shows a driver complaining of this missing)

  3. How do I actually diagnose what is wrong.

Thanks
nick

Client (or Station) mode bridged to the lan interface will not work. You can separate the client wifi interface from the bridge and route the packets.
Or you can enable WDS, if the access point supports it.
Or you can try some other solutions like relayd.

If you just need Internet access, for example to share from a neighbor (with permission), the simplest setup is to replace the wan connection with a wifi client.

In /etc/config/wireless it looks like this. Make sure to use the proper radio on a dual band device. Also in the radio section (not shown) add an option country with the 2 letter code for your country to ensure operation on all the frequencies and power levels allowed in your country.

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'wan'
	option mode 'sta'
	option encryption 'psk2'
        option ssid 'NETWORK NAME'
        option key 'PSK PASSPHRASE'

Then in /etc/config network, there will usually already be a wan section (except on devices with only one Ethernet port). Remove any option ifname so it looks like this:

config network 'wan'
        option proto dhcp

And with all the other settings as default, this should link up and give Internet access to PCs connected to the LAN ports. One common problem is when the neighbor's network uses 192.168.1.X addresses, you need to change your LAN IP to something like 192.168.2.1 or other 192.168.Y.1 where Y is not the same as the neighbors.

1 Like

Hi,

Thanks for the recommendations, but its still not working. I was hoping someone could point out the numpty config error as that must be here somewhere..........

ifconfig gives (and the 2.4g led is active)
wlan0 Link encap:Ethernet HWaddr A0:21:B7:A9:68:D9
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

for /etc/config/wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option channel '6'
	option hwmode '11g'
	option path 'pci0000:00/0000:00:11.0'
	option htmode 'HT20'
	option disabled '0'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'wwan'
	option mode 'sta'
	option ssid 'my home ap ssid'
	option encryption 'psk'
	option key 'my home ap password'

for /etc/config/network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd00:a9e6:145f::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option ipaddr '172.16.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wwan'
        option proto 'dhcp'

And the supplicant file /var/run/wpa_supplicant-wlan0.conf

network={
	scan_ssid=1
	ssid="my home ap ssid"
	key_mgmt=WPA-PSK
	psk="my home ap password"
	proto=WPA
	beacon_int=100
}

I guess at some point someone clicked the "Join" button on the network scan since a 'wwan' network has been created. That never worked very well for me.

If you do that, wwan needs to be added to the firewall wan zone. I recommend configuring manually and use 'wan' as the network for your wireless uplink since that is already completely set up in the firewall.

iwinfo wlan0 assoclist should show you are connected to the other network. ip addr show should show an IP address obtained from the other network. ifconfig is obsolete, other tools give more detailed results.