Raspberry PI WiFi Direct disconnecting after 30seconds - Stack Overflow

admin2025-04-18  2

So I am trying to connect my laptop to a Raspberry Pi Zero W. Sometimes it won't connect and when it does, I can ping to the Raspberry PI for 30 seconds and then it disconnects.

When running ipconfig /all on my laptop I see that it got an IP (otherwise I wouldn't be able to ping 192.168.66.1)

# /etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
device_name=RC_car
device_type=1-0050F204-1
p2p_go_intent=15
# /etc/dnsmasq.conf

interface=p2p-wlan0-0
dhcp-range=192.168.66.2,192.168.66.254,12h
dhcp-option=3,192.168.66.1

Commands to start WiFi Direct:

sudo pkill wpa_supplicant
sudo wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -D nl80211 -B
sudo wpa_cli -i wlan0 p2p_group_add
sudo wpa_cli -i p2p-wlan0-0 wps_pin any 12345678
sudo ifconfig p2p-wlan0-0 192.168.66.1
转载请注明原文地址:http://anycun.com/QandA/1744907295a89310.html