Wifi Direct (Wifi P2P) on BPI-M2 Zero

Has anyone gotten Wifi Direct working? I’m running Armbian 23.02.0 with Linux 6.1.11. I’m running a little more bleeding edge than suggested because the ones pointed to by the BPi wiki don’t have all the DTBs setup correctly.

In any case, I’m having trouble setting up Wifi Direct (also known as Wifi P2P). I had this working fine with my Raspberry Pi on Raspberry Pi OS, but here is seems to be failing. I can get a group setup, and I am getting DNS running on that interface, but when my Android device joins, it doesn’t receive group info or an IP address. Again, this is code that worked on an RPi 4B.

The entire script is kind of long, but essentially it is:

wpa_cli p2p_group_add
wpa_cli set device_name FOO
wpa_cli set p2p_go_intent 15
ifconfig p2p-wlan0-0 netmask
ifconfig p2p-wlan0-0 up
dnsmasq -I p2p-wlan0-0 -F192.168.0.40, -p0 -z
wpa_cli p2p_listen
wpa_cli wps_pbc

This advertises the device, but when my device tries to connect, it doesn’t seem to be finishing. Am I missing some secret sauce, or is the Wifi chip/driver just that must different?

I have even more details here if anyone wants to help out:


Probably drivers on RPi are patched to provide this functionality. Search into this direction: https://www.google.com/search?q=P2P+brcmfmac