Windows Phone 8 -> Windows 8 Desktop connection

Topics: Bluetooth - Microsoft, Bluetooth - Windows Phone 8
Dec 14, 2012 at 10:56 PM

I'm trying to write a program that will connect from a Windows Phone 8 device to a Windows 8 desktop application using Bluetooth.

For the Windows 8 desktop application I am using the Chat2Desktop sample as the model. Essentially my code is identical to that in the sample, where starting the application spins up a listener runner that sits and waits for incoming connections.

From the Windows 8 Phone side I am using the new PeerFinder API to discover the desktop machine, which works fine. I'm then using that to create a StreamSocket connection via ConnectASync. 

Here's where it gets interesting. On my Macbook Air running Windows 8 (natively, not through VMWare) this works absolutely flawlessly. However, on a Lenovo machine I get the following exception on the ConnectASync call:

System.Exception: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (Exception from HRESULT: 0x8007274C)

From the debugger I can tell that on the Windows 8 Desktop side, there is no indication of a connection request coming in to my application.

The Lenovo machine was using a Broadcom stack, but after I updated the driver it is now running a Microsoft stack. Changing that did not make a difference. For what it's worth the devices are paired.

Any ideas on why this works on one machine but not on the other would be greatly appreciated. Thanks.

Dec 15, 2012 at 12:13 PM

Good to hear that the Bluetooth support in Windows Phone 8 and useful and is being used.

So that message says that the Bluetooth connection itself couldn't be made and not that the upper-layer connection failed in some way.

Do connections work between the chat applications on the two PCs? Try in both directions and see what occurs.

> For what it's worth the devices are paired.

The phone is paired with the Lenovo machine?