3-98 Wi-Fi Direct & Wi-Fi Direct Services API

3-98 Wi-Fi Direct & Wi-Fi Direct Services API

3-98 Wi-Fi Direct & Wi-Fi Direct Services API Yatharth Gupta, Senior Program Manager Vishal Mhatre, Software Engineer Agenda Click icon to add picture

Intro to Wi-Fi Direct & Services What can do you this ? Whats new in Windows 10

Demo Walkthrough & Debugging Intro to Wi-Fi Direct & Wi-Fi Direct Services A mechanism that allows for PCs, Phones & Devices to connect & communicate directly with each other Does not the devices to be connected to the same or any network

Provides a high bandwidth transport for bi-directional data exchange Not just 1:1, can support multiple devices What can you do with Wi-Fi Direct & Services ?

Games Remote Control Devices Utility Application Wi-Fi Direct & Wi-Fi Direct Services Both are standards based Wi-Fi Direct finds Devices while Services can help find an Application running on the Device Existing Devices support

Wi-Fi Direct, Services is new What is new in Window 10 Wi-Fi Direct Services introduced in Windows 10 An updated and more powerful API set for both Wi-Fi Direct and addition of

Wi-Fi Direct Services Flexible and Powerful API Apps control experience, while Windows allows users to be in control Find, Pair, Connect & Communicate from within your Application

Bi-directional : supports both seeking and advertising as a service or Wi-Fi Direct device Flexible & Powerful API Application can send custom information to other devices before connecting using Information Elements

Applications can start a Legacy AP for interop with old devices Low level control such as setting the group owner intent Demo Wi-Fi Direct Advertiser // Create an Advertisement Publisher var publisher = new WiFiDirectAdvertisementPublisher();

// Turn on Listen state publisher.Advertisement.ListenStateDiscoverability = WiFiDirectAdvertisementListenStateDiscoverability.Normal; // Register for connection requests var listener = new WiFiDirectConnectionListener(); listener.ConnectionRequested += OnConnectionRequested; // Start the advertiser publisher.Start(); Wi-Fi Direct Connector String deviceSelector =

WiFiDirectDevice.GetDeviceSelector(WiFiDirectDeviceSelectorType.AssociationEndpoint); // Get all WiFiDirect devices that are advertising and in range DeviceInformationCollection devInfoCollection = await DeviceInformation.FindAllAsync(deviceSelector); // Connection parameters GO Intent WiFiDirectConnectionParameters connectionParams = new WiFiDirectConnectionParameters(); connectionParams.GroupOwnerIntent = 1; // Connect to the WiFiDirect device String deviceId = devInfoCollection[0].Id; var wfdDevice = await WiFiDirectDevice.FromIdAsync(deviceId, connectionParams); // Get the local and remote IP addresses var EndpointPairs = wfdDevice.GetConnectionEndpointPairs();

// Establish standard WinRT socket with above IP addresses Wi-Fi Direct Accept incoming connection private async void OnConnectionRequested(WiFiDirectConnectionListener sender, WiFiDirectConnectionRequestedEventArgs args) { var ConnectionRequest = args.GetConnectionRequest(); // Prompt the user to accept/reject the connection request // If rejected, exit

// Connect to the remote device WiFiDirectDevice wfdDevice = await WiFiDirectDevice.FromIdAsync(ConnectionRequest.DeviceInformation.Id); // Get the local and remote IP addresses var EndpointPairs = wfdDevice.GetConnectionEndpointPairs(); // Establish standard WinRT socket with above IP addresses } Wi-Fi Direct Services Advertiser // Create a Service Advertiser WiFiDirectServiceAdvertiser Advertiser = new WiFiDirectServiceAdvertiser(ServiceName); // Register for session requests from Seeker(s)

Advertiser.SessionRequested += OnSessionrequested; // Start the advertiser Advertiser.Start(); Wi-Fi Direct Services Service Seeker string ServiceSelector = WiFiDirectService.GetSelector(ServiceName); // Get all WiFiDirect services that are advertising and in range DeviceInformationCollection devInfoCollection = await DeviceInformation.FindAllAsync(ServiceSelector); // Get a Service Seeker object WiFiDirectService Service = await WiFiDirectService.FromIdAsync(devInfoCollection[0].Id); // Connect to the Advertiser

