Microsoft band get data real time without the use of a mobile - bluetooth

I have purchased microsoft band. My scope is to use that device in order to track information such as steps and heart rate real time. I am wandering is there a way to get those data real time without 3rd device directly to a pc, using for example a bluetooth device? Is there a filesystem in order to store data in Band device? How can I store my data when for example I am outside and I dont having a mobile support?
Edit: I downloaded the sample code from the site. Now I am having problems running the project using either the device of the emulator. In both cases I am receiving bootstrapping device failed. Device not found. In case of the emulator I got the following error:
Error 2 Error : DEP6200 : Boostrapping 'Emulator 8.1 U1 qHD 5 inch' failed. Device cannot be found. The configuration data for this product is corrupt. Contact your support personnel.
Personalization.WindowsPhone
How can I pair the device with my app? I have already pair the device with pc using the microsoft sync app.
Edit2: I create a windows runtime app and I followed instruction from the link mentioned. I manage to found the paired device from the code. How can I read heart rate using the paired device?
My code is the following:
IBandInfo[] bandsPaired = await BandClientManager.Instance.GetBandsAsync();
IBandClient bandClient = await BandClientManager.Instance.ConnectAsync(bandsPaired[0]);
if (bandClient.SensorManager.HeartRate.GetCurrentUserConsent() != UserConsent.Granted)
{
await bandClient.SensorManager.HeartRate.RequestUserConsentAsync();
}
What should I do to get the heart rate as a integer value? Is there a way to import the project to unity?

For running and workouts you don't need a mobile. But if your ideia is use the Band indefinitely, for days, and then sync with a storage will not work.
The Microsoft Band is like a aggregate of sensors, not a device that works alone.

You can pair the Band directly to a Bluetooth-enabled (e.g. Windows) PC, then use the Band SDK to connect to the Band and stream real-time data from a Windows application.

Related

Create MediaSource from AudioPlaybackConnection

I'm trying to make my windows computer a valid output for bluetooth audio from my phone. Enabling the actual audio was easy enough using the winrt AudioPlaybackConnection, but I'm trying to get metadata working and running into dead ends in the Windows UWP documentation. I'm familiar with the MediaPlayer class, but I can't see how to set the source to the AudioPlaybackConnection. My next thought was to create a MediaPlayer and handle the controls/metadata myself, but I can't see how to access the metadata for the AudioPlaybackConnection either. I tried getting the BluetoothDevice matching the same phone since I see the properties for the actual device list AVRCP Transport and A2DP SNK as two separate hardware "devices" making up the phone device, but I have no more luck accessing metadata with the BluetoothDevice. I know Windows 10 supports Bluetooth's AVRCP and can handle metadata/controls (source), but I'm beginning to think it's under a different device in winrt and I don't have the winrt know-how to track it down.
I've consulted the Bluetooth team about this. But currently, control like this is not supported in Windows at this time. You could submit a feature request about this in the Feedback Hub. Please select Developer Platform->API Feedback as the category when you submit your request. The related team will check the request.

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.

Direct bluetooth access to sensors on Microsoft Band

I am looking for a fitness band which provides direct real-time sensor data over Bluetooth to a mobile (Android) app. I want to write a health app that tracks the heart rate continuously. Most of the bands I found, does not provide direct access and the sensor data needs to be synchronized over the web.
While searching I came across the “Microsoft Band”. Their website (http://developer.microsoftband.com/) says it provides data directly over Bluetooth. But I also found out that for an third party Android app to access the sensor data one has to install “Microsoft Health” app beforehand. Hence I am in doubt whether the data for the Microsoft Band also gets synchronized over the web through the Microsoft Health app or not.
Can someone please clarify my doubt, i.e. whether the sensor data can be access directly at real-time or not. I just want to be sure before buying the product.
On Android, in order to stream sensor data from the Band via the Band SDK, you must install the Microsoft Health application. However, the aggregate data collected by the Microsoft Health application and sync'd with the Cloud is completely independent of any data streamed in realtime by a third party application.

iOS BLE - How to keep app active in the background?

I am trying to find a clever way to keep a BLE app active in the background on iOS 6, without breaking any of Apple's rules. I plan to use the phone as a peripheral device and another BLE circuit as the central. My app will automatically be opened when a user arrives to a building using geofencing. After that the iPhone will connect to the first BLE central device it sees (the device will be in its white list). The user will then be able to move throughout the building switching to different BLE "nodes".
My question is: What do I need to do in the background when a user is stationary at their desk so that the app does not get suspended due to memory resources?
My idea is based on this solution for a separate problem: There could potentially (not regularly) be 10-50 users in an area with only a few BLE "nodes" and I read at bluetooth.org that I could setup a dynamic connection system, basically rotating connections through all the users.
My idea is to setup a similar dynamic system where the central device (not the iPhone) disconnects the device on regular intervals (30-40 minutes) and then the iPhone will reconnect.
Is this something that some feasible? Is this against the iOS development guidelines? I was unable to find anything explicit about this. I have also asked on the iOS developer forum, but unfortunately it is not as popular as this site.
Thanks in advance!
Xcode -> Project target -> Capabilities -> Enable background mode
Check Uses Bluetooth LE Accessories
Capabilities
Also enable the following key in .plist file
Required background modes
App communicates using CoreBluetooth
Plist

Auto Detect Windows Mobile Device programmatically

I am writing a windows application (written entirely in C++) which reads files from a storage card on a mobile phone running Windows Mobile. The tough part is, I don't know how to make my application detect the event that a user has connected the mobile phone to the USB of laptop. I did some reading on MSDN and have written a small code using RegisterDeviceNotification, which detects whenever a USB disk is attached/removed from the laptop. However, I am unable to tweak this to make it work for phone type devices. Please help me out through any links/tutroials which explains this(preferrably C++, as I don't know .NET or C#).
Thanks
Alok
According to this article you can use RegisterDeviceNotification to get notifications when activesync detects a device has been plugged/unplugged. (See option 3 at the end of the article)
It may just be a matter of setting up the correct notification filter.
Windows Mobile devices use RNDIS, a network interface protocol behind the scenes. Hence, the RegisterDeviceNotification method still works, but you're looking for a DEV_BROADCAST_DEVICEINTERFACE, not DEV_BROADCAST_VOLUME. (i.e. dbch_devicetype==DBT_DEVTYP_DEVICEINTERFACE)
You can use RAPI or RAPI2 to detect when a Windows Mobile device connects to a PC via Active Sync or Windows Mobile Device Center. RAPI can also be used to read the files on the storage card and much more.
RAPI is simpler to program because it is a C based API. RAPI2 has more functionality than RAPI, but is an object oriented COM API. If your needs are simple and you only care about one device/connection at a time then RAPI is good enough. There are two RAPI functions used to detect connections: CeRapiInit (blocking), and CeRapiInitEx (signals an event upon connection).

Resources