Code Monkey home page Code Monkey logo

Comments (3)

ghostbuster91 avatar ghostbuster91 commented on July 17, 2024

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

from nixos-bpir3-example.

nakato avatar nakato commented on July 17, 2024

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.

from nixos-bpir3-example.

ghostbuster91 avatar ghostbuster91 commented on July 17, 2024

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: NixOS/nixpkgs#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!

from nixos-bpir3-example.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.