Switching between normal and P2P operation

Ben Hardill hardillb at gmail.com
Tue Dec 11 11:39:20 EST 2012


Hi,

I'm trying to script a scenario with wpa_cli at the moment and having 
problems.

The aim is:

1) To bring up the wireless device, scan for local APs
2) If a known AP is found in a given period connect to it
3) if not move to set up a P2P service definition and add a ssid postfix 
before creating a P2P Group with p2p_group_add
4) Wait for incoming p2p group join request

The problem is once I do initiate a scan for APs then P2P operations 
down seam to work. They work fine if I don't kick of the scan first.

I've even tried tearing down the wpa_supplicant between steps 2 and 3 
and I continue to get scan results events and it still won't work in P2P 
mode until I reboot.

I'm using wpa_supplicant v1.1 built from src on raspbian with libnl-3 on 
a raspberry pi

Am I doing something wrong or have I missed something out to shut the 
scanning down, I can't see any obvious command in the wpa_cli help?

Thanks,

Ben

-- 
http://www.hardill.me.uk/wordpress
http://about.me/hardillb
http://flickr.com/photos/hardillb/
http://last.fm/user/hardillb



More information about the HostAP mailing list