The SSID and IP address of Wi-Fi Direct

zhangyp 1 Reputation point
2022-10-31T03:11:30.543+00:00

Hi dear,

I am building a windows APP with wifi-direct connection, according to the code sample.
The code sample works fine while I still have some issues.

  1. Is there any way to set/get the ssid of wifi direct(NOT legacy mode) ?
    In the API of WiFiDirectAdvertisement/WiFiDirectAdvertisementPublisher, I cannot find any description about SSID or NAME. Working on my x86 based PC, the SSID seems same with the computer's name, so the SSID should be it? or any other API can do it?
  2. After starting wifi-direct (local as the group owner), the physical adapter shall be working. Is there any way to get the MAC or IP address of this adapter? In the code sample, we can get that only when handling connection from other device via WiFiDirectDevice class. According to this issue, we cannot choose a specfic adapter, so I guess the workaround is not in the wifi-direct namespace?
  3. For some class, such as WiFiDirectAdvertisementPublisher, there is still a IWiFiDirectAdvertisementPublisher in the same namespace. So what's the difference between them? Might be just in difference coding language winrt or wrl?
Developer technologies | Universal Windows Platform (UWP)
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Junjie Zhu - MSFT 21,646 Reputation points
    2022-10-31T10:13:14.237+00:00

    Hello @zhangyp ,
    Welcome to Microsoft Q&A!

    Is there any way to set/get the ssid of wifi direct(NOT legacy mode) ?

    In non-legacy mode, there is no UWP API you want.

    Is there any way to get the MAC or IP address of this adapter?

    As Roy said in that issue, in UWP there is currently no such API provided.

    what's the difference between WiFiDirectAdvertisementPublisher and IWiFiDirectAdvertisementPublisher ?

    In Windows.Devices.WiFiDirect Namespace, I don't see IWiFiDirectAdvertisementPublisher, where did you find it?

    Thank you.
    Junjie


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.