P2P IDLE state and connect / ProvisionDiscovery
Fabien Marotte
fabienx.marotte
Tue Nov 9 01:59:20 PST 2010
Hi Jouni,
Thanks for your answer,
On 11/04/2010 06:11 PM, Jouni Malinen wrote:
> On Thu, Nov 04, 2010 at 05:50:18PM +0100, Fabien Marotte wrote:
>> Looking at the code, I understand that being in IDLE state should not be
>> a problem. However it looks to don't work.
>
> If you do not enable extended listen timing, IDLE state means that the
> device is not listening to any messages and as such, not replying to
> provisioning discovery is expected. In other words, if you want to be
> discoverable, you will either need to leave the device in find or listen
> state or to enable extended listen timing (p2p_ext_listen) to make it
> periodically go to listen state for a short duration.
>
I understand that the receiver must be listen to get request from
another peer. But on sender side, even if in IDLE, I think it should work.
Indeed, the below scenario doesn't work and according to me should be
working:
Peer1 | Peer2
-------------------------------------------------------------------
p2p_find(timeout=10) | p2p_find()
SEARCH STATE | SEARCH STATE
DEVICE_FOUND | DEVICE_FOUND
Wait for timeout |
IDLE STATE |
|
p2p_provision_discovery(display) | Sometimes receive the packet
| but not always
Nothing happens |
-------------------------------------------------------------------
The same scenario with extended listen on "Peer2" doesn't work.
The same scenario with listen on "Peer2" works
Peer1 | Peer2
-------------------------------------------------------------------
p2p_find(timeout=10) | p2p_find()
SEARCH STATE | SEARCH STATE
DEVICE_FOUND | DEVICE_FOUND
Wait for timeout |
IDLE STATE | p2p_listen()
|
p2p_provision_discovery(display) | ENTER_PIN
| ....
-------------------------------------------------------------------
After investigation, I noted that prov_disc request is sent only one
time if you are in IDLE state. If Peer2 is not ready to receive at this
moment, Peer2 misses the packet.
However if Peer1 is in FIND phase, prov_disc request is sent again each
time it moves to SEARCH state.
I think that whatever is the phase (FIND/IDLE/LISTEN) on Peer1,
wpa_supplicant should resend packets until it gets response or a timeout.
Do you agree on that?
Fabien
More information about the Hostap
mailing list