Sending ps poll maunally with hostapd

David Shwatrz dshwatrz
Tue Dec 16 06:21:47 PST 2008


Thanks for your response; I took the wireless nic out of the machine
to avoid misunderstandings.

I am trying to send ps_poll to the hostapd AP.
Now, the AP is on wlan1 as you suggested:

my hostapd.conf is taken from the documentation:


I realized that I should do:
 echo "3" >  /sys/kernel/debug/ieee80211/phy0/hwsim/ps
to send a single ps_poll **manually** to the AP, and indeed now it **does**
reach the hwsim_send_ps_poll() method in the module.
However, I found out that it is not sent since the
client is not associated (namely, it exits in if (!vp->assoc)).

my client is the mac80211_hwsim on wlan0.
I tried:
iwconfig wlan0 ap 02:00:00:00:01:00 essid test
but I see with iwconfig that wlan0 is not assoicated
(wlan0 is the interface of mac80211_hwsim)

iwlist wlan0 scan **does ** find this hostapd AP.

I think that my problem is that I am not associated.

Is there a way I can associate to an hostapd AP using mac80211_hwsim
as a client? It could be that this is a silly mistake of me.


On Tue, Dec 16, 2008 at 1:29 PM, Jouni Malinen <j at> wrote:
> On Tue, Dec 16, 2008 at 11:11:15AM +0200, David Shwatrz wrote:
>> I had looked in the code and saw that the mac80211_hwsim module
>> uses debugds.
>> (I don't know why I have phy0 and phy1 - I have only one wireless nic;
>> should it be
>> always like this).
> What exactly are you trying to do? This comment here seems to indicate
> that there could be some misunderstanding on what mac80211_hwsim is.. It
> has nothing to do with a real wireless NIC and is only used to test
> mac80211 (and higher layer of the stack) in a software simulated
> environment.
>> now
>> cat /sys/kernel/debug/ieee80211/phy0/hwsim/ps
>> gives 0 (and also the same on the second entry).
>> I tried:
>> echo "1" > /sys/kernel/debug/ieee80211/phy1/hwsim/ps
>> and echo "1" > /sys/kernel/debug/ieee80211/phy0/hwsim/ps
>> but I ** do not** reach the hwsim_send_ps_poll() method.
>> I know it for sure because I added a printk in hwsim_send_ps_poll()
>> in mac80211_hwsim.c and built it; but I don't see it.
> Are you using phy0 as the client radio and phy1 as the AP? If not, this
> won't work.
> --
> Jouni Malinen                                            PGP id EFC895FA
> _______________________________________________
> HostAP mailing list
> HostAP at

More information about the Hostap mailing list