Closed ghostbuster91 closed 1 year ago
btw @lorenz on bananaPi forum said that it had wifi working: https://forum.banana-pi.org/t/nixos-on-banana-pi-bpi-r3/15472/40?u=ghostbuster91
Have you managed to get the wifi working?
It does work.
iwconfig
You'll want to replace that with the iw
command. iwconfig
only supports the "WEXT" protocol, while iw
supports the WEXT replacement, nl80211.
Details on WEXT abandonment
I didn't configure the kernel with CONFIG_CFG80211_WEXT, which is a compatibility shim, so that's why iwconfig doesn't provide any output whatsoever.
Enable this option if you need old userspace for wireless extensions with cfg80211-based drivers.
Run iw phy
to see details about the interfaces.
services.hostapd
I get the feeling nobody's using that in any serious use-case, the configuration of a 5GHz AP is much more complicated than it allows for, and the configuration it produces might violate local laws.
It also provides no method to set reduced power constraints on the interfaces, which would be necessary for a proper configuration.
The generated hostapd file looks as follows:
lib.generators.toKeyValue
would be very useful for generating a config file in a key-value format such as that.
1 errors found in configuration file
ieee80211ac=1
is only supported in the 5GHz operation mode, so that's probably the cause of the error.
I also tried using different drivers
nl80211 is the correct driver for userspace to configure the mt76 devices.
mt7986a-bananapi-bpi-r3-wirless.dts#L11 So is there anything that we can do about it?
That comment is stating why that devicetree overlay exists and is required. Upstream doesn't want to include a blob of binary into the device tree
Ouch! This looks like firmware unrolled in a devicetree property - that can't be right. ref
The driver maintainers don't want to enable it to be loadable from a file for valid reasons either.
Most devices would embed this into the devices flash storage and load it from there, but it doesn't exist there.
You'll want to replace that with the iw command. iwconfig only supports the "WEXT" protocol, while iw supports the WEXT replacement, nl80211.
Details on WEXT abandonment
Once again, thank you very much for including these additional details, it helps a lot!
ieee80211ac=1
is only supported in the 5GHz operation mode, so that's probably the cause of the error.
The problem was that this parameter was hardcoded in the hostapd config - https://github.com/NixOS/nixpkgs/blob/nixos-23.05/nixos/modules/services/networking/hostapd.nix#L24 so it wasne't easily changeable.
I get the feeling nobody's using that in any serious use-case, the configuration of a 5GHz AP is much more complicated than it allows for, and the configuration it produces might violate local laws.
I reached out to folks from nixos-networking matrix and they recommended me to checkout hostapd module from this PR: https://github.com/NixOS/nixpkgs/pull/222536
Using that PR solved all problems regarding wifi. Here is my current network configuration using networkd and hostapd if you would like to take a look: https://github.com/ghostbuster91/nixos-bpir3-example/blob/main/nixos/network.nix#L98
That comment is stating why that devicetree overlay exists and is required. Upstream doesn't want to include a blob of binary into the device tree
Ouch! This looks like firmware unrolled in a devicetree property - that can't be right. ref
The driver maintainers don't want to enable it to be loadable from a file for valid reasons either.
Most devices would embed this into the devices flash storage and load it from there, but it doesn't exist there.
Ok, now it all makes sense, thanks!
Hi,
Have you managed to get the wifi working?
I tried first with wpa_supplicant, but the
iwconfig
was showing:Here is a relevant section of my configuration for supplicant:
Then I learned that for bridging wlan interfaces with eth I will need to use hostapd anyway. I tried to get it running using following configuration:
but it always fail with not very verbose error:
The generated hostapd file looks as follows:
I also tried using different drivers -
mt76
but it always claims thatlshw reports that the driver is:
driver=mt7986-wmac
but switching to it doesn't change anythinglsmod reports that module mt76 was loaded correctly:
Last but not least I found this comment: https://github.com/nakato/nixos-bpir3-example/blob/main/bpir3-dts/mt7986a-bananapi-bpi-r3-wirless.dts#L11
So is there anything that we can do about it?