android - Wi-Fi Direct and "normal" Wi-Fi - Different MAC? -
i'm trying connect 2 phones know each other's mac address via wi-fi direct, , stumbled upon following problem: mac address, receive
wifimanager wifiman = (wifimanager) .getsystemservice(context.wifi_service); wifiinfo wifiinf = wifiman.getconnectioninfo(); mac_address = wifiinf.getmacaddress();
is different 1 receive wifip2pmanager
when discovering , requesting peers. example: a0:xx:xx:...
turns a2:xx:xx....
know why? did not find way "wi-fi direct mac address", , thought mac address should unique, , it's same wi-fi module handles both (normal wi-fi , p2p/direct). weird.. should do? 2 devices (galaxy nexus) i've got, it's first 2 characters differ in mac addresses - should discard them? probability encounter problems (two devices differ in first part of mac address) high?
thanks.
reading mac address on wikipedia.
addresses can either universally administered addresses or locally administered addresses.
universally administered , locally administered addresses distinguished setting second-least-significant bit of significant byte of address. bit referred u/l bit, short universal/local, identifies how address administered. if bit 0, address universally administered. if 1, address locally administered.
since wi-fi direct stack on top of mac, should check bit can mean it. i've found mail discussion shedding light on this. apparently quote below wfa spec.
the p2p device shall assign p2p interface address, corresponding format described in §7.1.3.3.1 of ieee std 802.11‑2007 1, used communicate p2p group owner or clients within p2p group. a p2p interface address not required globally unique , may locally administered. p2p interface address may same p2p device address provided requirements p2p interface address in clause satisfied.
so believe answer question is, shouldn't take mac address wifimanager
, use wi-fi p2p
connections.
Comments
Post a Comment