This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Discover nRF51822 in Windows .NET C# Application

Dear Sirs I am new with Nordic BLE Modules. After successuful pairing with Windows 8.1 in a Tablet I need to get an active Service. For example I would like to obtain Battery (BAS) Service. As I readed from Nordic Specification, that has to be make with the properly UUID for that Service, that is described as 0x180F. In C# Application I use 16 Byte UUID for this case and this is:

byte [] uuid = { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x0F }

Than I use the class GenericAttributeProfile from .NET in order to search for that service:

string selector = GattDeviceService.GetDeviceSelectorFromUiid(new Guid(uuid)); var devices = await DeviceInformation.FindAllAsync(selector); .......

devices comes always empty, although that the device is paired with the Tablet (Windows 8.1) Probably I have to use another type for Guid (UUID) or I make another mistake. Any answers are wlcome. Thank You very much.

Parents
  • The complete battery service uuid is 0000180f-0000-1000-8000-00805f9b34fb according to the Bluetooth specification.

    And there is not necessary to construct the uuid in code. In windows runtime library there is a Class called “GattServiceUuids” which gives you correct uuid.

    Edit 19.01.2015: Have you tried this example? I'm not an Windows 8 expert, but maybe it is a good starting point for implementing a battery service?

Reply
  • The complete battery service uuid is 0000180f-0000-1000-8000-00805f9b34fb according to the Bluetooth specification.

    And there is not necessary to construct the uuid in code. In windows runtime library there is a Class called “GattServiceUuids” which gives you correct uuid.

    Edit 19.01.2015: Have you tried this example? I'm not an Windows 8 expert, but maybe it is a good starting point for implementing a battery service?

Children
Related