Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WiFi-Direct P2P Service Discovery with Windows 10 and Android - possible?

I'm writing a mobile app that will be a remote control for a PC application. What I want to do is couple them using WiFi Direct.

I read about the P2P Service Discovery feature, that allows me to look only straight for devices running a certain service (and not for all of the available WiFi Direct devices).

On the Android side I implemented it using these tips: https://developer.android.com/training/connect-devices-wirelessly/nsd-wifi-direct.html

On the Windows side I'm running this app: https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/WiFiDirectServices Unfortunately in case of the PC side, I'm not even able to start advertising my service - the Advertisement Status is automatically set to 'Aborted' just after trying to launch it.

1) Is that at all possible to couple a Windows application with the WiFi P2P NSD feature provided by Android devices? (asking if I should waste my time)

2) Is that possible for a Windows PC to support P2P Service Discovery? Here the issue of system capabilities is discussed; in case of my PC WiFi Direct is supported, and none of P2P Discovery features are. Is there any way to make it support it, either hardware or software?

like image 923
Kacper Kosikowski Avatar asked Jan 11 '17 14:01

Kacper Kosikowski


2 Answers

WifiDirect works atleast over Windows 10 & 8.1 in UWP apps using PeerFinder library. However using this lib you can perform discovery either PC to PC OR mobile to mobile NOT PC to mobile or vice versa.

But note that It is PeerFinder library limitation NOT wifi-direct. You still can use underlying wifi-direct libraries for advertisement & discovery. It is possible and i have tested this atleast between window desktop app & windows mobile (NOT with Android).

like image 71
Shashi Bhushan Avatar answered Sep 23 '22 06:09

Shashi Bhushan


About this problem: Advertisement Status is automatically set to 'Aborted' I ran into the same issue. The problem was, in my case when I specified a PREFIX (Publsh Prefix: xxx ). If you enter only the service name and leave all the options in their default value, and NOI prefix, the service starts running and advertises as expected.

If you want to use prefixes you need to use the correct syntax for the prefix. Let say you want to have several services in your server, then use the following syntax for each service: MyServer.Service1 MyServer.Service2, etc. (the period separating the words is part of the service name). THEN your prefix should be MyServer.

That was the answer in my case, but I am still struggling to get the systems to connect and do some actual work for me .... :(.

like image 22
Guillermo Avatar answered Sep 20 '22 06:09

Guillermo