HOWTO: Setup OpenWRT Virtual Machine on OPNsense and use it to manage a WiFi AP

Started by zan, May 15, 2023, 07:42:26 PM

Previous topic - Next topic
Thank you Zan! .This was helpful and I am able to successfully install the firmware.

Sorry, after reboot I am seeing this error(screenshot), I am able to login to webgui for openwrt and it seems the wireless is still not working.

I am sorry to bother you again and again...but I think it is almost the last stretch for home run.

Thank you in advance!


@catchyuser
I don't have the same card so I can't really help you debug the error.
It seems like the error is "missing microcode SW", so some required files are probably missing.
Since you have access to GUI can you try installing the firmware again from GUI this time?
Go to System>Software then Update lists, then look for "iwlwifi-firmware-ax210" in the filter field and install.

If it still encounters error after reboot, you may want to give the 59 version a try (https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/iwlwifi-ty-a0-gf-a0-59.ucode)
Rename the 66 version so the 59 version can get loaded.




Hi Zan,

I have downloaded the firmware 66 using the GUI and rebooted openwrt, it seems to be working now.

I can see the Wireless in the Status window ...

I will try to follow the next steps for setting up DumbAP as provided by you ..Hopefully I will have it up and running today :)

Thank you for all the help! Really appreciate it ...

Hi Zan,

I have enabled the Wireless settings in OpenWrt, and I can see the wireless SSID on the openwrt gui summary screen, but I do not see these Wifi SSID on my laptop.

Am I missing something to make the Wifi Access Point available to connect the laptop?

Thanks in advance.

You need trial and error and alot of googling for this.
Try to setup one SSID first and delete the other SSID.
Start with basic setup on 2.4Ghz band, auto channel and 20Mhz channel width.
Once you get it working you can try different channels and width.
Make sure to check the system logs for any error.
Have fun you are almost there!

Tried a lot with different setting in Openwrt, but no luck.

The AP is disabled in Openwrt for some reason.

Maybe I will order another Wifi adapter (MediaTek MT7921K), which will arrive in 2 weeks from Aliexpress.

I will try again with the new adapter.

Thank you Zan for the help!

QuoteThe AP is disabled in Openwrt for some reason.
That is strange. On Network>Wireless page, do you see if radio0 is active?
Can you show me your "/etc/config/wireless" and "/tmp/run/hostapd-phy0.conf"?

QuoteMaybe I will order another Wifi adapter (MediaTek MT7921K), which will arrive in 2 weeks from Aliexpress.
My colleague uses this card on his OpenWrt, I can ask his setting if you need it.

Hi Zan,

Please find the details as below.

/etc/config/wireless code

config wifi-device 'radio0'
        option type 'mac80211'
        option path 'pci0000:00/0000:00:08.0'
        option country 'US'
        option channel 'auto'
        option cell_density '1'
        option htmode 'HE20'
        option band '2g'

config wifi-iface 'wifinet1'
        option device 'radio0'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'
        option network 'lan wwan'

/tmp/run/hosapd-phy0.conf code

driver=nl80211
logger_syslog=127
logger_syslog_level=2
logger_stdout=127
logger_stdout_level=2
country_code=US
ieee80211d=1
hw_mode=g
supported_rates=60 90 120 180 240 360 480 540
basic_rates=60 120 240
beacon_int=100
channel=acs_survey



ieee80211n=1
ht_coex=0
ht_capab=[LDPC][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][MAX-AMSDU-7935][DSSS_CCK-40]
ieee80211ax=1
he_default_pe_duration=4
he_rts_threshold=1023
he_mu_edca_qos_info_param_count=0
he_mu_edca_qos_info_q_ack=0
he_mu_edca_qos_info_queue_request=0
he_mu_edca_qos_info_txop_request=0
he_mu_edca_ac_be_aifsn=8
he_mu_edca_ac_be_aci=0
he_mu_edca_ac_be_ecwmin=9
he_mu_edca_ac_be_ecwmax=10
he_mu_edca_ac_be_timer=255
he_mu_edca_ac_bk_aifsn=15
he_mu_edca_ac_bk_aci=1
he_mu_edca_ac_bk_ecwmin=9
he_mu_edca_ac_bk_ecwmax=10
he_mu_edca_ac_bk_timer=255
he_mu_edca_ac_vi_ecwmin=5
he_mu_edca_ac_vi_ecwmax=7
he_mu_edca_ac_vi_aifsn=5
he_mu_edca_ac_vi_aci=2
he_mu_edca_ac_vi_timer=255
he_mu_edca_ac_vo_aifsn=5
he_mu_edca_ac_vo_aci=3
he_mu_edca_ac_vo_ecwmin=5
he_mu_edca_ac_vo_ecwmax=7
he_mu_edca_ac_vo_timer=255

radio_config_id=45de76de13a265dc952a7af99881b439
interface=wlan0
ctrl_interface=/var/run/hostapd
bss_load_update_period=60
chan_util_avg_period=600
disassoc_low_ack=1
skip_inactivity_poll=0
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
uapsd_advertisement_enabled=1
utf8_ssid=1
multi_ap=0
auth_algs=1
wpa=0
ssid=OpenWrt
qos_map_set=0,0,2,16,1,1,255,255,18,22,24,38,40,40,44,46,48,56
config_id=a55075c6147418bf6325d4815b929dd1
bssid=a4:f9:33:c6:98:be


I think I know what is missing. Have you installed "hostapd-openssl" package?
WIthout it the hostap daemon won't be able to start.
Please install the package and reboot OpenWrt. You should be able to reconfigure with WPA2-PSK or WPA3-SAE for better rate. Don't forget to restart the radio.

Thank you Zan for the help.

I have installed hostapd-openssl, still radio0 show Inactive.
Please see the attached screenshot.


@catchyuser:
There are inconsistencies between your hostapd.conf and wireless config that prevents it to start.
I think it's better to re-configure from fresh if you don't mind:

  • Redownload the image, boot the VM, configure openwrt initial setup
  • Install just these 3 packages: "opkg install kmod-iwlwifi  iwlwifi-firmware-ax210 hostapd-openssl"
  • Reboot, go to Network>Wireless, Edit the SSID-> Only configure: Country (US?), Mode (AX, band:2.4Ghz, Channel:1, Width:20Mhz), Wireless Key(Password) and Encryption(WPA2-PSK/WPA3-SAE Mixed Mode). Leave everything else default, then Enable the SSID

I got my AP running with just above steps on a fresh openwrt image. My card is Intel AX201 but it should be similar.

.



Thank you Zan for the help again.

I have reinstalled openwrt and followed the updated steps and AP is finally working :)

I will play with for fine tuning as the speed is too low ...but atleast it is working now.

Once again THANK YOU for all the help, really appreciate it.

One more question, is it possible to configure Triband (2.4, 5 & 6 GHz) on Openwrt since AX210 is a triband adapter.

Glad to hear! Make sure to backup configs before you play around. I think the best you can come up is using 2.4Ghz band, 80Mhz width (HE80). Should be able to get 300-450Mbps rate.

QuoteOne more question, is it possible to configure Triband (2.4, 5 & 6 GHz) on Openwrt since AX210 is a triband adapter.
Triband means the radio supports three different bands, but each radio can only run one band at the time, so you need more than one radio to run multiple bands simultaneously (like in commercial APs).Our Intel cards only have one radio.
Also as I mentioned before, current Intel AX cards don't support running AP on 5Ghz, as stated in https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi (AP mode on 2.4GHz (on devices driven by iwlmvm, note no 5GHz AP support due to LAR),

Have a read at this thread https://bugzilla.kernel.org/show_bug.cgi?id=206469
TL;DR: Intel AX line are using LAR(Location Aware Regulatory), but Intel's implementation of LAR is buggy. They are supposed to scan for other 5Ghz band networks in the area to determine the regulatory, but the scanning functionality is broken, resulting Intel AX cards can't work on the 5Ghz band or above.
Older drivers used to provide a function to disable LAR but has since been removed.

If you want to get serious there are cards that support up to 6GHz AP from vendor like Mediatek and Qualcomm. There are also cards with multiple radios in Aliexpress. I haven't done much research on this so you need to do your own. Right now I only use my Intel AP for guest network so 300Mbps is fine for me. Eventually I plan to get a more powerful card to use as a DIY AP to replace my aging Ubiquiti AC-Pro. Maybe in the summer :)



Yes, I am also looking forward to replace my existing AP with DIY AP. I will check out another pcie card on Aliexpress that supports multiple radio, 2.4, 5 & 56 ghz.

On Aliexpress the sellers mention multiple frequencies for wifi adapter but do not specify multiple radio in the specification. How do we find out if the card supports multiple radio frequencies, do you know if Mediatek MT7921K support multiple radios?