[Solved] No wifi with enrcyption and freebsd 12.0 client

Hello there,

i use a WRT3200ACM with:

Powered by LuCI openwrt-18.06 branch (git-18.340.83383-3dea6b5) / OpenWrt 18.06.1 r7258-5eb055306f

I have a lot of clients working very well with it. ( IOS, Linux, TV ... ) But now i have a Computer with freebsd 12 on it. With LAN works nice, but with wifi i can not really get a connection. ( only when i disable the encryption on the router ) With other routers and encryption the freebsd client works well too. I tried all wifi settings i got :wink: but nothing worked. I only get a authentication sucessfull but no connection. ( it dosent matter dhcp or static )

any ideas for that, i tried also many setting on the freebsd side...

wireless config:

config wifi-device 'radio0'
	option type 'mac80211'
	option hwmode '11a'
	option path 'soc/soc:pcie/pci0000:00/0000:00:01.0/0000:01:00.0'
	option legacy_rates '1'
	option country 'DE'
	option channel '44'
	option htmode 'VHT80'
	option distance '20'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ssid 'hydra'
	option key '*****************'
	option encryption 'psk2+ccmp'

config wifi-device 'radio1'
	option type 'mac80211'
	option hwmode '11g'
	option path 'soc/soc:pcie/pci0000:00/0000:00:02.0/0000:02:00.0'
	option distance '20'
	option channel '7'
	option legacy_rates '1'
	option country 'DE'
	option htmode 'HT40'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option mode 'ap'   
        option ssid 'chimera'                                          
        option network 'lan'   
        option encryption 'psk2+ccmp'
        option key '********************'
                             
config wifi-device 'radio2' 
        option type 'mac80211'
        option path 'platform/soc/soc:internal-regs/f10d8000.sdhci/mmc_host/mmc0/mmc0:0001/mmc0:0001:1'
        option legacy_rates '1'
        option country 'DE' 
        option hwmode '11a'
        option channel '44'
        option htmode 'VHT80'            
        option txpower '20'

Up

Anybody that knows how to log wpa_supplicant stuff in openwrt ??

I guess some kind of log could help here! Don’t know if it’s there by default or could be enabled or need to rebuild openwrt with that option on .

Found this

And this

https://openwrt.org/docs/guide-user/network/wifi/basic

Set log_level to 0 for maximum verbosity

Give it a try and see what’s different between freebds12 client and the others

The same apply for FreeBSD side

1 Like

The freebsd client

Sat Dec 22 09:47:33 2018 daemon.info hostapd: wlan1: STA 00:1e:65:cc:64:ea IEEE 802.11: associated (aid 2)
Sat Dec 22 09:47:34 2018 daemon.notice hostapd: wlan1: AP-STA-CONNECTED 00:1e:65:cc:64:ea
Sat Dec 22 09:47:34 2018 daemon.info hostapd: wlan1: STA 00:1e:65:cc:64:ea WPA: pairwise key handshake completed (RSN)
Sat Dec 22 09:48:58 2018 daemon.info hostapd: wlan1: STA 00:1e:65:cc:64:ea IEEE 802.11: authenticated

other client

Sat Dec 22 09:33:47 2018 daemon.info hostapd: wlan0: STA 00:26:82:60:9a:8d IEEE 802.11: associated (aid 2)
Sat Dec 22 09:33:47 2018 daemon.notice hostapd: wlan0: AP-STA-CONNECTED 00:26:82:60:9a:8d
Sat Dec 22 09:33:47 2018 daemon.info hostapd: wlan0: STA 00:26:82:60:9a:8d WPA: pairwise key handshake completed (RSN)
Sat Dec 22 09:35:15 2018 daemon.info hostapd: wlan0: STA 00:26:82:60:9a:8d IEEE 802.11: authenticated
Sat Dec 22 09:40:14 2018 daemon.info dnsmasq-dhcp[4808]: DHCPREQUEST(br-lan) 192.168.1.148 c8:69:cd:27:1f:0f
Sat Dec 22 09:40:14 2018 daemon.info dnsmasq-dhcp[4808]: DHCPACK(br-lan) 192.168.1.148 c8:69:cd:27:1f:0f Apple-TV-2

Did you set IP address on FreeBSD? What the log says in using dhcp ?

i tried with static ip and dhcp, same issue. i tried another wifi dongle, same issue with that, another router works fine, the only way to get there is via lan or disable the wifi encryption.

there must be something special with freebsd and this openwrt version.... i had debian linux on that machine before.... works well

Can’t help with that I am not expert

Just trying to follow logic

Can you compare the wpa_supplicant of FreeBSD with the others ? I don’t think EAPOL version 1or 2 matters anymore ? Right ? Have you cross posted in freedbs forum ? Could help?

i tried eapol version setting also.... i did not yet asked a freebsd forum. maybe i have to.
i will try some other options in freebsd ... if i get i write it here. thank you.

Be advised that I don’t know if there is any difference in the wpa_supplicant it their config for different linux distros but sound logical to me trying to figure out if there is a way to be sure to try same configuration that works on other linux

And still trying to figure out if FreeBSD is linux or not :thinking:

1 Like

i tried just now a newer wpa_supplicant on freebsd (version 2.7) without success and some other wifi channels.

Could it be something related to FreeBSD dhcpclient request ? Have no idea about how it works ? Can you check requests hit the router or are sent by client ? You said if connected through cable it works both static and dhcp, right ?

Yes dhcp works trough lan and wireless without encryption. with encryption both, static and dhcp dosent work.

That device is known for having this type of issues with some clients. See https://github.com/kaloz/mwlwifi/issues.

1 Like

BSD (and Darwin/Apple OS) is "pure" old-school Unix.

1 Like

okay, .... i mean not oaky. but ... i dont know. with the same hardware an just another os on it, it works ...
without encryption it works in freebsd also.

FreeBSD isn't Linux-based and doesn't use GPL source (or even the GPL-licensed GCC at this point). There is no reason to expect that behavior of Linux drivers and that of BSD-licensed drivers, running on a completely different kernel will be the same. Even between FreeBSD and macOS, the kernel is significantly different and drivers are not generally compatible between the two.

The FreeBSD default DHCP client, as well as dhcpcd from ports or built from source, are both very robust.

FreeBSD doesn't focus on enabling every bit of consumer-grade hardware out there, and its support of things like audio, video, wireless, and non-standard boards and SoCs often lags far behind that of the Linux-based world. At least last I checked (a year or so ago), 802.11ac was not supported by FreeBSD in RELEASE or STABLE. It is a neither "good" or "bad", just a trade-off in priorities, one that has me using macOS and FreeBSD for many things, Debian for others, and OpenWrt for my SoC-based, 802.11 needs.

Here are some references that may help you:

https://wiki.freebsd.org/WiFi

https://wiki.freebsd.org/WiFi/80211ac

https://wiki.freebsd.org/SummerOfCode2017/Porting80211nAnd80211acToFreeBSDiwm

1 Like

Because official firmware has proprietary drivers, different to the open source drivers in OpenWrt.

1 Like

i got it work, i just disabled the wmm option on the openwrt router. :sunglasses:

WMM is required for 802.11n, by disabling it you restrict yourself to 54 MBit/s.