Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for random P2P device MAC in wpa_supplicant #57

Open
mraliec opened this issue Apr 2, 2020 · 0 comments
Open

Workaround for random P2P device MAC in wpa_supplicant #57

mraliec opened this issue Apr 2, 2020 · 0 comments

Comments

@mraliec
Copy link

mraliec commented Apr 2, 2020

Download wpa_supplicant source as described in command.txt

Edit p2p_supplicant.c function wpas_p2p_mac_setup
After:
u8 addr[ETH_ALEN] = {0};
Add two lines:
os_memcpy(wpa_s->own_addr, wpa_s->conf->p2p_device_persistent_mac_addr, ETH_ALEN);
os_memcpy(wpa_s->global->p2p_dev_addr, wpa_s->conf->p2p_device_persistent_mac_addr, ETH_ALEN);

Add following option to wpa_supplicant.conf
p2p_device_persistent_mac_addr= wanted mac address

Now P2P Go device always = p2p_device_persistent_mac_addr
For example my conf:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=0
country=US
persistent_reconnect=1
p2p_device_persistent_mac_addr=3e:50:84:9d:7e:11
mac_addr=0
p2p_interface_random_mac_addr=0
network={
ssid="DIRECT-AO"
bssid=3e:50:84:9d:7e:a5
psk="yrf6u5IC"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
mode=3
disabled=2
}

@homeworkc homeworkc pinned this issue Sep 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant