Unable to find BLE heartrate service devices using DeviceInformation.FindAllAsync in Windows 8.1 - windows-8.1

I am running BLE heart rate client side sample application.
A BLE server with HRS service is paired before running the app.
Now, when I run the app the number of devices enumerated using FindAllAsync using the statement
var devices = await DeviceInformation.FindAllAsync(
GattDeviceService.GetDeviceSelectorFromUuid(GattServiceUuids.HeartRate),
new string[] { "System.Devices.ContainerId" });
is 0.
However when I try finding all the devices using
var devices = await DeviceInformation.FindAllAsync();
My BLE device with HeatRate service is listed.
How can I short list the BLE device among all the Devices?

It was a issue with driver.
My laptop did not have Windows LE enumerator.
I am able to find devices using FindAllAsync after I switched to a laptop with Windows LE enumerator

Related

How to find the connected device after BLE scan

When performing a BLE scan using startScan(onFoundBLEDevice, onBLEScanError). First, is the parameter sent to onFoundBLEDevice a single device or is it a list of devices? And if the answer is "single device" what happens when there is more than one BLE device in the local vicinity when performing the scan?
Secondly, Since my goal is to retrieve the battery level from my own smartphone (the one that is paired AND connected to my smartwatch) how can I tell which of the devices found by my scan is the one that's connected? Or do I even need to perform a scan? Is there another way to retrieve the device object in order to then get the battery service 0x180F and then the battery level characteristic, 0x2a19? In other words, I want to be sure that the battery level I retrieve is that of my phone, not my buddies sitting next to me.
UPDATE: my smartphone is a Samsung Galaxy S3 running Android 4.3 and my smartwatch is a Samsung Gear S2 running Tizen 2.3.1. I'm using Tizen Bluetooth API.
The BluetoothLEScanCallback (In your case onFoundBLEDevice) is invoked everytime a device is found. (For 3 nearby devices -> 3 calls)
I've scanned nearby devices from my gear while it's connected with a Mobile through 'Samsung Gear' app. No, There's no way to distinguish specific Mobile connected via Gear Manager from other devices. So, You can't find the connected device in this procedure. (Unless you are developing the app for personal use, In that case you can hardcode your Mobile device's UUID)
Samsung Provides 'Accessory' SDK for such purposes.
Samsung Accessory SDK
Any data you exchange using Accessory SDK would provide you info of specific 'The Connected' device via Samsung Gear. Check Out the API References, Programming Guides and Android-End Sample apps and Tizen-End Sample apps in Accessory SDK section.

Bluetooth LE device stopped connecting in Windows 10 v1709

I've created a WDK library for interacting with a Bluetooth LE device (closly following the example here). The library worked well on a previous version of Windows - I was able to connect to my device, write characteristics and get asynchronous notifications. Once I updated to Windows to version 1709 (build 16299.98), the library stopped working:
pair the device via Settings-->Devices-->Bluetooth
the BLE device blinks a led as an indication of Advertising
Run my application which uses aforesaid library
Once the application opens the paired device's handle (using hDevice = CreateFile(pInterfaceDetailData->DevicePath, GENERIC_WRITE | GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);), the device blinks spasmodically, indicating that it connects and disconnects very fast.
Sometimes, after several long seconds, the device has solid light, indicating it is connected (the status in Windows Settings is also 'Connected')
Any access to the device from my code (e.g. by calling BluetoothGATTSetDescriptorValue() to enable BLE notification), fails with a timeout (ERROR_SEM_TIMEOUT))
For some reason, first-time pairing with the device does not exhibit these symptoms.
Any ideas?
If its relevant, my local Bluetooth device is Qualcom Atheros USB module (VID_0489&PID_E076&REV_0001).
This was an issue with Windows 10, resolved in KB4054517

MIT App Inventor Bluetooth connect with unpaired device

I am using MIT App Inventor 2 to do some bluetooth connection. I am trying to connect to my Arduino Bluetooth hc05.
I noticed that if I didn't pair my device, the app I wrote can't connect to the device.
Below is the code that I used to connect to my Bluetooth device.
Is there any way to use the code to connect with the Bluetooth device without having to pair it first?
Or is there any way to use the code to input the pairing password using MIT App Inventor 2?
The devices must be paired before being able to connect.
There is no Pairing method available in the App Inventor Bluetooth components. But you could write your own extension, which does the pairing.
More information about how to create an extension see here.
However that will be more advanced and will require some Java skills...

How can I send an advertisement from the Genuino and connect to the Galileo via Bluetooth?

I'm trying to send data via bluetooth from an Intel Genuino to an Intel Galileo. The Galileo will act as the Master node in this connection. I have configured the Galileo so that it is discovering bluetooth devices and I have paired my phone to the Galileo via bluetooth.
What I need to do is pair the Genuino with the Galileo. I have tried some of the sample programs that Arduino provides but I cant seem to pair or connect the two devices.
So the question is, if I have my Galileo discoverable and ready to pair, how can I send an advertisement from the Genuino and connect to the Galileo.
Alternatively: if anybody has a link to a site that explains the blePeripheral and bleCentral commands, that would be great.
Cheers
On the Arduino/Genuino 101 board, use CurieBle to create a peripheral. There are some example sketches to get you started. CurieBle works very similar to the Arduino BLEPeripheral library.
You don't need to pair devices. On the Genuino 101, run the sketch that creates the Bluetooth LE Service. On the Galileo, run a program that discovers service running on the 101 and connects to it. You can write the program for the Galileo using noble and Node.js.

Can PeerFinder class of .NET communicate with mobile phone devices through laptop via bluetooth?

I doubt the limitation of PeerFinder class in .NET. Can it make connection only with other laptops when implemented on laptop and phone to same phone when implemented on phone? Is it limited only to communicate with Windows OS devices, or is it able to communicate with any bluetooth device irrespective of OS?
Kindly, help me if you are sure of this class capabilities. I have seen the implementation of 32Feet.NET but my question is limited about PeerFinder class and its limitations.
Start from this link, in which you can find several useful links for WinRT communication (the suggested protocol to use from Windows Phone 8 to communicate using NFC or Bluetooth)
http://blogs.ugidotnet.org/Nick60/archive/2012/12/30/win-rt-proximity-communication.aspx
You have two possible scenarios:
App to Device: you can connect a Windows Phone 8 device to third party devices (for example a LEGO robot or car audio systems) Bluetooth/RFCOMM (that is serial port profile, for the emulation of RS232 serial connections).
App to App: for communications between Windows Phone 8 devices and also Windows 8/Windows RT devices!
The PeerFinder class is the base class for discover another instance of your app on a nearby device and create a socket connection between the peer apps by using a tap gesture or by browsing:
http://msdn.microsoft.com/en-us/library/windows/apps/br241203.aspx
Hope this helps!
Unfortunately, it seems that the only way to stablish a socket connection using Bluetooth between a WP8 app and a Windows 8 app is by triggering the connection using NFC tap gesture. Although the PeerFinder documentation suggests that you might be able to specify AlternateIdentities to advertise peers running on both devices, it seems that Windows 8 relies on WiFi Direct, while WP8 uses Bluetooth.
So, if you are not able to use the NFC tap gesture between both devices to trigger the connection, you might not be able to pair both apps running on the different devices.
See this thread for more info.

Resources