![]() ![]() Then I have to show the details for every mac address with wpa_cli -i p2p-dev-wlan0 p2p_peer what name it has to find my smartphone. Now I can look with wpa_cli -i p2p-dev-wlan0 p2p_peers what mac addresses of found devices are available. Tick the three-point in the upper right corner and select Search for devices if not already Searching. Create this file: rpi ~# cat > /etc/systemd/network/work Network & Internet -> Wi-Fi -> Wi-Fi preferences -> Advanced -> Wi-Fi Direct. Here the control interface is p2p-dev-wlan0: rpi ~$ ls -1 /var/run/wpa_supplicant/īecause the group owner is working as DHCP server, we have to give its interface a static ip address and enable the DHCP server. In wpa_nf we have defined with ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev where to find the control interfaces. You can just copy and paste this in one block to your command line beginning with cat and including EOF (delimiter EOF will not get part of the file): rpi ~$ sudo -Es # if not already done ![]() By specification, the device name should always start with DIRECT. To configure wpa_supplicant create this file with your settings for country= and device_name=. Then just follow to Use systemd-networkd for general networking. We need nmap to find the connected smartphone. Please do sudo apt install nmap before modifying the network. WiFi Direct groups are represented by virtual wifi interfaces with increasing numbers, e.g. I prefer to use systemd-networkd because it has all in one and is able to manage dynamically changing interfaces. 7 means a chance of 50 % to become a group owner. 0 means the RasPi becomes a client, 15 means the RasPi becomes a group owner. To ensure that a device is always negotiated to a group owner we use the option p2p_go_intent=. So I will set the RasPi to the group owner. Only the group owner is allowed to run a DHCP server because we have to ensure that only one DHCP server is present in the group. WiFi Direct is organized in groups and every group has one group owner ( GO). ♦ Wi-Fi Direct with a DHCP server on the Group Owner WiFi Direct uses Wi-Fi Protected Setup ( WPS) for authentication that knows mainly two modes: Push Button Control ( PBC) and Pin Code. On a Raspberry Pi 4B I use Raspberry Pi OS (32-bit) Lite based on Debian Buster, updated with sudo apt update & sudo apt full-upgrade & sudo reboot on. It may be a bit different on your smartphone but it can give you an idea how it should work. ![]() I cannot give all examples so I will only use a FAIRPHONE with Android 10 for the examples. I have tested this with some different smart phones using Android 4.0, Android 6.0, Android 6.0.1 and Android 10, but mainly used the last one. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |