So in this Thread 56861, I said I "solved" my issue. But I was only partially correct. My question is how to get my Wifi adapter to connect upon boot or reboot automatically with working internet.
So the USB Wifi adapter DOES work 100% but only if FreeBSD correctly sets up wlan0 and connects to my router.
So far:
Added to /boot/loader.conf
Added to /etc/rc.conf
Added to /etc/wpa_supplicant.conf (with my psk and ssid information of course)
But if I leave my USB Wifi adapter in the USB port, wlan0 does get created but only with 0.0.0.0 as IP address (upon boot or reboot) and status does say associated regardless.
The only known repeatable way to get my Wifi Adapter working is by issuing these commands:
Sometimes the up scan hangs so I kill it with ctrl-c in the terminal.
On rare occasion if that doesn't work, I have to do those steps with
It's almost different every time but those commands seems to be what gets it working.
The problem might also be in my router itself. Since I had these problems, I tried forcing my router to assign 10.0.0.50 based on the MAC address of my Wifi adapter. I changed my mind, deleted that entry in the router and applied settings. I also power cycled the router, but apparently, I broke it so my router, when FreeBSD gets it working, still issues 10.0.0.50 and that's how I'm connecting to the internet lol.
All I can think of is that this is an issue with PF, my router, or my Wifi Adapter, or how FreeBSD creates and tries to associate with a network or all of the above. Any experts or network engineers want to shed some insight?
Also my /etc/rc.conf
/etc/pf.conf
As a side note, I do have a PCI DWA-552 card that BSD Installs works and sets up. Using the same firewall rules, I can reboot no problem with it and it connects automatically.
So the USB Wifi adapter DOES work 100% but only if FreeBSD correctly sets up wlan0 and connects to my router.
So far:
Added to /boot/loader.conf
Code:
if_rsu_load="YES"
legal.realtek.license_ack=1
rsu-rtl8712fw_load="YES"
Added to /etc/rc.conf
Code:
wlans_rsu0="wlan0"
ifconfig_wlan0="WPA DHCP"
Added to /etc/wpa_supplicant.conf (with my psk and ssid information of course)
Code:
network={
ssid="myssid"
psk="mypsk"
}
But if I leave my USB Wifi adapter in the USB port, wlan0 does get created but only with 0.0.0.0 as IP address (upon boot or reboot) and status does say associated regardless.
The only known repeatable way to get my Wifi Adapter working is by issuing these commands:
ifconfig ifconfig wlan0 destroy ifconfig wlan0 create wlandev rsu0 ifconfig wlan0 up ifconfig wlan0 up scan ifconfig wlan0 up scan ifconfig wlan0 up scanSometimes the up scan hangs so I kill it with ctrl-c in the terminal.
On rare occasion if that doesn't work, I have to do those steps with
pfctl -d first then after the last command, pfctl -e. Sometimes unplugging the Wifi adapter on reboot then after FreeBSD loads, plugging it back in, and following those steps works too.It's almost different every time but those commands seems to be what gets it working.
The problem might also be in my router itself. Since I had these problems, I tried forcing my router to assign 10.0.0.50 based on the MAC address of my Wifi adapter. I changed my mind, deleted that entry in the router and applied settings. I also power cycled the router, but apparently, I broke it so my router, when FreeBSD gets it working, still issues 10.0.0.50 and that's how I'm connecting to the internet lol.
All I can think of is that this is an issue with PF, my router, or my Wifi Adapter, or how FreeBSD creates and tries to associate with a network or all of the above. Any experts or network engineers want to shed some insight?
Also my /etc/rc.conf
Code:
pf_enable="YES"
pf_flags=""
pflog_enable="YES"
pflog_logfile="/var/log/pflog"
pflog_flags=""
/etc/pf.conf
Code:
set skip on lo0
scrub in all
block in all
pass out all keep state
As a side note, I do have a PCI DWA-552 card that BSD Installs works and sets up. Using the same firewall rules, I can reboot no problem with it and it connects automatically.