On 7/6/21 8:36 AM, Alberto Bursi wrote:
On 06/07/21 09:12, Enrico Mioso wrote:
On Mon, 5 Jul 2021, Paul Spooren wrote:
Date: Tue, 6 Jul 2021 09:06:14
From: Paul Spooren <m...@aparcar.org>
To: Enrico Mioso <mrkiko...@gmail.com>, openwrt-devel@lists.openwrt.org
Subject: Re: Enabling Wi-Fi on First boot
On 7/5/21 8:45 PM, Enrico Mioso wrote:
Hello all!!
I would like to know your opinion on a topic I know has already been
discussed: enabling Wi-Fi on first boot.
I would very very much like to see this feature present in OpenWRt:
because I find myself in a scenario where plugging an Ethernet cable
after a fresh sysupgrade without keeping settings (due a a major
upgrade or just to "start clean") could be impractical.
I think you can add uci-default scripts to enable it or do you want a
config option during build time?
Hello Paul!!
Well, I tought about uci-defaults, but I tough it won't be so easy to
implement due to the fact Wi-Fi is probed asynchronously, and on some
devices i saw it takes a little bit (Netgear R7800).
I would have liked to have something already implemented in OpenWRt,
so it could be looked at by more people and have much higher chances
of working on all devices.
Enrico
The only thing that must be done by a uci-defaults script is to set the
wifi as enabled in the uci config.
Afaik all devices ship with a default config for an open wifi network
called "OpenWrt" for all their radios, but have
option disabled '1'
in both the device and wifi-iface text blocks, which disables the wifi.
The uci-defaults script should just delete that line recursively along
the whole /etc/config/wifi config file and it can be done with sed.
Since uci-defaults scripts are run before everything else, the device
should just have all wifi enabled on first boot no matter what wifi
hardware it actually uses.
You can easily turn this in a package (that only installs a uci-defaults
script), just look at any other package that sets a uci-default script
like this
https://github.com/openwrt/packages/blob/master/net/bcp38/Makefile
and use it as a template for your own.
Since there are strong opinions are about keeping wifi off by default
(last time I checked even devices that have no other network interfaces
can't have a wifi enabled on first boot, forcing users to do a first
config through the debug UART console or integrate a custom wifi config
file in a custom image) I do not think many core developers will want to
merge this package in core repository, but you can try.
I think there should not be much problems if you send your package to
community packages repository.
https://github.com/openwrt/packages
-Alberto
Most modern devices have default SSID and password in ROM somewhere that
stock OpenWrt doesn't touch. It is written on the radio regulatory
compliance sticker. That would seem convenient for the user OEM or
OpenWrt. IF OpenWrt knows where to find it, and IF it is found on on
first boot, then enable WiFi at first boot. This is especially important
on WiFi only devices and as more "slim format" user devices (tablets,
phones, ...) are exclusive in homes and have no ethernet. A system
reflash or reset with stock OpenWrt is not an option for these users.
For example, it should not be trouble to find it on TL 3600/4300/Archer
and WRT 1900/3200.
- Eric
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel