Click here to Skip to main content
15,884,933 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello,

my device uses bluetooth le 4 for communication.
although my device appears as paired in device manager, it's not assigned a port.

my developing enviroment: win8 visual studio 2015

i'm using DeviceInformation.FindAllAsync to locate my device,
but GattDeviceService.FromIdAsync fails.

var devices = await DeviceInformation.FindAllAsync(
GattDeviceService.GetDeviceSelectorFromUuid(GattServiceUuids.GenericAccess),
                new string[] { "System.Devices.ContainerId" });

            if (devices.Count > 0)
            {
                GattDeviceService svr = null;
                foreach (var device in devices)
                {
                    svr = await GattDeviceService.FromIdAsync(device.Id);

                }
            }



i specified the device capabilities:

<Capabilities>
    <m2:DeviceCapability Name="bluetooth.rfcomm">
      <m2:Device Id="any">
        <m2:Function Type="name:serialPort"/>
      </m2:Device>
    </m2:DeviceCapability>
  </Capabilities>



is there anything i should add?
is there a different way of accessing the problem?


thanks

What I have tried:

Tried using Microsoft Bluetooth Low Energy Functions unsuccessfuly
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900