WiFiDirectServiceSession Session = await Service.ConnectAsync(); // Get the local and remote IP addresses var EndpointPairs = Session.GetConnectionEndpointPairs(); // Establish a standard WinRT socket with above IP addresses Wi-Fi Direct Services Accepting connections private async void OnSessionrequested(WiFiDirectServiceAdvertiser sender, WiFiDirectServiceSessionRequestedEventArgs args) { // Get the Session Request object

WiFiDirectServiceSessionRequest sessionRequest = args.GetSessionRequest(); // Retrieve DeviceInformation from the Session Request DeviceInformation deviceInfo = sessionRequest.DeviceInformation; // Accept the session request from Service Seeker WiFiDirectServiceSession Session = await sender.ConnectAsync(deviceInfo); // Get the local and remote IP addresses var EndpointPairs = Session.GetConnectionEndpointPairs(); // Establish a standard WinRT socket with above IP addresses } Debugging

Click icon to add picture How to check if your Windows 10 PC supports Wi-Fi Direct & Services c:\> netsh wlan show wirelesscap

A Wireless Sniffer is your best friend Example of a Sniffer capture for Wi-Fi Direct Recap Wi-Fi Direct & Wi-Fi Direct Services are a Industry Standard Wi-Fi Direct & Services allow you to build applications that talk to other PCs or Devices directly

Games, Utilities & Application to control devices can be built using this technology. What other interesting things can you build ? Standards Definition is available from Wi-Fi Alliance API Documentation will be available shortly on MSDN 2015 Microsoft Corporation. All rights reserved.

Recently Viewed Presentations

  •  2014 by McGraw-Hill Education. This is proprietary material

    2014 by McGraw-Hill Education. This is proprietary material

    Nikon, for example, relies on UPS for distribution. LO 1-4. In order to minimize costs or provide better quality, firms frequently hire other firms to help in particular aspects of their business. A common example is the use of shipping...
  • Btec First Diploma in Sport

    Btec First Diploma in Sport

    P5 - interpret their test results and personal level of fitness. M2 - explain their test results and personal level of fitness, identifying strengths and areas for improvement. D1 - evaluate their test results and personal level of fitness, considering...
  • 幻灯片 1

    幻灯片 1

    If you have any pay related query you can access the HR Portal through the icon on your computer desktop. Alternatively you can contact ext 81700. Study Leave is available to Junior Doctors (excluding F1s). As a guide, junior doctors...
  • Osmosis Practice Problems - Troup County School District

    Osmosis Practice Problems - Troup County School District

    #7. Inside one osmosis bag*, A, is a 50% glucose solution and inside bag B is a 20% glucose solution. Both bags are put into beakers containing 100% water.
  • FCAT Short and Extended Responses

    FCAT Short and Extended Responses

    The student has provided a response that is accurate, complete, and fulfills all the requirements of the task.; Necessary support (TEXT BASED DETAILS) examples are included, and the information is clearly text-based. 30 The Mona Lisa has been kept in...
  • OBJECTIVE QUESTIONS FOR NEET AIIMS JIPMER www.wisedane.com BIOLOGY

    OBJECTIVE QUESTIONS FOR NEET AIIMS JIPMER www.wisedane.com BIOLOGY

    ANSWER (C) EXPLANATION. Invasive species- An invasive species is a plant, fungus, or animal species that is not native to a specific location (an introduced species), and which has a tendency to spread to a degree believed to cause damage...
  • Coil Building - Art Smart

    Coil Building - Art Smart

    Wedge Clay. WEDGE YOUR CLAY - this will homogenize the clay and get any air bubbles out of the clay. Make Slab . Make a base using the slab method. Base should be about the thickness of your pinky finger....
  • The Crucible - 2017-2018 Kroll Patrol English

    The Crucible - 2017-2018 Kroll Patrol English

    General quotes and information Authority The authority of the church is supreme and if church members don't obey the minister, chaos will ensue, and the church will be destroyed. Reverend Parris Reverend Hale Authority Individual conscience is the final authority,...