I would like to connect my Raspberry Pi 3B to a WiFi Direct group created on my Android phone. After enabling WiFi with raspi-config, I started wpa_supplicant with the following command:

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

The file used in the above command is as follows:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

After starting wpa_supplicant, I started wpa_cli:

Selected interface 'p2p-dev-wlan0'
Interactive mode

Next, I was able to discover my phone as a peer with p2p_find:

> p2p_find
<3>P2P-DEVICE-FOUND 82:58:f8:c7:e2:81 p2p_dev_addr=82:58:f8:c7:e2:81   pri_dev_type=10-0050F204-5 name='XT1635-01_9d83' config_methods=0x188 dev_capab=0x25 group_capab=0x0 new=1

However, when I attempt to connect with the push button option using p2p_connect, the result is always immediately FAIL:

> p2p_connect 82:58:f8:c7:e2:8 pbc join

Before attempting to connect, I made sure the Android phone is listed as a P2P peer.

According to this documentation:

"join" indicates that this is a command to join an existing group as a client. It skips the GO Negotiation part. This will send a Provision Discovery Request message to the target GO before associating for WPS provisioning.

Since I want the Raspberry Pi to be a client (i.e. not the group owner), this seems like the correct option to me. Before executing the p2p_connect command above, I selected "Start PBC" on my Android device under the WiFi Direct settings.

Am I following the correct procedure to connect? If possible, I would like to connect by sending an invitation that can then be accepted on the Android device.

1 Answer 1


After some experimentation, I discovered the problem. The WiFi Direct group created on my Android device defaults to a channel on the 5 GHz band which is not supported by the Raspberry Pi. I used an Android app to change the channel to a suitable 2.4 GHz channel. After doing so, I was able to join the existing WiFi Direct group with the same process outlined in the question:

> p2p_connect 82:58:f8:c7:e2:81 pbc join

I also did not need to select the "Start PBC" option on my Android device. The p2p_connect command issues an "invitation to connect" pop-up instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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