WinRT WiFiDirect band selection.

Francois Guimond 46 Reputation points
2022-10-31T15:49:18.067+00:00

I am building a device that connect to a Windows surface pro using WinRT WifiDirect API. https://learn.microsoft.com/en-us/uwp/api/windows.devices.wifidirect?view=winrt-22621
My device is limited to 2.4Ghz band for Wifi. I noticed sometimes the WiFiDirectConnectionListener start on the 5Ghz band then obviously my device cannot connect.

This thread initially suggest to modify the Wireless Adapter preferred band (https://answers.microsoft.com/en-us/windows/forum/all/choosing-wifi-direct-connection-mode-axabgnac-on/146388ce-215b-467a-a707-0210225a19e6)

Disabling the surface pro 5Ghz so the WiFiDirect run on 2.4Ghz is a brute force solution that I would like to avoid.

The mobile hotspot feature of windows allow network band selection without changing device properties: settings -> network& internet ->Mobile Hotspot -> properties ->edit ->Network band)

In the same previously mentioned thread suggest I should be able to select Network band for my WiFiDirect virtual adapter: "We have replicated this concern here in our end, and found out that we can only change the band but not the wireless mode in Windows since it is assigned automatically."

How can I select the Network band using WinRT WifiDirect API? ( or other )

Universal Windows Platform (UWP)
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,387 questions
0 comments No comments
{count} votes

Accepted answer
  1. Junjie Zhu - MSFT 13,971 Reputation points Microsoft Vendor
    2022-11-01T08:35:11.1+00:00

    Hello @Francois Guimond ,
    Welcome to Microsoft Q&A!

    There is currently no related API that can modify the Network band in WinRT.
    If your device(Windows surface pro) supports dual-band output, you can use different ssid to output 2.4Ghz network and 5Ghz network independently.

    Thank you.
    Junjie


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful