Message ID | 20220705073206.1442280-2-angelo@amarulasolutions.com |
---|---|
State | Superseded |
Headers | show |
Series | Configure default wifi through kconfig | expand |
>>>>> "Angelo" == Angelo Compagnucci <angelo@amarulasolutions.com> writes: > These options can be used by packages to configure a wifi card > to connect at boot. > Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com> > --- > system/Config.in | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > diff --git a/system/Config.in b/system/Config.in > index 888c24ce81..9a5bdb2932 100644 > --- a/system/Config.in > +++ b/system/Config.in > @@ -418,6 +418,21 @@ comment "automatic network configuration via DHCP needs ifupdown or busybox or n > depends on !(BR2_PACKAGE_BUSYBOX || BR2_PACKAGE_IFUPDOWN || \ > BR2_PACKAGE_SYSTEMD_NETWORKD || BR2_PACKAGE_NETIFRC) > +config BR2_SYSTEM_CONNECT_WIFI > + bool "Connect to a default wifi access point" > + default n 'n' is default, so drop that. This doesn't really do anything unless the user also configures BR2_SYSTEM_DHCP="wlan0", right? I must say I am not really convinced. This is only useful for quite specific setups (E.G. a lot more specific than BR2_SYSTEM_DHCP which we use in a number of defconfigs) and hard codes a number of things (like WPA-PSK that may or may not make sense in the future).
On Sun, Sep 18, 2022 at 11:57 AM Peter Korsgaard <peter@korsgaard.com> wrote: > >>>>> "Angelo" == Angelo Compagnucci <angelo@amarulasolutions.com> writes: > > > These options can be used by packages to configure a wifi card > > to connect at boot. > > > Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com> > > --- > > system/Config.in | 15 +++++++++++++++ > > 1 file changed, 15 insertions(+) > > > diff --git a/system/Config.in b/system/Config.in > > index 888c24ce81..9a5bdb2932 100644 > > --- a/system/Config.in > > +++ b/system/Config.in > > @@ -418,6 +418,21 @@ comment "automatic network configuration via DHCP > needs ifupdown or busybox or n > > depends on !(BR2_PACKAGE_BUSYBOX || BR2_PACKAGE_IFUPDOWN || \ > > BR2_PACKAGE_SYSTEMD_NETWORKD || BR2_PACKAGE_NETIFRC) > > > +config BR2_SYSTEM_CONNECT_WIFI > > + bool "Connect to a default wifi access point" > > + default n > > 'n' is default, so drop that. Right. > This doesn't really do anything unless the > user also configures BR2_SYSTEM_DHCP="wlan0", right? > Right. > > I must say I am not really convinced. This is only useful for quite > specific setups (E.G. a lot more specific than BR2_SYSTEM_DHCP which we > use in a number of defconfigs) and hard codes a number of things (like > WPA-PSK that may or may not make sense in the future). > This is what we have now on several readme.txt on how to connect to a wifi WiFi ==== # wpa_passphrase ACCESSPOINTNAME >> /etc/wpa_supplicant.conf (type password and enter) # wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B # udhcpc -i wlan0 I don't think this is nice. I'd like to see something like that: WiFi ==== # Enable BR2_SYSTEM_CONNECT_WIFI configure option # Set the Wifi SSID with the option BR2_SYSTEM_CONNECT_WIFI_SSID # Set the password with the option BR2_SYSTEM_CONNECT_WIFI_PASSWORD Nicer and easier. I know that the wpa-psk could change in the feature, but then we can change to whatever default mechanism will be in place at that moment. > > -- > Bye, Peter Korsgaard >
Hi Angelo, Peter, *, On 2022-10-03 15:42, Angelo Compagnucci wrote: > On Sun, Sep 18, 2022 at 11:57 AM Peter Korsgaard <peter@korsgaard.com> > wrote: > >> >>>>> "Angelo" == Angelo Compagnucci <angelo@amarulasolutions.com> writes: >> >> > These options can be used by packages to configure a wifi card >> > to connect at boot. >> >> > Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com> >> > --- >> > system/Config.in | 15 +++++++++++++++ >> > 1 file changed, 15 insertions(+) >> >> > diff --git a/system/Config.in b/system/Config.in >> > index 888c24ce81..9a5bdb2932 100644 >> > --- a/system/Config.in >> > +++ b/system/Config.in >> > @@ -418,6 +418,21 @@ comment "automatic network configuration via >> DHCP >> needs ifupdown or busybox or n >> > depends on !(BR2_PACKAGE_BUSYBOX || BR2_PACKAGE_IFUPDOWN || \ >> > BR2_PACKAGE_SYSTEMD_NETWORKD || BR2_PACKAGE_NETIFRC) >> >> > +config BR2_SYSTEM_CONNECT_WIFI >> > + bool "Connect to a default wifi access point" >> > + default n Depending on BR2_SYSTEM_DHCP would remove some unwanted side effects: +config BR2_SYSTEM_CONNECT_WIFI + bool "Connect to a default wifi access point" + depends on BR2_SYSTEM_DHCP != "" && BR2_PACKAGE_WPA_SUPPLICANT Kind regards, Andreas >> >> 'n' is default, so drop that. > > > Right. > > >> This doesn't really do anything unless the >> user also configures BR2_SYSTEM_DHCP="wlan0", right? >> > > Right. > > >> >> I must say I am not really convinced. This is only useful for quite >> specific setups (E.G. a lot more specific than BR2_SYSTEM_DHCP which >> we >> use in a number of defconfigs) and hard codes a number of things (like >> WPA-PSK that may or may not make sense in the future). >> > > This is what we have now on several readme.txt on how to connect to a > wifi > > WiFi > ==== > > # wpa_passphrase ACCESSPOINTNAME >> /etc/wpa_supplicant.conf > (type password and enter) > # wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B > # udhcpc -i wlan0 > > I don't think this is nice. > > I'd like to see something like that: > > WiFi > ==== > > # Enable BR2_SYSTEM_CONNECT_WIFI configure option > # Set the Wifi SSID with the option BR2_SYSTEM_CONNECT_WIFI_SSID > # Set the password with the option BR2_SYSTEM_CONNECT_WIFI_PASSWORD > > Nicer and easier. I know that the wpa-psk could change in the feature, > but > then we can change to whatever default mechanism will be in place at > that > moment. > > >> >> -- >> Bye, Peter Korsgaard >> > > > -- > > Angelo Compagnucci > > Software Engineer > > angelo@amarulasolutions.com > __________________________________ > Amarula Solutions SRL > > Via le Canevare 30, 31100 Treviso, Veneto, IT > > T. +39 (0)42 243 5310 > info@amarulasolutions.com > > www.amarulasolutions.com > [`as] https://www.amarulasolutions.com|
On Tue, Oct 4, 2022 at 11:05 AM Andreas Ziegler <br015@umbiko.net> wrote: > Hi Angelo, Peter, *, > > On 2022-10-03 15:42, Angelo Compagnucci wrote: > > On Sun, Sep 18, 2022 at 11:57 AM Peter Korsgaard <peter@korsgaard.com> > > wrote: > > > >> >>>>> "Angelo" == Angelo Compagnucci <angelo@amarulasolutions.com> > writes: > >> > >> > These options can be used by packages to configure a wifi card > >> > to connect at boot. > >> > >> > Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com> > >> > --- > >> > system/Config.in | 15 +++++++++++++++ > >> > 1 file changed, 15 insertions(+) > >> > >> > diff --git a/system/Config.in b/system/Config.in > >> > index 888c24ce81..9a5bdb2932 100644 > >> > --- a/system/Config.in > >> > +++ b/system/Config.in > >> > @@ -418,6 +418,21 @@ comment "automatic network configuration via > >> DHCP > >> needs ifupdown or busybox or n > >> > depends on !(BR2_PACKAGE_BUSYBOX || BR2_PACKAGE_IFUPDOWN || \ > >> > BR2_PACKAGE_SYSTEMD_NETWORKD || BR2_PACKAGE_NETIFRC) > >> > >> > +config BR2_SYSTEM_CONNECT_WIFI > >> > + bool "Connect to a default wifi access point" > >> > + default n > > Depending on BR2_SYSTEM_DHCP would remove some unwanted side effects: > > +config BR2_SYSTEM_CONNECT_WIFI > + bool "Connect to a default wifi access point" > + depends on BR2_SYSTEM_DHCP != "" && BR2_PACKAGE_WPA_SUPPLICANT > Nice indeed! > > Kind regards, > Andreas > > >> > >> 'n' is default, so drop that. > > > > > > Right. > > > > > >> This doesn't really do anything unless the > >> user also configures BR2_SYSTEM_DHCP="wlan0", right? > >> > > > > Right. > > > > > >> > >> I must say I am not really convinced. This is only useful for quite > >> specific setups (E.G. a lot more specific than BR2_SYSTEM_DHCP which > >> we > >> use in a number of defconfigs) and hard codes a number of things (like > >> WPA-PSK that may or may not make sense in the future). > >> > > > > This is what we have now on several readme.txt on how to connect to a > > wifi > > > > WiFi > > ==== > > > > # wpa_passphrase ACCESSPOINTNAME >> /etc/wpa_supplicant.conf > > (type password and enter) > > # wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B > > # udhcpc -i wlan0 > > > > I don't think this is nice. > > > > I'd like to see something like that: > > > > WiFi > > ==== > > > > # Enable BR2_SYSTEM_CONNECT_WIFI configure option > > # Set the Wifi SSID with the option BR2_SYSTEM_CONNECT_WIFI_SSID > > # Set the password with the option BR2_SYSTEM_CONNECT_WIFI_PASSWORD > > > > Nicer and easier. I know that the wpa-psk could change in the feature, > > but > > then we can change to whatever default mechanism will be in place at > > that > > moment. > > > > > >> > >> -- > >> Bye, Peter Korsgaard > >> > > > > > > -- > > > > Angelo Compagnucci > > > > Software Engineer > > > > angelo@amarulasolutions.com > > __________________________________ > > Amarula Solutions SRL > > > > Via le Canevare 30, 31100 Treviso, Veneto, IT > > > > T. +39 (0)42 243 5310 > > info@amarulasolutions.com > > > > www.amarulasolutions.com > > [`as] https://www.amarulasolutions.com| >
diff --git a/system/Config.in b/system/Config.in index 888c24ce81..9a5bdb2932 100644 --- a/system/Config.in +++ b/system/Config.in @@ -418,6 +418,21 @@ comment "automatic network configuration via DHCP needs ifupdown or busybox or n depends on !(BR2_PACKAGE_BUSYBOX || BR2_PACKAGE_IFUPDOWN || \ BR2_PACKAGE_SYSTEMD_NETWORKD || BR2_PACKAGE_NETIFRC) +config BR2_SYSTEM_CONNECT_WIFI + bool "Connect to a default wifi access point" + default n + depends on BR2_PACKAGE_WPA_SUPPLICANT + +config BR2_SYSTEM_CONNECT_WIFI_SSID + string "Access point SSID" + default "" + depends on BR2_SYSTEM_CONNECT_WIFI + +config BR2_SYSTEM_CONNECT_WIFI_PASSWORD + string "Access point password" + default "" + depends on BR2_SYSTEM_CONNECT_WIFI + endif # BR2_ROOTFS_SKELETON_DEFAULT config BR2_SYSTEM_DEFAULT_PATH
These options can be used by packages to configure a wifi card to connect at boot. Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com> --- system/Config.in | 15 +++++++++++++++ 1 file changed, 15 insertions(+)