How to install USB WiFi adapter in Software Router or PVE and its guest system

  1. Software Rouer
    A software router typically runs on standard PC hardware, a mini PC, or a virtual machine. It uses specialized network operating systems such as OpenWrt, pfSense, OPNsense, iKuai or fnOS based on PVE. Normally this kind mini PC will provide 2~6 Ethernet RJ45 ports but without built-in WiFi netcard. That is why we discuss this topic here about how to install a usb Wi-Fi adapter to make Software Router get the Wireless connectivity.
  2. Plug in USB Wi-Fi Adapter and identify it on PVE
    To get the Wi-Fi adapter as listed in our website Products. Plug the USB Wi-Fi adapter into your PVE host and identify its Vendor ID and Product ID.
    -List out the usb device: lsusb
    -For Realtek chipset: apt install firmware-realtek
    -For Mediatek chipset: apt install firmware-mediatek
    Look for your Wi-Fi adapter in the output. You will see an ID format like ID 0bda:8176 Realtek Semiconductor Corp……
  3. Pass the USB Device to the Guest VM of OpenWrt …
    Instead of trying to make PVE use the Wi-Fi adapter, the best practice is to pass it directly to the guest VM so the guest OS can control it easiler. Software Router have better support to install the Wi-Fi drivers and to manage its functions.
    Using the PVE Web GUI to pass the USB device to VM directly.
    -Select your target VM in the PVE Web UI.
    -Go to the Hardware tab and click Add -> USB Device.
    -Select Use USB Vendor/Device ID and enter the IDs you noted earlier.
    -Click Add and reboot the VM.
  4. Install Wi-Fi Drivers Inside the Guest System of OpenWrt …
    Once the VM reboots, the host OS will no longer see the USB adapter; it is now exclusively controlled by the guest VM. You must install the appropriate drivers inside the guest.
    Verify the guest OS sees the adapter information
    -lsusb
    -dmesg | grep -i usb
    Once you know your chipset, you can install the drivers via the LuCI Web UI (System > Software) or via SSH using opkg.
    The drivers key word is kmod-, so to search below kmod- according to Wi-Fi chipset info.
    The basic driver: kmod-mac80211
    MediaTek (MT76 series): kmod-mt76-usb (or kmod-mt76x2u for specific models)
    Realtek (RTL8812AU/RTL88x2BU): kmod-rtl8812au-ct or kmod-rtl88x2bu
  5. Install the key software to enable Wi-Fi functions.
    wpa_supplicant and hostapd
    In OpenWrt Web UI (LuCI), go to System > Software (or Software Packages).
    Click the Update list (or Update) button at the top of the page and wait for it to finish.
    In the Filter (or search) box, type the name or keyword of the software you want to install. Click the Find (or Search) button.
  6. Set up the WiFi Network
    Reboot VM of OpenWrt and Go to the LuCI Web UI, navigate to Network > Wireless. You should now see your new wireless adapter listed as a new radio.
    Press the SCAN or EDIT button and config the Wi-Fi adater accordingly for client or master functions.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top