1

I'm working on connecting a Raspberry Pi Zero W to an android device and having some issues. I think I am very close to getting it to work, but perhaps there is some small error.

So I followed the answer in this post by @Ingo Setting up Wifi direct (wifi p2p) and DHCP server and I get some differences in my results. I am able to set everything up correctly; the pi and the android are able to see each other over wifi direct, but when I try to connect to the android from my pi using pi ~$ wpa_cli -ip2p-dev-wlan0 p2p_connect a2:91:69:b2:91:a9 pbc, I simply get the output "FAIL".

If I initiate connection to the raspberry pi on the android (I get the pin window first and I hit decline since I don't know the pin), the pi is listed as invited and I then get OK when I execute the above command. After this, the pbc accept connection window pops up and I accept but nothing changes, the pi is still listed as invited.

Can anyone help me with this? Also is there a way to see a more verbose log of what's happening in this command so I can have a better idea of what's going on? simply FAIL is not very helpful. wpa_cli doesn't seem to have a verbose option to my knowledge.

Thanks!!

Dyskord
  • 119
  • 8

1 Answers1

2

Issues with the frequency band (2.4 GHz vs. 5 GHz) should not exist. As far as I know the Raspberry Pi Zero W only supports the 2.4 GHz band, but I'm not sure. If in doubt append the frequency to the connection command, e.g.

rpi ~$ wpa_cli -ip2p-dev-wlan0 p2p_connect 86:cf:bf:8e:f1:06 pbc  freq=2412

It can be that the config_methods are not correct negotiated. You can specify them in /etc/wpa_supplicant/wpa_supplicant-wlan0.conf. Setting this option could help:

config_methods=virtual_push_button

For troubleshooting you can run wpa_supplicant in the foreground. Then you get messages what's going on.

I have written a complete revised answer at Connect Android smartphone with Wi-Fi Direct to a Raspberry Pi that covers all these issues. Please have a look at it and check your setup, in particular the settings in wpa_supplicant.conf.

Seamus
  • 23,558
  • 5
  • 42
  • 83
Ingo
  • 42,961
  • 20
  • 87
  • 207