I've tested this in a VirtualBox VM with a USB wifi adapter I use on the host system. The adapter is recognized, the firmware loaded, but it does not associate with the access point, but only when WPA/WPA2 authentication is enabled.I plugged adapter with USB Virtualbox USB
Without authentication, a "open" configured access point associates with no problems. I wasn't able to determine the cause, perhaps others can use this to track the issue, I'm out of ideas.
The VM configuration: Settings -> USB -> Add USB filter <wifi adapter name>. Or insert the adapter in running system: VM window Statusbar, USB icon right click, wifi adapter.
"wlan0" is created but ifconfig(8) interface status shows "no carrier". A manually configured wlan0 (IP, ssid, interface up) has no effect, the interface still has "no carrier".
/etc/wpa_supplicant.conf in VM is configured as the same as on the host system.
It make no difference when the VMs network adapter is configured "Attached to: Bridged Adapter" "Name: wlan0".
Somthing else I noticed: when trying to configure the wifi adapter by bsdconfig(8) (bsdconfig -> Network Management -> Wireless Networks ), this error message pop's up:
