Hi, > -----Original Message----- > From: openwrt-devel [mailto:[email protected]] > On Behalf Of Jonas Gorski > Sent: Samstag, 9. November 2019 13:57 > To: [email protected] > Cc: OpenWrt Development List <[email protected]>; Rosy > Song <[email protected]> > Subject: Re: [OpenWrt-Devel] [PATCH 2/2] base-files: rename SSID with EUI > of mac address > > On Sat, 9 Nov 2019 at 12:04, <[email protected]> wrote: > > > > Hi, > > > > > -----Original Message----- > > > From: Jonas Gorski [mailto:[email protected]] > > > Sent: Samstag, 9. November 2019 10:37 > > > To: Adrian Schmutzler <[email protected]> > > > Cc: OpenWrt Development List <[email protected]>; > Rosy > > > Song <[email protected]> > > > Subject: Re: [OpenWrt-Devel] [PATCH 2/2] base-files: rename SSID > > > with EUI of mac address > > > > > > On Fri, 8 Nov 2019 at 12:49, Adrian Schmutzler > > > <[email protected]> wrote: > > > > > > > > If the label MAC address is provided for a device, the default > > > > SSID will be set to contain the EUI of this address, e.g. > > > > OpenWrt-ddeeff. > > > > > > > > With multiple routers, this will help the user to identify his > > > > device based on the MAC address printed on the device. > > > > > > > > If no label MAC address is specified, this will use "OpenWrt" as > > > > done before. > > > > > > > > Using a uci-defaults script for this is necessary as mac80211.sh > > > > is executed before /etc/board.json is created, so label MAC > > > > addresses set in 02_network would not be available there. > > > > > > Unfortunately since we detect wifi async these days this is quite > > > racy, and there is no guarantee /etc/config/wireless is fully > > > populated by the time the uci defaults are run. E.g. mwl8k takes > > > quite a while since it uses different firmwares for STA and AP > > > modes, and it needs to re-initialize to switch between them > > > (triggered by by mac80211.sh trying to detect the supporte features). > > > > So, in the end, it might be like Manuel Giganto suggested in GitHub > > and one might either have to wait in mac80211.sh until /etc/board.json > > is available (ugly) or just put the same code (the few lines of SSID change) > in both locations (uci_defaults AND mac80211.sh). > > How about just generating the board.json at an earlier time before loading > the wifi drivers, so it's always there once mac80211.sh runs?
in principle, yes. Thanks for this idea. However, we have to be careful to not break anything in 02_network, e.g. using $(cat /sys/class/net/eth0/address) or similar when we become too early. I do not really have an overview of _all_ targets and what they do in 02_network or similar board.d files. Despite, I introduced $(cat /sys/class/ieee80211/phy0/macaddress) retrieval into 02_network as workaround for the MAC address. However, I will try to change those lines to point to the proper original sources of the addresses. > > We already generate it in preinit (unless failsafe is disabled) to configure > the > switch and find the proper lan if, we might as well make it unconditional and > then rely on it for mac80211.sh. Where would you put it? Best Adrian > > > Regards > Jonas > > _______________________________________________ > openwrt-devel mailing list > [email protected] > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
openpgp-digital-signature.asc
Description: PGP signature
_______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
