<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div></div><div class="postbody">
                        <div class="post-entry">
                                <div class="entry-content">
                                        <div>OK did some investigation and it seems we need to put an action script along with wpa_supplicant daemon as follows.</div><div><br></div><div>wpa_supplicant -B -P /var/run/wifi-wlan0.pid -D nl80211 -i wlan0 -c /var/run/wpa_supplicant-wlan0.conf <br>wpa_cli -p /var/run/wpa_supplicant-wlan0 -a /usr/sbin/wpa_action -B <br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div>wpa_action script must look like this. <br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div>Any other suggestions are highly welcomed</div><div><br></div><div>#!/bin/sh</div><div>IFNAME=$1<br>CMD=$2</div><div>if [ "$CMD" = "CONNECTED" ]; then<br>&nbsp; &nbsp; <br>&nbsp; &nbsp; sleep 5<br>&nbsp; &nbsp; local pid=""<br>&nbsp; &nbsp;
 pid=`head -n1 /var/run/dhcp-"$IFNAME".pid 2&gt;/dev/null | tr -d '\n'`&nbsp; <br>&nbsp; &nbsp; sleep 1 </div><div>&nbsp; &nbsp; if [ "$pid" != "" ]; then<br>&nbsp; &nbsp; &nbsp; &nbsp; kill -USR1 "$pid" 2&gt;/dev/null<br>&nbsp; &nbsp; &nbsp; &nbsp; sleep 1<br>&nbsp; &nbsp; fi<br>fi</div>                                </div>
                        </div>
                </div><div><br></div>  <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1">  <font face="Arial" size="2"> <b><span style="font-weight:bold;">From:</span></b> "hostap-request@lists.shmoo.com" &lt;hostap-request@lists.shmoo.com&gt;<br> <b><span style="font-weight: bold;">To:</span></b> hostap@lists.shmoo.com <br> <b><span style="font-weight: bold;">Sent:</span></b> Sunday, 9 June 2013 11:00 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> HostAP Digest, Vol 122, Issue 15<br> </font> </div> <div class="y_msg_container"><br>Send HostAP mailing list submissions to<br>&nbsp;&nbsp;&nbsp; <a ymailto="mailto:hostap@lists.shmoo.com" href="mailto:hostap@lists.shmoo.com">hostap@lists.shmoo.com</a><br><br>To subscribe or unsubscribe via the World Wide Web, visit<br>&nbsp;&nbsp;&nbsp; <a
 href="http://lists.shmoo.com/mailman/listinfo/hostap" target="_blank">http://lists.shmoo.com/mailman/listinfo/hostap</a><br>or, via email, send a message with subject or body 'help' to<br>&nbsp;&nbsp;&nbsp; <a ymailto="mailto:hostap-request@lists.shmoo.com" href="mailto:hostap-request@lists.shmoo.com">hostap-request@lists.shmoo.com</a><br><br>You can reach the person managing the list at<br>&nbsp;&nbsp;&nbsp; <a ymailto="mailto:hostap-owner@lists.shmoo.com" href="mailto:hostap-owner@lists.shmoo.com">hostap-owner@lists.shmoo.com</a><br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of HostAP digest..."<br><br><br>Today's Topics:<br><br>&nbsp;  1. Re: Hostapd driver interface selection in hostapd.conf for<br>&nbsp; &nbsp; &nbsp; atheros&nbsp;&nbsp;&nbsp; WiFi cards. (Hauke Mehrtens)<br>&nbsp;  2. How to force wpa-supplicant to update dhcp lease when SSID is<br>&nbsp; &nbsp; &nbsp; changed (Samitha
 Wijedasa)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Sat, 08 Jun 2013 18:47:20 +0200<br>From: Hauke Mehrtens &lt;<a ymailto="mailto:hauke@hauke-m.de" href="mailto:hauke@hauke-m.de">hauke@hauke-m.de</a>&gt;<br>Subject: Re: Hostapd driver interface selection in hostapd.conf for<br>&nbsp;&nbsp;&nbsp; atheros&nbsp;&nbsp;&nbsp; WiFi cards.<br>To: Bhavesh Kamani &lt;<a ymailto="mailto:bhavesh.kamani@elitecore.com" href="mailto:bhavesh.kamani@elitecore.com">bhavesh.kamani@elitecore.com</a>&gt;<br>Cc: <a ymailto="mailto:hostap@lists.shmoo.com" href="mailto:hostap@lists.shmoo.com">hostap@lists.shmoo.com</a><br>Message-ID: &lt;<a ymailto="mailto:51B36018.6010109@hauke-m.de" href="mailto:51B36018.6010109@hauke-m.de">51B36018.6010109@hauke-m.de</a>&gt;<br>Content-Type: text/plain; charset=ISO-8859-1<br><br>On 06/07/2013 07:43 AM, Bhavesh Kamani wrote:<br>&gt; Hi Team,<br>&gt; <br>&gt;&nbsp; <br>&gt;
 <br>&gt; Whenever I am using ath9k, I am using "driver=nl80211" in hostapd.conf file,<br>&gt; but I am not sure what is the difference between madwifi driver<br>&gt; interface(driver_madwifi.c) and atheros driver interface(driver_atheros.c)?<br>&gt; <br>&gt; When should I use "driver=madwifi" and when should I use "driver=atheros"?<br><br>For ath9k wifi driver you need driver=nl80211<br>For madwifi wifi driver you need driver=madwifi<br>For Atheros proprietary wifi driver you need driver=atheros<br><br>These are 3 different wifi drivers which support partly the same devices<br>and hostapd has to use different interfaces to interact with these drivers.<br><br>Hauke<br><br><br>------------------------------<br><br>Message: 2<br>Date: Sat, 8 Jun 2013 10:07:43 -0700 (PDT)<br>From: Samitha Wijedasa &lt;<a ymailto="mailto:samitha.wijedasa@yahoo.com" href="mailto:samitha.wijedasa@yahoo.com">samitha.wijedasa@yahoo.com</a>&gt;<br>Subject: How to force
 wpa-supplicant to update dhcp lease when SSID is<br>&nbsp;&nbsp;&nbsp; changed<br>To: "<a ymailto="mailto:hostap@lists.shmoo.com" href="mailto:hostap@lists.shmoo.com">hostap@lists.shmoo.com</a>" &lt;<a ymailto="mailto:hostap@lists.shmoo.com" href="mailto:hostap@lists.shmoo.com">hostap@lists.shmoo.com</a>&gt;<br>Message-ID:<br>&nbsp;&nbsp;&nbsp; &lt;<a ymailto="mailto:1370711263.95368.YahooMailNeo@web163605.mail.gq1.yahoo.com" href="mailto:1370711263.95368.YahooMailNeo@web163605.mail.gq1.yahoo.com">1370711263.95368.YahooMailNeo@web163605.mail.gq1.yahoo.com</a>&gt;<br>Content-Type: text/plain; charset="iso-8859-1"<br><br>Hi,<br><br>I have multiple SSID arrangement. Say currently my <br>wifi module is connected to the highest priority SSID and suddenly it <br>went down. Currently the wpa_supplicant connects with the next priority <br>SSID immediately, but the dhcp lease is not updated and as a result the <br>IPs obtained remains same.<br>Is there a way to
 force wpa_supplicant to update the dhcp lease when this <br>happens in OpenWrt. I'm looking for a solution like wpa-roam. Appreciate your? response in this regard.<br><br><br>Thanks<br><br>Samitha<br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: &lt;<a href="http://lists.shmoo.com/pipermail/hostap/attachments/20130608/e617d8eb/attachment.html" target="_blank">http://lists.shmoo.com/pipermail/hostap/attachments/20130608/e617d8eb/attachment.html</a>&gt;<br><br>------------------------------<br><br>_______________________________________________<br>HostAP mailing list<br><a ymailto="mailto:HostAP@lists.shmoo.com" href="mailto:HostAP@lists.shmoo.com">HostAP@lists.shmoo.com</a><br><a href="http://lists.shmoo.com/mailman/listinfo/hostap" target="_blank">http://lists.shmoo.com/mailman/listinfo/hostap</a><br><br><br>End of HostAP Digest, Vol 122, Issue 15<br>***************************************<br><br><br></div> </div>
 </div>  </div></body></html>