Contents of HostAP Digest, Vol 122, Issue 15 How to force wpa-supplicant to update dhcp lease when SSID is changed

Samitha Wijedasa samitha.wijedasa at yahoo.com
Mon Jun 10 16:04:50 EDT 2013



OK did some investigation and it seems we need to put an action script along with wpa_supplicant daemon as follows.

wpa_supplicant -B -P /var/run/wifi-wlan0.pid -D nl80211 -i wlan0 -c /var/run/wpa_supplicant-wlan0.conf 
wpa_cli -p /var/run/wpa_supplicant-wlan0 -a /usr/sbin/wpa_action -B 


wpa_action script must look like this. 


Any other suggestions are highly welcomed

#!/bin/sh
IFNAME=$1
CMD=$2
if [ "$CMD" = "CONNECTED" ]; then
    
    sleep 5
    local pid=""
    pid=`head -n1 /var/run/dhcp-"$IFNAME".pid 2>/dev/null | tr -d '\n'`  
    sleep 1 
    if [ "$pid" != "" ]; then
        kill -USR1 "$pid" 2>/dev/null
        sleep 1
    fi
fi


________________________________
 From: "hostap-request at lists.shmoo.com" <hostap-request at lists.shmoo.com>
To: hostap at lists.shmoo.com 
Sent: Sunday, 9 June 2013 11:00 AM
Subject: HostAP Digest, Vol 122, Issue 15
 

Send HostAP mailing list submissions to
    hostap at lists.shmoo.com

To subscribe or unsubscribe via the World Wide Web, visit
    http://lists.shmoo.com/mailman/listinfo/hostap
or, via email, send a message with subject or body 'help' to
    hostap-request at lists.shmoo.com

You can reach the person managing the list at
    hostap-owner at lists.shmoo.com

When replying, please edit your Subject line so it is more specific
than "Re: Contents of HostAP digest..."


Today's Topics:

   1. Re: Hostapd driver interface selection in hostapd.conf for
      atheros    WiFi cards. (Hauke Mehrtens)
   2. How to force wpa-supplicant to update dhcp lease when SSID is
      changed (Samitha Wijedasa)


----------------------------------------------------------------------

Message: 1
Date: Sat, 08 Jun 2013 18:47:20 +0200
From: Hauke Mehrtens <hauke at hauke-m.de>
Subject: Re: Hostapd driver interface selection in hostapd.conf for
    atheros    WiFi cards.
To: Bhavesh Kamani <bhavesh.kamani at elitecore.com>
Cc: hostap at lists.shmoo.com
Message-ID: <51B36018.6010109 at hauke-m.de>
Content-Type: text/plain; charset=ISO-8859-1

On 06/07/2013 07:43 AM, Bhavesh Kamani wrote:
> Hi Team,
> 
>  
> 
> Whenever I am using ath9k, I am using "driver=nl80211" in hostapd.conf file,
> but I am not sure what is the difference between madwifi driver
> interface(driver_madwifi.c) and atheros driver interface(driver_atheros.c)?
> 
> When should I use "driver=madwifi" and when should I use "driver=atheros"?

For ath9k wifi driver you need driver=nl80211
For madwifi wifi driver you need driver=madwifi
For Atheros proprietary wifi driver you need driver=atheros

These are 3 different wifi drivers which support partly the same devices
and hostapd has to use different interfaces to interact with these drivers.

Hauke


------------------------------

Message: 2
Date: Sat, 8 Jun 2013 10:07:43 -0700 (PDT)
From: Samitha Wijedasa <samitha.wijedasa at yahoo.com>
Subject: How to force wpa-supplicant to update dhcp lease when SSID is
    changed
To: "hostap at lists.shmoo.com" <hostap at lists.shmoo.com>
Message-ID:
    <1370711263.95368.YahooMailNeo at web163605.mail.gq1.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi,

I have multiple SSID arrangement. Say currently my 
wifi module is connected to the highest priority SSID and suddenly it 
went down. Currently the wpa_supplicant connects with the next priority 
SSID immediately, but the dhcp lease is not updated and as a result the 
IPs obtained remains same.
Is there a way to force wpa_supplicant to update the dhcp lease when this 
happens in OpenWrt. I'm looking for a solution like wpa-roam. Appreciate your? response in this regard.


Thanks

Samitha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.shmoo.com/pipermail/hostap/attachments/20130608/e617d8eb/attachment.html>

------------------------------

_______________________________________________
HostAP mailing list
HostAP at lists.shmoo.com
http://lists.shmoo.com/mailman/listinfo/hostap


End of HostAP Digest, Vol 122, Issue 15
***************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.shmoo.com/pipermail/hostap/attachments/20130610/c9ded22a/attachment.htm>


More information about the HostAP mailing list