Thanks for the explanation of how to start DHCP on the WiFi interface.
At the moment I'm struggling to find out where to enter these deatails. In an effort to get some clarity in my /etc/config/wireless, I deleted it and rebooted and got one generated by the system which created three wifi-devices and three wifi-ifaces.
Running iw dev shows phy#2 phy#1 phy#0. How do I know which each refers to ?b
Looks like I incorrectly installed kmod-iwl4965 or iwl4965-firmware.
I do now have a /etc/config/wireless which only has a single wifi-device and wifi-interface which I never got before.
Scanning works OK and I can see the SSID I want to connect to, but can't yet figure out how to connect to it. I've set the ssid and key in the wifi-iface and set encryption to wpa. Mode is set to sta and network to wan.
Do I need to set channel, band and htmode. They are set to 36, 5g, HT20 by default.
How do I manually connect to the broadband router?
The wifi led is on and the list of ssids scanned shows the one I want to connect to, so I should be close to connecting.
No, you can't (that only, kind of, works for WEP, which isn't supported by OpenWrt at all anymore), it doesn't (and never did) for WPA based encryptions, which need more than the kernel can provide without userspace help.
If you don't have luci (installing it might be sensible), you need to configured /etc/config/wireless correctly.
I guess luci is running but don't have any means of using it at the moment, so it's down to getting the wireless options right...Do I really need to set channel, band and htmode? And if not how do I know the correct values?
As for the wifi-iface, is it correct to set network, mode, encryption to wan, sta, wpa?
I understand that I also need to add this to /etc/config/network
No worries, I provided all the information regarding your inquires in the post.*
I'm just inquiring so I understand your skill level - you seem to have forgotten things about OpenWrt, and as you've been a Community Member for quite a few years - I was concerned and asking via Private Message.
I hope it helps.
My apologies, I misunderstood that you were attempting to add DHCP client setting to wireless. My bad - as I noted already:
That config should already exist, so it's unclear why you're inquiring.
I apologize for any confusion and hope that clarifies things. I was writing as if you were aware of that information. I hope this provided clarity.
config wifi-iface 'wifinet1' #<---may differ on yours
option ssid 'upstrream_SSID'
option device 'radio0' #<---may differ in name/band
option mode 'sta'
option key 'xxxxxxxxxxxxx' #<---may differ on yours
option network 'wwan' #<---or use wan, since it already exist
option encryption 'psk2+ccmp'
I noted that there should already be a wifi-device default config, and AP configs, so I hope this helps you setup. I"m not sure what you need exactly, as there should be default wan config (in network) and a default wifi-device settings (in wireless).
Be sure to delete the default AP mode interface (since Intel doesn't support AP) and remove the option disabled line from the wifi-device block. Check the log for wifi-related errors. Run iw dev and you should have one device of mode Managed. If it has connected to the AP you'll also see the SSID and channel of operation. Channel 1 is in the 2 GHz band so option band should be 2g.