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?
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).
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 .... :(.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With