0

I followed the steps documented here Connect Android smartphone with Wi-Fi Direct to a Raspberry Pi by @Ingo under 'Accepted Answer' to setup P2P on Raspberrypi and test it using an Android phone. However, whenever I try to test it, my phone discovers the Raspberrypi but Raspberrypi is unable to discover the phone.

Upon getting sniffer logs for the test, I found out that the Probe Requests from Raspberrypi are missing P2P IE so the Android phone just ignores it and doesn't respond to it.

I have tried this with Raspberrypi 3B+ and 4B and with software version 2021-05-28 (Buster) and 2023-05-03 (Bullseye) versions and the same issue is seen across the board.

sniffer log: P2P Probe Request from Raspberrypi with no P2P IE Raspberrypi log snippet:

May 18 16:07:09 raspberrypi wpa_supplicant[305]: P2P: Starting search
May 18 16:07:09 raspberrypi wpa_supplicant[305]: WPS: Building WPS IE for Probe Request
May 18 16:07:09 raspberrypi wpa_supplicant[305]: WPS:  * Version (hardcoded 0x10)
May 18 16:07:09 raspberrypi wpa_supplicant[305]: WPS:  * Request Type
May 18 16:07:09 raspberrypi wpa_supplicant[305]: WPS:  * Config Methods (0)
May 18 16:07:09 raspberrypi wpa_supplicant[305]: WPS:  * UUID-E
May 18 16:07:09 raspberrypi wpa_supplicant[305]: WPS:  * Primary Device Type
May 18 16:07:09 raspberrypi wpa_supplicant[305]: WPS:  * RF Bands (3)
May 18 16:07:09 raspberrypi wpa_supplicant[305]: WPS:  * Association State
May 18 16:07:09 raspberrypi wpa_supplicant[305]: WPS:  * Configuration Error (0)
May 18 16:07:09 raspberrypi wpa_supplicant[305]: WPS:  * Device Password ID (0)
May 18 16:07:09 raspberrypi wpa_supplicant[305]: WPS:  * Manufacturer
May 18 16:07:09 raspberrypi wpa_supplicant[305]: WPS:  * Model Name
May 18 16:07:09 raspberrypi wpa_supplicant[305]: WPS:  * Model Number
May 18 16:07:09 raspberrypi wpa_supplicant[305]: WPS:  * Device Name
May 18 16:07:09 raspberrypi wpa_supplicant[305]: WPS:  * Version2 (0x20)
May 18 16:07:09 raspberrypi wpa_supplicant[305]: WPS:  * Request to Enroll (1)
May 18 16:07:09 raspberrypi wpa_supplicant[305]: P2P: * P2P IE header
May 18 16:07:09 raspberrypi wpa_supplicant[305]: P2P: * Capability dev=25 group=00
May 18 16:07:09 raspberrypi wpa_supplicant[305]: P2P: * Listen Channel: Regulatory Class 81 Channel 6
May 18 16:07:09 raspberrypi wpa_supplicant[305]: p2p-dev-wlan0: Add radio work 'p2p-scan'@0x20ea1a8
May 18 16:07:09 raspberrypi wpa_supplicant[305]: p2p-dev-wlan0: First radio work item in the queue - schedule start immediately
May 18 16:07:09 raspberrypi wpa_supplicant[305]: p2p-dev-wlan0: Starting radio work 'p2p-scan'@0x20ea1a8 after 0.000043 second wait
May 18 16:07:09 raspberrypi wpa_supplicant[305]: p2p-dev-wlan0: nl80211: scan request
May 18 16:07:09 raspberrypi wpa_supplicant[305]: nl80211: Scan SSID - hexdump_ascii(len=7):
May 18 16:07:09 raspberrypi wpa_supplicant[305]:      44 49 52 45 43 54 2d                              DIRECT-
May 18 16:07:09 raspberrypi wpa_supplicant[305]: nl80211: Scan extra IEs - hexdump(len=142): dd 79 00 50 f2 04 10 4a 00 01 10 10 3a 00 01 01 10 08 00 02 00 00 10 47 00 10 1f 94 f2 f2 06 67 51 68 a1 05 17 02 c4 c1 86 20 10 54 00 08 00 06 00 50 f2 04 00 01 10 3c 00 01 03 10 02 00 02 00 00 10 09 00 02 00 00 10 12 00 02 00 00 10 21 00 01 20 10 23 00 01 20 10 24 00 01 20 10 11 00 0e 44 49 52 45 43 54 2d 72 70 69 77 69 66 69 10 49 00 09 00 37 2a 00 01 20 03 01 01 dd 11 50 6f 9a 09 02 02 00 25 00 06 05 00 55 53 04 51 06
May 18 16:07:09 raspberrypi wpa_supplicant[305]: nl80211: Scan frequency 2412 MHz
May 18 16:07:09 raspberrypi wpa_supplicant[305]: nl80211: Scan frequency 2437 MHz
May 18 16:07:09 raspberrypi wpa_supplicant[305]: nl80211: Scan frequency 2462 MHz
May 18 16:07:09 raspberrypi wpa_supplicant[305]: nl80211: P2P probe - mask SuppRates
May 18 16:07:09 raspberrypi wpa_supplicant[305]: Scan requested (ret=0) - scan timeout 30 seconds
May 18 16:07:09 raspberrypi wpa_supplicant[305]: P2P: Running p2p_scan
May 18 16:07:09 raspberrypi wpa_supplicant[305]: nl80211: Event message available
May 18 16:07:09 raspberrypi wpa_supplicant[305]: nl80211: Drv Event 33 (NL80211_CMD_TRIGGER_SCAN) received for p2p-dev-wlan0
May 18 16:07:09 raspberrypi wpa_supplicant[305]: p2p-dev-wlan0: nl80211: Scan trigger
May 18 16:07:09 raspberrypi wpa_supplicant[305]: p2p-dev-wlan0: Event SCAN_STARTED (46) received
May 18 16:07:09 raspberrypi wpa_supplicant[305]: p2p-dev-wlan0: Own scan request started a scan in 0.000127 seconds
May 18 16:07:09 raspberrypi wpa_supplicant[305]: CTRL-DEBUG: ctrl_sock-sendmsg: sock=17 sndbuf=180224 outq=0 send_len=24
May 18 16:07:09 raspberrypi wpa_supplicant[305]: CTRL_IFACE monitor sent successfully to /tmp/wpa_ctrl_553-2\x00
May 18 16:07:09 raspberrypi wpa_supplicant[305]: nl80211: Event message available
May 18 16:07:09 raspberrypi wpa_supplicant[305]: nl80211: Drv Event 34 (NL80211_CMD_NEW_SCAN_RESULTS) received for p2p-dev-wlan0
May 18 16:07:09 raspberrypi wpa_supplicant[305]: p2p-dev-wlan0: nl80211: New scan results available
May 18 16:07:09 raspberrypi wpa_supplicant[305]: nl80211: Scan probed for SSID 'DIRECT-'
May 18 16:07:09 raspberrypi wpa_supplicant[305]: nl80211: Scan included frequencies: 2412 2437 2462
May 18 16:07:09 raspberrypi wpa_supplicant[305]: p2p-dev-wlan0: Event SCAN_RESULTS (3) received
May 18 16:07:09 raspberrypi wpa_supplicant[305]: p2p-dev-wlan0: Scan completed in 0.137083 seconds
May 18 16:07:09 raspberrypi wpa_supplicant[305]: nl80211: Received scan results (0 BSSes)
May 18 16:07:09 raspberrypi wpa_supplicant[305]: p2p-dev-wlan0: BSS: Start scan result update 770
May 18 16:07:09 raspberrypi wpa_supplicant[305]: BSS: last_scan_res_used=0/32
May 18 16:07:09 raspberrypi wpa_supplicant[305]: p2p-dev-wlan0: Radio work 'p2p-scan'@0x20ea1a8 done in 0.139578 seconds
May 18 16:07:09 raspberrypi wpa_supplicant[305]: p2p-dev-wlan0: radio_work_free('p2p-scan'@0x20ea1a8): num_active_works --> 0
May 18 16:07:09 raspberrypi wpa_supplicant[305]: P2P: Scan results received (0 BSS)

Upon looking at the raw hexdump data of the IEs in the log, it looks like supplicant is correctly including the P2P IE OUI (50 6F 9A) but for some reason the Raspberrypi kernel/driver is dropping it before broadcasting the Probe request.

Has anyone encountered this issue or has any leads on how to resolve it?

  • To isolate brcm driver/kernel issues, I flashed the exact same buster version from 08-2020 from @Ingo's post and I still see this issue. I also skipped the 'sudo apt full-upgarde' so the kernel/drivers don't get updated. – Niket Thakker May 19 '23 at 18:56
  • I also found this post https://raspberrypi.stackexchange.com/questions/110786/rpi4-with-buster-wpa-supplicant-fails-to-connect-to-hostapd-network-hosted-on-ub which mentioned issue in the updated brcm driver when using hostapd. So I tried using the 02-2020 buster version from that post to see if it helps resolving this missing P2P IE but that didn't help either. – Niket Thakker May 19 '23 at 18:58

0 Answers0