0

I wanted to play with the Wi-Fi direct protocol and really understand it as I want to pretend I have a sensor network that follows the pattern:

  1. wake up
  2. establish a network
  3. trade data
  4. disconnect
  5. wait for next window
  6. and repeat.

I have come close, but I can't quite figure out how to get the full protocol to work.

I started with two identical Raspberry PI 4's running Raspbian 10. I have added the following packages:

openssl-server, bison, flex, build-essential, 
libglib2.0-dev, dbus-glib-1-dev, libssl-dev, libreadline-dev

I have downloaded and compiled the following:

desktop-file-utils, libnl, wpa_supplicant-2.9

The wpa_suuplicant-2.9 was build and configured using http://www.linuxfromscratch.org/blfs/view/svn/basicnet/wpa_supplicant.html and the information from README-P2P

running iw list shows P2P-client, P2P-GO, P2P-device as being supported

I have modified wpa_supplicant.conf adding the following information:

ctrl_interface=/var/run/wpa_supplicant
device_name=My P2P Device *<device number>*
device_type=1-0050F204-1

running wpa_cli then running p2p_find allows each device to find a printer that is nearby, but not each other

I have played with using p2p_group_add on one of the pis. By using it, I can get the other pi to see the one which I did the p2p_group_add via p2p_find. I haven't fully figured out this procedure yet; however, the problem with p2p_group_add is it skips GO negotiation. This in my mind defeats the purpose of using Wi-Fi direct as I want each pi to take a turn as GO so I can distribute its workload across all devices.

Any help would be much appreciated.

Thank you in advance.

Tim

mnille
  • 529
  • 5
  • 16

1 Answers1

0

I needed to go get an external wifi adapter (I got one for each raspberry pi to keep them identical for my make belief scenario above)

Tested the steps above using an external wifi adapter that contained the rtl8192eu chipset. Once the driver was compiled and added, it started working.