locked
The connection was refused. HRESULT: 0x8063010B BluetoothLE device

    Question

  • When I am try to connect a device that have been found. It crash when I am trying to connect to it.

                                    PeerFinder.Start();
    				PeerFinder.AlternateIdentities["Bluetooth:Paired"] = "";
    				var pairedDevices = await PeerFinder.FindAllPeersAsync();
    
    				if (pairedDevices.Count == 0)
    				{
    					// nothing is find on there
    				}
    				else
    				{
    					try
    					{
    
    						PeerInformation selectedDevice = pairedDevices[0];
    						StreamSocket socket = await PeerFinder.ConnectAsync(selectedDevice);
    						
    					}
    					catch (Exception erro)
    					{
    						var stack = erro.StackTrace;
    					}
    				}

    It fails on the line 

    PeerFinder.ConnectAsync

    Message: The connection is refused.

    The connection was refused. (Exception from HRESULT: 0x8063010B)
     

    What could be wrong?

    BR


    Jiajun Qiu

    Wednesday, September 17, 2014 3:52 PM

All replies

  • What kind of device are you connecting to?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, September 18, 2014 1:13 PM
    Moderator
  • Hi Matt

    I am developing a app that connect Lumia 930 to a Heart rate monitor

    Later I found out the connection step might not needed, I can receive the Heart Rate data after I did the 

    PeerFinder.FindAllPeersAsync() step.

    Perhaps in BLE4.0 GATT not needed? 

    BR


    Jiajun Qiu

    Monday, September 22, 2014 7:00 AM
  • If it works without that step, then I think you're in luck. Glad to hear it.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Monday, September 22, 2014 1:43 PM
    Moderator