luci icon indicating copy to clipboard operation
luci copied to clipboard

Feature request: Make Country Code a more important (or even mandatory) setting in LuCI

Open openwrtler opened this issue 1 year ago • 3 comments

What would you like to see in luci?

Based on discussion [LuCI; Wi-Fi] Move Country Code from “Advanced Settings” to “General Setup”

Main points:

  • Place 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, as it probably is the same amongst all declared Wi-Fi networks for most users.
  • 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. Status quo seems to be not restrictive enough.
  • Some kind of first-time setup wizard including Country Code configuration would also be great, but probably more work to implement.

Depending on which features are implemented, changes of OpenWrt quick start guide for Wi-Fi to include a more understandable country code hint might lower barrier for router setups of new users.

openwrtler avatar Oct 26 '24 08:10 openwrtler

Sooo. Opinion time.

I don't think that users should be limited - ever - in choices which won't degrade performance, at least. The whole point of openwrt is... "wireless freedom". The last thing the majority wants is mandates and restrictions again. The whole point of running openwrt is to avoid those, and free up your device to run a whole ecosystem. That said, users exercise their own judgement in their own domain what should be permissible.

What problem will mandating CC solve? Is this connected to some mongo hardware still going "you can't run 2.4GHz channel 14 unless you have JAPAN set." or so? Some users want it, some don't.

Placement is discussable. I don't mind moving it - that's trivial, although muscle memory for some people will be cause for them to keep looking for CC in advanced :D

The wizard thing @stokito has a draught of I think.

systemcrash avatar Oct 26 '24 13:10 systemcrash

If it is not mandatory in the underlying wifi driver, we should not make it mandatory in LuCI GUI.

But sure, it could be more prominently on the wifi config page front tab, as most/all users should set it.

hnyman avatar Oct 26 '24 14:10 hnyman

The OpenWrt is also used as a base for some commercial firmwares so legal compliance is important

stokito avatar Oct 26 '24 14:10 stokito

IMO disregarding the other points for now (those are more opinion-based regarding restrictions/usability in the UI) we should probably move the country code to general instead of advanced settings. In addition to the quick start linked above, the guide to Enabling a Wi-Fi access point on OpenWrt also advises users to set the country code. And not to mention that many users posting on the forums having issues with their WiFi are advised to check if the country code is set; such a basic setting to get a working AP should then not be in advanced settings.

dannil avatar Oct 27 '24 19:10 dannil

So is an acceptable solution move of CC from advanced tab to general?

systemcrash avatar Oct 28 '24 00:10 systemcrash

Sounds good to me.

hnyman avatar Oct 28 '24 03:10 hnyman

Thanks for picking this up. I think it is a good first step usability-wise to move Country Code to General.

There is one pain point I'd still like to address (see also OP discussion post): When creating a new Wi-Fi network via Network -> Wireless -> radioX -> Add without Country Code, network simply might not work for certain Wi-Fi channels and only show as Disabled in Wireless Overview of LuCI. Not sure, how underlying rules determine, if a channel is unsupported given no Country Code - all I can say is that Wi-Fi refused to work with 5GHz channels > 100. It worked with Channels < 100 and with auto-channel (which selected < 100). I found the hint Disabled to be a major source of confusion when debugging, up to point of wanting to return the router due to suspected radio controller defect.

Hence: What about adding an additional description to the network status in this case? Like:

Disabled (unsupported or insufficient Country Code configuration)

@systemcrash Can you reopen this issue or does it make sense to open a separate one?

openwrtler avatar Oct 30 '24 07:10 openwrtler

State is state, no matter how you get there. Unless the underlying iwinfo or whichever daemon provides a specific return code, disabled means disabled. It doesn’t care whether you’re rich or poor…

maybe you have a suggestion for some helpful text to accompany the setting? A call to action if you will.

systemcrash avatar Oct 30 '24 10:10 systemcrash

Unless the underlying iwinfo or whichever daemon provides a specific return code, disabled means disabled.

I see. Are errors/return codes device-specific? In other words: Doesn't OpenWrt standardize common return codes/errors - in particular OP error, where a declared Wi-Fi network cannot be enabled due to channel restrictions in case of unconfigured Country Code? I indeed have hoped, this error can get caught separately.

maybe you have a suggestion for some helpful text to accompany the setting?

Not sure what you are meaning here. I suggested

"Disabled (unsupported or insufficient Country Code configuration)"

text addition in previous post. Handling also depends on OpenWrt capabilities to distinguish Wi-Fi related errors. If we cannot address individual errors, my suggestion would be to add an info box/icon besides Wi-Fi status, which provides additional troubleshooting hints and which can be expanded to on hover/click (otherwise there probably is too much text going on in UI).

A more general hint might be:

Note: "Disabled" Wi-Fi network status can also be caused by an inproperly (or not at all) configured Country Code setting. Please set or change Country Code under "General" tab and retry enabling this Wi-Fi network.

openwrtler avatar Oct 31 '24 07:10 openwrtler