[OpenWrt-Devel] Fwd: iwinfo lua scanlist issue

Bastian Bittorf bittorf at bluebottle.com
Mon Jun 29 07:35:09 EDT 2015

* Peter Uithoven <peter at peteruithoven.nl> [29.06.2015 13:20]:
> We do a little bit of our own wifi config. We try to find (using scanlist)
> known wifi networks and connect to them, when non appropriate are found we
> create a accesspoint.
> In the future, when connecting to a known networks fails it should also
> become a accesspoint.

ok...then you can maybe with hotplug wait for ACTION='ifup'
maybe something like this (will not work, but you get the idea)

# hotplug-script:

MYCHANNELS='1 2 3 154 168'

[ "$ACTION" = 'ifup' -a -e "$SCANNED" ] && {
	scan_for_known_networks | while read NETWORK_SETTINGS ; do
		connect $NETWORK_SETTINGS	# ssid, channel, pass etc.

[ "$ACTION" = 'ifup' -a "$INTERFACE" = 'mywifi' ] && {
	for CHAN in $MYCHANNELS; do
		create_adhoc $CHAN
		touch 'SCANNED'

> If I understand the OpenWRT wiki hotplug is replaced by procd?

no. netifd will start hotplug if an interface comes up.

bye, bastian
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list