HowTo: Set Up Edimax EW-7811UN USB WiFi Dongle on GhostBSD
Supported Versions
- GhostBSD 24.10.1 and later
- FreeBSD 14
Required Drivers
Kernel Modules
For USB-based Realtek RTL8188CUS (Edimax EW-7811UN): kldload if_rtwn if_rtwn_usb
Check if loaded: kldstat | grep rtwn
Step 1: Configuration Files
/boot/loader.conf
Add:
if_rtwn_load="YES"
if_rtwn_usb_load="YES"
legal.realtek.license_ack=1
/etc/rc.conf
For WPA-encrypted networks:
wlans_rtwn0="wlan0"
ifconfig_wlan0="WPA DHCP"
For Open (unencrypted) networks:
wlans_rtwn0="wlan0"
ifconfig_wlan0="DHCP"
/etc/wpa_supplicant.conf
WPA2-encrypted:
network={
ssid="YourNetworkSSID"
psk="yourpassphrase"
}
Open (unencrypted):
network={
ssid="YourNetworkSSID"
key_mgmt=NONE
}
Step 2: Manual Connection Steps
- Open a terminal and become root:
su
- Create the wireless interface:
ifconfig wlan0 create wlandev rtwn0
- Bring interface up and scan:
ifconfig wlan0 up scan
- Optionally, associate manually (use root or
sudo
): ifconfig wlan0 ssid "YourNetworkSSID" channel 6
- Start
wpa_supplicant
: wpa_supplicant -i wlan0 -B -c /etc/wpa_supplicant.conf
- Get IP via DHCP:
dhclient wlan0
Step 3: Testing
Check IP Address
ifconfig wlan0
Ping Test
ping -c 3 he.net
Sample Output (successful connection):
inet 192.168.0.2 netmask 0xffffff00 broadcast 192.168.0.255
status: associated
ssid "T-Mobile BlackBerry 9770" channel 6
Troubleshooting Tips
SIOCS80211: Operation not permitted
: Use sudo
or run as root.
"WPA DHCP"
does not work on open networks — remove WPA
if no encryption.
- Weak signals may fail DHCP negotiation. Try changing channels.
NetworkMgr GUI
- GhostBSD includes NetworkMgr, a Python GUI frontend that:
- Edits
/boot/loader.conf
, /etc/rc.conf
, and /etc/wpa_supplicant.conf
- Automatically manages
wpa_supplicant
and dhclient
More info:
Additional Resources
Notes
- If you rely on NetworkMgr, manual configuration is not necessary.
- Use
killall dhclient
before switching networks.
- Ensure you reboot or
service netif restart
after config changes.