Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simultaneous communication with many Windows/Windows Phone 8 devices using Proximity API

Is it possible to make an application that provide communication between one Windows 8 (as a server for example) device and 'n' (> 1) Windows Phone 8 devices using the Windows 8/Windows Phone 8 Proximity APIs?

[Edit] I mean simultaneously and using NFC to establish the connection and Wi-Fi or Bluetooth for data exchange.

According to this article : http://msdn.microsoft.com/en-us/library/windows/apps/br241210.aspx, Wi-Fi Direct is not supported on Windows Phone 8. What does it really mean? Between 2 Windows Phone 8 Devices?

I think it would work according to the MSDN library : http://msdn.microsoft.com/en-us/library/windows/apps/jj207060.aspx

This scenario works with Windows Phone 8 and Windows 8 devices. When a tap succeeds, you get back a socket that you can communicate with the other device. On Windows Phone 8, this socket is established on either a TCP/IP (Wi-Fi) connection or a Bluetooth connection.

Any ideas?

like image 668
Antoine Diekmann Avatar asked Jan 17 '13 12:01

Antoine Diekmann


2 Answers

I have made some tests with several devices and what I can say is the following.

A W8 device and a WP8 device can only communicate if the 2 devices are NFC capable.

Indeed, Peer Browsing is not supported between W8 et WP8 (according to my tests). But once the NFC connection established the W8 and the WP8 can keep the connection using Bluetooth so the NFC connector can be released (NFC does not support multiple simultaneous connections).

You can keep several live connections between a W8 device and other devices (W8, WP8).

What I achieve to do is:

  • 1 W8 (NFC) tablet hosting connections.
  • 1 W8 PC (without NFC) that connects to the W8 tablet using Peer Browsing (Direct Wifi).
  • 2 WP8 connecting to the W8 tablet using NFC and Bluetooth.

The hosting device can keep a socket per connected device. You just need to manage all the sockets to receive and send data.

like image 199
polkduran Avatar answered Oct 04 '22 11:10

polkduran


Yes, you can communicate between Windows Phone 8 and Windows 8 using the proximity framework.

On WP8 you'll need to set the following AlternateIdentity to your Win8 App full name:

PeerFinder.AlternateIdentities.Add("Windows", "<your Win8 app package family name>!<your app WP8 app ID");
// e.g. 
PeerFinder.AlternateIdentities.Add("Windows", "NORADPublicAffairs.NORADTracksSanta_1.0.0.26_x64__bzcj0d5cg39gj");

On Win8 you'll need to set the following AlternateIDentity to your WP8 app GUID:

PeerFinder.AlternateIdentities["WindowsPhone"] = "{<your app GUID>}"
// e.g. 
PeerFinder.AlternateIdentities["WindowsPhone"] = "{5b7ba36b-04fc-df11-9264-00237de2db9e}"

You can then use the proximity framework on both WP8 and Win8 to communicate with each other. NFC can be used to initiate a socket between WP8<->Win8 which should then use either Bluetooth or TCP/IP as the communication layer.

like image 24
JustinAngel Avatar answered Oct 04 '22 10:10

JustinAngel