I'm trying to setup a Raspberry Pi 4B as a regular wireless router. I got the wired connection working but couldn't seem to set up the on board WiFi as an access point. On LuCI it shows Device is not active and Wireless is not associated.
config wifi-device 'radio0'
option type 'mac80211'
option path 'platform/soc/fe300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
option htmode 'VHT80'
option hwmode '11a'
option channel 'auto'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'RPi-OpenWrt'
option key '12345678'
option encryption 'psk2'
There's a similar thread Unable to initialise wireless AP - Rasp Pi 4. I tried the configs posted there but none seem to work either.
You MUST first install Raspberry PI OS on an micro SD card, boot from it, run Raspi-Config and set the Wifi country code. You cannot do that from OpenWrt, as it will not work.
From then on, you can revert back to your OpenWrt microSD card and wireless will work. Not that it will have a very long range, though...
Just ran raspi-config and set the WiFi country code to US but wireless ap still doesn't work. It can scan for other wireless networks no problems though.
I don't care much about its range but I do need it to at least work...
Try removing wpad and installing hostapd to see if it works. On my Raspberry Pi 4 2GB, I could only get wireless to work after setting the country code as previously instructed AND replacing WPAD w/ hostapd. Other only needed to set the country code. Still don't know the reason why (RPi revision??, other packages installed, IDK...)
Tested with the latest OpenWrt 21.02.2, the key action is to set option htmode 'VHT20' rather than VHT80, you can leave the country code as 00 (world). Then restart the raspberry 4B, it's AP SSID will be seeable by clients.