BSSID, a special Ad-hoc LAN application, also known as basic Service set (BSS), a group of computers that set the same BSS name can be self-formed. Each BSS is given a bssid, which is a 48-bit binary identifier used to identify different BSS. Its main advantage is that it can be used as a filter.
BSSID refers to the MAC address of the site, (STA) in an access point, (AP) in an infrastructure mode, and BSS is defined by the IEEE 802.11-1999 Wireless LAN specification. Each BSS is uniquely defined in this area. In a IBSS, BSSID is a locally administered IEEE MAC address that is generated from an arbitrary 46-bit encoding. The individual/group bit of the address is set to 0. The universal/local address bit is set to 1.
The above words from Baidu Encyclopedia.
It was developed in order to get the MAC address of the hotspot that the phone is connected to, so it has been the API or method to find the WiFi MAC address, but it didn't succeed.
Lanidentifier Class
The location data can be represented as BSSID (if the network adapter media type is wireless LAN), or not for tuple <chassisid, Port number> (if the network adapter type is Ethernet). Data is represented according to the LLDP protocol.
For an example of how to retrieve the data represented by the lanidentifier object, see how to retrieve network adapters and location information.
Just stick to the code.
stringGetlanidentifierdata (Lanidentifier lanidentifier) {stringLanidentifierdata =string. Empty; if(Lanidentifier = =NULL) { returnLanidentifierdata; } if(Lanidentifier.infrastructureid! =NULL) {Lanidentifierdata+="Infrastructure Type:"+ LanIdentifier.InfrastructureId.Type +"\ n"; Lanidentifierdata+="Infrastructure Value:"; varInfrastructureidvalue =LanIdentifier.InfrastructureId.Value; foreach(varValueinchinfrastructureidvalue) {Lanidentifierdata+ = value +" "; } } if(Lanidentifier.portid! =NULL) {Lanidentifierdata+="\nport Type:"+ LanIdentifier.PortId.Type +"\ n"; Lanidentifierdata+="Port Value:"; varPortidvalue =LanIdentifier.PortId.Value; foreach(varValueinchportidvalue) {Lanidentifierdata+ = value +" "; } } if(Lanidentifier.networkadapterid! =NULL) {Lanidentifierdata+="\nnetwork Adapter Id:"+ Lanidentifier.networkadapterid +"\ n"; } returnLanidentifierdata; }
One of the LanIdentifier.InfrastructureId.Value is BSSID, which needs to be taken out and converted into 16.
for (int0; i < lanIdentifier.InfrastructureId.Value.Count; i++)
+ = Lanidentifier.infrastructureid.value[i]. ToString ("X2");}
This is bssid, at least the value I get is the same as the value the iphone gets.
In addition,ireadonlylist<lanidentifier> lanidentifiers = Networkinformation.getlanidentifiers (); Windows 8 is also supported.
Hope to help you.
Windows phone get WiFi BSSID