[LuCI; Wi-Fi] Move Country Code from "Advanced Settings" to "General Setup"

I suggest to move Country Code setting in LuCI web interface
(Network -> Wireless -> radioX "Add" or SSID-X "Edit")
from Advanced Settings to General Setup, as it is mandatory for channel availability.

Background from someone that hasn't configured OpenWrt routers for years:
After 2.4 and 5Ghz Wi-Fi setup, I wondered why my access point still displayed 5GHz network as "disabled" for most channels and wasn't able to connect.

Till I found Advanced Settings and switched Country Code accordingly (initial value was driver default), my conclusion was, the router's 5GHz band must have been damaged, so I already thought about sending it back.

The Quick Start guide does not suggest to change this setting either in the Wi-Fi section.

Enhancement: Maybe even define a global Country Code setting amongst all radios for simplicity?

This change might help other newcomers as well. What do you think?

4 Likes

My main thought is radios disabled and either force user to pick a location and/or have the defaults be the most restrictive regulatory DB so you don't transmit when you're not meant to transmit. LuCI banner? Screwing that up is most likely a federal offence everywhere.

First thing I do on all AP's all the time is change country code because I'm not in US.
But that's only a problem really because I factory reset my AP's a lot and run SMB sized deployments.

But once I knew how to do custom images (with image builder locally, or with firmware selector) i.e. uci defaults, most of the problem went away.

Perhaps more knobs on firmware selector? I have no idea what the right solution is other than let users know that they should change their location.

I guess it's a blind spot once you know you need to configure it and where it is in openwrt, or you just keep porting your config through version updates.

edit: my next thought was some sort of location detection package for people who don't know how to set it but that's fraught with danger =P

In most cases this default country code is called "World" - with a code of 00.

2 Likes

That would be a good start :slight_smile: . Maybe a paragraph about country code in the quick start for Wi-Fi?

But then I have an issue with the wording "Advanced Settings", as it suggests an optional setting for more technical users. But Country Code seems to be mandatory for proper channel choice.

Another low hanging fruit would be to disable all channels in LuCI, that cannot be selected due to Country Code. I was able to select every channel, and afterwards just got a "disabled" interface in web interface without connectivity. This is no good user experience for newcomers in my opinion.

Btw: my firmware is 23.05.5.

Interesting. For me it was "driver default", not sure if that makes a difference.

2 Likes

Awesome thanks!

Did you set the regulatory location first? I think that happens if you're in one regulatory domain and then change it in the drop down but it isn't actually set yet?

Which in some cases is World.

Yeah IDK there. On some of the AP's the factory firmware asks for your location. But in others it defaults to worldwide but it's plastered everywhere in documentation to set your radio location.

Most people don't care about channels? "they want a just works." But then yeah idk. Default channels works for most people most of the time so it doesn't need to be changed? You want a sane default channel selection so most clients will talk to most AP's? so subset of channels is good?

?? Close enough ?? =P

Not sure, why docs write "regulatory location" - it is called "Country Code" in the LuCI web UI (and I think both are the same). I just followed the https://openwrt.org/docs/guide-quick-start/walkthrough_login guide and there was not prompt for region during setup.

Yeah. It probably works, until you live in crowded locations, have interference / need for 2.4GHz, optimize performance or just do some basic checks for the new router.

Hmm, there is a bit room for improvement :slight_smile: . Newcomers probably just overlook "regulatory location" (me included). UI should also reflect current choice of country in the available channels. And I am wondering if "Defaults should be OK" is really OK enough without country code.

If you don't have a technical expertise to implement this and create a PR, I'd recommend you create an issue in openwrt/luci repository and tag systemcrash and dannil for help.

2 Likes

Since it's mandatory to specify a country code (and user's who ask for help here on the forum with wireless issues are often asked to verify that they indeed have it set) I personally agree it should probably not be located under advanced settings.

1 Like

Docs write regulatory location because that's what pops into my head whenever I'm talking about this. You make a good point and I guess I can change it. Thanks for the feedback.

Yeah IDK about a prompt for location. Is this going into the realm of have a setup wizard? =P

IMO if defaults aren't OK something is wrong and we have a default where we're transmitting where we shouldn't. But I don't like being absolute with these things. There's always the possibility for things to go wrong.

Another note I guess is about importing foreign equipment not certified for your location, or worldwide equipment which was designed to expect you to enter your location first per the documentation. (i.e. professional level equipment for installers, i..e. MSM466, A recent example I had where the default regulatory location is US for the worldwide model....). Another example was my friend had his Wifi 6E stuff from US blocked by customs because we have the smaller 6ghz wifi spectrum here.

I don't want to include/write a tutorial on EIRP, regulatory stuff and where to find your government's RF docs and how to read them =P

1 Like

Thanks for the hint @stangri ! Dumb question: Isn't the OpenWrt GitHub issues section for bugs and this forum for feature discussions? Don't the developers look here as well? If GitHub is the more appropriate place - unfortunately no technical expertise to code it yet - I'll post it there as well.

Thank you for helping.

That would be another great idea and extension to my request!

Yeah, I understand. But I think it is not needed either. To summarize this request:

  • a more understandable country code hint in the OpenWrt getting started guide

  • Country code setting placement in main section instead of advanced section within LuCI, as country code seems mandatory for proper Wi-Fi functioning.

  • Optionally make country code a global setting (not per Wi-Fi network).

  • Another idea is to make country code a required field in LuCI. If not set, display a warning for the user within LuCI.

  • Current choice of Country code (no matter if "default driver", "World" or specific country or other default value) should be reflected in LuCI. In other words: I should not be able to select Wi-Fi channels (2.4/5 Ghz), that don't fit country code.

  • Some kind of first-time setup wizard including Country Code configuration would also be great, but probably more work to implement.

4 Likes

You're absolutely free to post feature suggestions in LuCI issues, there's already a few open issues which are explicitly feature suggestions where discussions has taken place so you can look at those for examples. Some developers are active on the forum (like me) but not all, the engagement varies a lot simply due to the fact that it's an open source project.

4 Likes

Good start would be to not call every other config pane "advanced settings"

Feature request can found here: https://github.com/openwrt/luci/issues/7356.
Sorry for the delay.

3 Likes

I do till think keeps the setting separate for testing is a must
but I do think if a compromise can be reached
like, the default Wi-Fi option for each band could be "Current System Region"
but still in the advance menu you could change it
from "Current System Region" setting to "other" maybe rename it as region override

What does this mean?

It's what windows calls it, I think
but it's the setting or where you are for Wi-Fi region and timezone etc

I think the best way I have seen it done
is via a setup wizard at first login
it asks a geo location server to look up its return IP
give you that option and asks you to confirm or change at
1st login with the admin password and other settings

another banner with the admin password one would work until set

1 Like