Setting up USB WiFi under FreeBSD is not a very hard task.
We can use official handbook.
But in my opinion it’s too complex.
Here is a simple guide how to configure USB WiFi.
Our goal is to configure WiFi interface to connect and use available wireless network.
There was no driver for this adapter in FreeBSD-10.0-RELEASE.
Driver for this adapter appears in stable images in March.
This is good for us, so we don’t need to adding it into kernel.
During boot we can see our adapter:
If we try to up this interface we will see some warning and error messages:
urtwn-rtl8192cfwT: You need to read the LICENSE file in /usr/share/doc/legal/realtek/.
urtwn-rtl8192cfwT: If you agree with the license, set legal.realtek.license_ack=1 in /boot/loader.conf.
module_register_init: MOD_LOAD (urtwn-rtl8192cfwT_fw, 0xc2aa24f0, 0) error 1
urtwn-rtl8192cfwT: could not load firmware image, error 8
urtwn0: failed loadfirmware of file urtwn-rtl8192cfwT
We need to add this two strings to file /boot/loader.conf:
After reboot we can continue.
Next step is creating wlan interface:
ifconfig wlan0 create wlandev urtwn0
Then we can to up this wlan interface and scan available wireless networks:
ifconfig wlan0 up scan
For permanent use WiFi connection we need to add this two strings to file /etc/rc.conf:
And we need to configure authentication in file /etc/wpa_supplicant.conf
After reboot we can check network connection: