ManagedNativeWifi icon indicating copy to clipboard operation
ManagedNativeWifi copied to clipboard

If physicaladdress BSSID is not equal to null, the connection cannot be successful

Open dzx815 opened this issue 4 years ago • 3 comments

bool result = NativeWifi.ConnectNetwork( interfaceId: interfaceInfo.Id, profileName: ssid, bssType: BssType.Infrastructure, System.Net.NetworkInformation.PhysicalAddress.Parse("78:9C:E7:A0:C8:56") );

dzx815 avatar Oct 26 '21 07:10 dzx815

Could you add some more explanation?

emoacht avatar Oct 26 '21 12:10 emoacht

Code1: bool result = NativeWifi.ConnectNetwork( interfaceId: interfaceInfo.Id, profileName: ssid, bssType: BssType.Infrastructure, System.Net.NetworkInformation.PhysicalAddress.Parse("78:9C:E7:A0:C8:56") );

Code2: bool result = NativeWifi.ConnectNetwork( interfaceId: interfaceInfo.Id, profileName: ssid, bssType: BssType.Infrastructure, null );

Both pieces of code return true, but the last thing that can be connected is Code 2.

If I understand correctly, the BSSID should be the physical address of the AP. I have tried the physical address of the wireless network card of the computer itself and the physical address of the AP, but the connection cannot succeed.

dzx815 avatar Oct 26 '21 13:10 dzx815

Moreover, the return of true in this function 'NativeWifi.ConnectNetwork' does not mean that the WiFi connection is ready. I still need to judge the connection status of the WiFi adapter to judge whether the connection is successful.

dzx815 avatar Oct 26 '21 13:10 dzx815