Wifi keeps dropping

This was working fine until I replaced my computer. I did a fresh install of FreeBSD 13.2-RELEASE but kept the same wifi cards (atheros) and second ethernet card. The new computer is an HP as was the old one. The new one is a ProDesk 600 G2 SFF. CPU is Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz.
I am having problems with the internal wifi interface. (the one that I use for external access is not currently active). Here are the details:
Code:
# ifconfig wlan0
wlan0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 7c:8b:ca:08:ae:50
        inet 192.168.225.1 netmask 0xffffff00 broadcast 192.168.225.255
        groups: wlan
        ssid Druid channel 4 (2427 MHz 11g ht/40+)
        regdomain 33608 country US indoor ecm authmode OPEN privacy OFF
        txpower 27 scanvalid 60 protmode CTS ampdulimit 64k ampdudensity 8
        shortgi -ldpc -uapsd wme burst dtimperiod 1 -dfs
        parent interface: ath0
        media: IEEE 802.11 Wireless Ethernet autoselect <hostap> (autoselect <hostap>)
        status: no carrier
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

Running dhcpd give an error: Can't listen on wlan0 - it has no IP address.
However, as can be seen above, the interface does have an IP address so the error message is a bit confusing.

This was running before I upgraded my computer and then it started randomly stopping. I could get it back with service netif restart wlan0 but now it won't work at all. I am starting to suspect that it is a hardware issue but I have two identical cards and both are behaving the same way.

Anyone have any suggestions? If it looks like hardware can someone suggest a better wifi card. Note that I need HOSTAP cards.
 
I ever had this configuration in rc.conf

dhcpcd_enable="YES"
ifconfig_wlan0="WPA"

Than dhcpcd was working. Dhcpcd support wpa_supplicant if you make a symolic link

cd /usr/local/libexec/dhcpcd-hooks/
ln -s /usr/local/share/examples/dhcpcd/hooks/10-wpa_supplicant

and you configure /usr/local/etc/dhcpcd.conf accordingly. On linux this work and I do not have to start wpa_supplicant otherwise but on FreeBSD I have not been able to make Dhcpcd work with wpa_supplicant. This is why I ask netif to start wlan0 in wpa mode and ask dhcpcd to only configure the interface after the connexion with the AP.

For a good wifi card who support 2.4Ghz and 5Ghz I use this card

01:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8812AE 802.11ac PCIe Wireless Network Adapter [10ec:8812] (rev 01)

It support the 165 channel. It have less channels disabled than an Intel and an Atheros PCIe that I have too. USB wifi are well supported by FreeBSD. Most of the wifi cards can be use as a 2.4Ghz access point but less work at 5Ghz at least at the highest channels numbers.

Note that I don't know if the RTL8812AE is now supported by FreeBSD. I have not check recently. I use the iwlwifi for an Intel card with FreeBSD as client with dhclient.
 
pciconf -lv - for knowing which wireless card you have. Maybe it needs other driver than that provide automatically by the kernel.
 
Maybe the problem is on your router. The WiFi-card in your new box has a different MAC address. Combined with a known hostname sent by your box and maybe a static IP on your box and router this might cause confusion.
  1. Delete instances of your old computer on the router;
  2. Set your router allowing new connections;
  3. Check your /etc/wpa_supplicant.conf -- see below;
  4. Try connecting your box using DHCP;
  5. See if there is a known device with your preferred static IP;
  6. Admin to preferred settings on both box and router.
/etc/wpa_supplicant.conf
Code:
network={
    ssid="<ssid name>"
    psk="<ssid password>"
    priority=100
}
 
Back
Top