Wireless wlan0 management <p>I implemented a function in order to connect my device to an access point which contains :</p> <pre><code>iw mlan0 connect $SSID udhcpc -i mlan0 while : ; do echo "Pausing until connection established" mlan0_ip=`/sbin/ifconfig mlan0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'` if [ -z "$mlan0_ip" ] then sleep 1 else break fi done </code></pre> <p>I don't understand why the iw mlan0 connect $SSID command keep the prompt. Indeed, it is blocked on </p> <pre><code>[ 6231.764960] wlan: SCAN COMPLETED: scanned AP count=9 [ 6231.798636] wlan: Connected to bssid 1a:XX:XX:XX:52:66 successfully [ 6231.808511] IPv6: ADDRCONF(NETDEV_CHANGE): mlan0: link becomes ready udhcpc (v1.22.1) started Sending discover... Sending discover... Sending discover... [ 6241.126472] ADDBA RSP: Failed(1a:XX:XX:XX:52:66 tid=6) Sending discover... [ 6264.263093] ADDBA RSP: Failed(1a:XX:XX:XX:52:66 tid=6) Sending select for 192.168.50.33... [ 6264.497054] ADDBA RSP: Failed(1a:XX:XX:XX:52:66 tid=6) Lease of 192.168.50.33 obtained, lease time 43200 </code></pre> <p>Basically I never enter into the while loop.. I would like to execute some others command after network configuration </p>