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

2

6

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?

Conferva answered 17/1, 2013 at 12:6 Comment(0)
E
4

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.

Epanaphora answered 27/3, 2013 at 18:32 Comment(1)
Browsing is not supported because Windows browse currently only supports WFD and Windows Phone browse currently only supports Bluetooth. The NFC "tapping" supports other transports.Idzik
B
1

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.

Bacteriophage answered 17/1, 2013 at 18:15 Comment(2)
Hello Justin, thank you for your answer. However I still want to know if a Windows 8 apps can keep many sockets opened simultaneously with 2 or more Windows Phone 8 devices ?Conferva
@Justin thank you for the answer, does this answer apply to windows phone 8.1 and windows 8.1 device pairing? If so do you know of any sample code that connects windows phone 8.1 to Windows - I tried adding your suggestion to code here code.msdn.microsoft.com/windowsapps/Proximity-Sample-88129731 yet I could not get it to work.Benefaction

© 2022 - 2024 — McMap. All rights reserved.