/sys/class/ieee80211: No such file

Openwrt 21.02.0 ramips

I'm at a loss here. I've read many posts and searched for answers but nothing works.
I think the first problem I need to solve is the missing file but that's not working so far.
I do have kmod-mac80211 installed which i thought would solve the first problem.

When I first ran 'wifi up', I got this.
radio0(mac80211): Interface type not supported

Sat Nov 12 02:12:36 2022 daemon.notice netifd: radio0 (3729): ls: /sys/class/ieee80211: No such file or directory
Sat Nov 12 02:12:36 2022 daemon.notice netifd: radio0 (3729): Could not find PHY for device 'radio0'
Sat Nov 12 02:12:36 2022 daemon.notice netifd: Wireless device 'radio0' set retry=0
Sat Nov 12 02:12:36 2022 daemon.crit netifd: Wireless device 'radio0' setup failed, retry=0
Sat Nov 12 02:12:36 2022 daemon.notice netifd: radio0 (3737): WARNING: Variable 'data' does not exist or is not an array/object
Sat Nov 12 02:12:36 2022 daemon.notice netifd: radio0 (3737): Bug: PHY is undefined for device 'radio0'
Sat Nov 12 02:12:36 2022 daemon.notice netifd: Wireless device 'radio0' is now down

In network, I have

config interface 'wwan'
        option proto 'dhcp'
        option metric '10'

And in wireless I have

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '11'
        option hwmode '11g'
        option path 'platform/10300000.wmac'
        option htmode 'HT20'
        option disabled '0'

config wifi-iface
        option device 'radio0'
        option network 'wwan'
        option mode 'sta'
        option ssid 'xx'
        option encryption 'psk2'
        option key 'xx'

The above works perfectly well in the same hardware running 18.06.2 which I was upgrading from.
I don't need to have the very latest for my needs, these are just being used internally as clients and I just happened to have 21.02 handy.

Is this a custom firmware?

If so, have you tried using a firmware from the downloads site?

Yes, custom firmware using image builder. It works fine with pre-built openwrt firmware, that's how I converted it.
However, my question is about the missing file which seems to be the first problem and might solve the rest.

It exists on the os but not in the path that should be in the wireless config.
Is there a link missing or something? And if that's the case, shouldn't the package installer take care of that?

$ find / -name ieee80211
/etc/hotplug.d/ieee80211
/rom/etc/hotplug.d/ieee80211

Converted what?

And telling us more about this custom firmware might help us solve everything.

Isn't there setting you make in order to build?

Can you show those.

I thought you built a custom image - please, could you provide more details?

Converting meaning I converted from a default openwrt build to my own.

And telling us more about this custom firmware might help us solve everything.
Isn't there setting you make in order to build?

I'm not sure what to add really. It's not custom in the sense of lots of mods or anything, just custom in that I wanted to build my own with camera, wifi and mqtt so I can quickly re-flash it when I make a mess.

I used the config files above from another identical device that works fine under openwrt 18.

Happy to provide more info but what would help?

To be sure, I checked the packages between the versions. The only difference is that kmod-mac80211 and wpad-openssl are installed on the new device and not on the old.

This is your problem. The config files from OpenWrt 180.06 are not compatible with 22.03.

You need to use config files that you generate from scratch under 22.03. Flash a default build, then configure it the way you want. Once it is configured in a known good state, you can make a backup and then 'bake' those settings into your custom image.

1 Like

That makes sense though I wasn't able to find what the differences are.
I can't use a default build as it comes up with 192.168.1.1 which immediately breaks my LAN.
I need to at least set the default IP to something else so need to use a custom file.

Thanks for your help, at least now I know what is happening.

Can you take your device offline (or do you have a spare unit) to be able to run the standard upgrade, configure as desired, and then plug back into your network and take a backup? It seems to me that this should be possible since you've been upgrading, so taking it offline (i.e. only a single computer plugged in for config purposes, nothing else) should be trivial. A few minutes of configuration and you should be good to go.

Yes, I have a laptop I use for that purpose. Was just mentioning the default IP problem that I'm sure many go through. Wonder why they have never changed that to something like 192.168.1.244.233 or some other very random number.

Ease of support and consistency with historical versions... it is a very big deal to change the default behavior because of the amount of confusion it can cause.

