I\'m currently trying to connect two phones which know each other\'s MAC address via Wi-Fi Direct, and stumbled upon the following problem: The MAC address, which I receive
Reading about the MAC address on wikipedia.
Addresses can either be universally administered addresses or locally administered addresses.
Universally administered and locally administered addresses are distinguished by setting the second-least-significant bit of the most significant byte of the address. This bit is also referred to as the U/L bit, short for Universal/Local, which identifies how the address is administered. If the bit is 0, the address is universally administered. If it is 1, the address is locally administered.
Since Wi-Fi Direct is just another stack on top of MAC, you should also check what that bit can mean for it. I've found some mail discussion shedding some light on this. Apparently quote below is from a WFA spec.
The P2P Device shall assign a P2P Interface Address, corresponding to the format as described in §7.1.3.3.1 of IEEE Std 802.11‑2007 1, which is used to communicate with the P2P Group Owner or Clients within a P2P Group. A P2P Interface Address is not required to be globally unique and may be locally administered. A P2P Interface Address may be the same as the P2P Device Address provided the requirements for P2P Interface Address in this clause are satisfied.
So I believe answer to this question is, you shouldn't take MAC address from WifiManager
and use it with Wi-Fi P2P
connections.