1

I am not able to connect to Raspberry pi 3 using Wifi direct from android phone, What I tried is

Step 1: Changed the configuration in wpa_supplicant.conf and the contents are

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=IN
ap_scan=1
device_name=Raspberry_pi
device_type=1-0050F204-1
driver_param=use_p2p_group_interface=1

network={
    ssid="myNetwork"
    psk="<passPhrase>"
    key_mgmt=WPA-PSK
}

network={
    ssid="Raspberry"
    psk="<passPhrase>"
}

Step 2

Loaded configuration using

sudo wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant/p2p.conf -B

and the result is

Successfully initialized wpa_supplicant
ctrl_iface exists and seems to be in use - cannot override it
Delete '/var/run/wpa_supplicant/wlan0' manually if it is not used anymore
Failed to initialize control interface 'DIR=/var/run/wpa_supplicant GROUP=netdev'.
You may have another wpa_supplicant process already running or the file was
left by an unclean termination of wpa_supplicant in which case you will need
to manually remove this file before starting wpa_supplicant again.

nl80211: deinit ifname=wlan0 disabled_11b_rates=0

Step 3

Then started the wpa_cli

when running the command, p2p_find 60 it shows my android device and the android device can detect the PI device when a connection is initiated from the android, it will ask for the password/pin and the generated pin is displayed in the wpa_cli console. And after the pin is entered android phone shows invite send and nothing happens thereafter. when a status is issued in the wpa_cli terminal, it shows disconnected. How can I make the two devices connect? What changes should I make to make this working? Ant help will be appreciated. Please ask if you need more details.

1

It is a little bit difficult to examine what exactly goes wrong with your setup. wpa_supplicant claims that there may be already running an instance on interface wlan0. It could be that wpa_supplicant is already started on boot up. Before starting wpa_supplicant you can sudo killall wpa_supplicant to ensure that there is no other service running.

Then you try to make a connection with pin code method initiated from the android device. I suggest to use push button control (pbc) initiated from the RasPi. It is a bit simpler and you have better control over the handshake. How to do it you can look at Setting up Wifi direct (wifi p2p) and DHCP server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.