A while back, I posted this RFC to address the situation where people cascade routers and find that the lan behind the OpenWrt router doesn't work properly because of a subnet overlap.

I have to fully agree with you about causing confusion and keeping things as they are.

So, I flashed a default build found in the downloads
(https://downloads.openwrt.org/releases/21.02.3/targets/ramips/mt76x8/openwrt-21.02.3-ramips-mt76x8-glinet_gl-mt300n-v2-squashfs-sysupgrade.bin).

Once running, I copied the files from that version and updated my config network and wireless.

Still no go and in fact, exactly the same in the log. I must be overlooking something so small that I cannot see it or messing up my files.

Here is what's showing in the log.

Sun Nov 13 15:44:58 2022 daemon.notice netifd: radio0 (3878): ls: /sys/class/ieee80211: No such file or directory
Sun Nov 13 15:44:58 2022 daemon.notice netifd: radio0 (3878): Could not find PHY for device 'radio0'
Sun Nov 13 15:44:58 2022 daemon.notice netifd: Wireless device 'radio0' set retry=0
Sun Nov 13 15:44:58 2022 daemon.crit netifd: Wireless device 'radio0' setup failed, retry=0
Sun Nov 13 15:44:59 2022 daemon.notice netifd: radio0 (3888): WARNING: Variable 'data' does not exist or is not an array/object
Sun Nov 13 15:44:59 2022 daemon.notice netifd: radio0 (3888): Bug: PHY is undefined for device 'radio0'
Sun Nov 13 15:44:59 2022 daemon.notice netifd: Wireless device 'radio0' is now down

Here are my newly updated config files.

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fddb:f606:8215::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0.1'

config interface 'lan'
        option device 'br-lan'
        option proto 'dhcp'
        option ip6assign '60'

config interface 'wan' (changed to dhcp)
        option device 'eth0.2'
        option proto 'dhcp'

config interface 'wan6'
        option device 'eth0.2'
        option proto 'dhcpv6'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '1 6t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '0 6t'

config interface 'wwan'
        option proto 'dhcp'
        option metric '10'

Wireless;
config wifi-device 'radio0'
        option type 'mac80211'
        option path 'platform/10300000.wmac'
        option channel '1'
        option band '2g'
        option htmode 'HT20'
        option disabled '0'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'sta'
        option ssid 'xxx'
        option encryption 'psk2'
        option key 'xxx' (this is the only line added)

What is your goal? You have the device attempting to run in sta (client) mode. Typically, you’d run this in AP mode unless you are trying to setup a wireless uplink.

I use these as quick temporary cameras here and there.

I just want this device to be a LAN client running jmpeg-streamer.
I need to be able to switch between wired and wireless depending on where the device/camera will be installed as I move them around.

Wired is trivially easy. Wireless uplinks are not (if you want to keep them on the same L2 network).

Start with wired + AP mode to make sure the device is working.

My setup works perfectly on 18 though, that's what is making this confusing to me.
The LAN and AP are on separate networks behind a firewall.

I started in AP mode, that's how I accessed it so I know it's working.
When running 18, I can switch between wired and wireless without any errors or problems.

I also know the hardware is fine since when I go back to 18, it works as it used to.

If you want to make the wifi perform as an uplink, you need to also bind it to the wwan interface (currently it is set on the lan interface). And in order for it to connect in sta mode, you must have the correct SSID and password (and encryption type) setup.... if anything is wrong and it cannot connect (including the SSID not being reachable), the radio will not be able to come up at all.

Try installing travelmate -- this may help your situation:

The thing is, it works perfectly with the config shown in my original post when running 18.
Yes, I have ssid, pass etc configured. I just have it edited in my post :).

I do have wwan configured
config interface 'wwan'
option proto 'dhcp'
option metric '10'

Also, I don't have any GUI on these, all command line only.

yes, but you were trying to attach the radio to the lan:

Travelmate may work properly without needing LuCI -- I have never tried this, but the web interface is really just a front-end to linux CLI calls.

Also, if you are running in sta mode, the channel needs to match the upstream network (i.e. the SSID to which it is trying to connect), or ideally in auto mode. If this is wrong, the radio will not come up at all.