Windows Phone 8.1 Connect to Pebble via Bluetooth Rfcomm

1

I have a problem when I trying to connect with pebble watch via bluetooth. This is my code:

var serviceId = Guid.Parse("00001101-0000-1000-8000-00805F9B34FB").ToString("B");
PeerFinder.Start();
PeerFinder.AlternateIdentities["Bluetooth:Paired"] = "";
var pairedDevices = await PeerFinder.FindAllPeersAsync();
PeerInformation selectedPeer = pairedDevices[0];
var streamSocket = new StreamSocket();
await streamSocket.ConnectAsync(selectedPeer.HostName, serviceId);

Also in manifest:

<Capabilities>
    <Capability Name="internetClientServer" />
    <Capability Name="privateNetworkClientServer" />
    <DeviceCapability Name="proximity" />
    <m2:DeviceCapability Name="bluetooth.rfcomm">
        <m2:Device Id="any">
            <m2:Function Type="serviceId:00001101-0000-1000-8000-00805F9B34FB"/>
        </m2:Device>
    </m2:DeviceCapability>
</Capabilities>

So the exception throws in await streamSocket.ConnectAsync(selectedPeer.HostName, serviceId);.

Exception: Element not found. (Exception from HRESULT: 0x80070490)

I have already seen same questions but I didn't find a solution of the problem.

  • Windows Phone 8.1
    Lumia 929
  • Pebble AF57
    Firmware v2.9

Thanks.

c#
bluetooth
windows-phone-8.1
pebble-watch
asked on Stack Overflow Feb 15, 2015 by rut4

1 Answer

1

I found a solution, just replace service id by 00000000-deca-fade-deca-deafdecacaff

answered on Stack Overflow Feb 15, 2015 by rut4

User contributions licensed under CC BY-SA 3.0