Access Bluetooth Deviceįirst, you obviously need to know which device to connect to. Then, you need to find the battery service, which contains the battery level characteristic, which in turn has the battery level value. This requires connecting to the Bluetooth device (which isn’t the same as the more permanent pairing!). LocalAdapter.IsPeripheralRoleSupported) Read Battery Level of Bluetooth Beacons or Surface DialsĪfter you’re sure that your hardware supports the required features, let’s check how to read the battery level of a Kontakt.io Bluetooth Beacon or a (paired) Microsoft Surface Dial. You can detect support using the following simple queries: var localAdapter = await BluetoothAdapter.GetDefaultAsync() ĭebug.WriteLine("Low energy supported? -> " +ĭebug.WriteLine("Central role supported? -> " +ĭebug.WriteLine("Peripheral role supported? -> " + The hardware built into your Windows 10 device + the drivers also have to support the new features. If you can use all the new APIs not only depends on the Windows 10 version. Query Central and Peripheral Role Support Windows 10 Target VersionĪs the new APIs were introduced with the Creators Update, you need to update your app target to the new Windows version in Visual Studio: Now that the new Windows version has rolled out, it’s possible to ship applications that support the new APIs. The following adapted image from the blog shows the new possibilities: The upcoming support of Windows for these scenarios was already announced in January at the Microsoft Bluetooth team blog. For implementing IoT scenarios, the GAP peripheral role is also needed. However, if a device should notify a wearable like a smart watch when an incoming email arrives, it needs to support the GATT server role. Arguably, that’s most important for Windows devices – it’s made for phones / PCs that access remote sensors. So far, Windows was only capable of using Bluetooth LE in GATT Client / GAP Central role. What’s New for Bluetooth in Windows 10 Creators Update? That gave me the opportunity to explore the new APIs based on the short documentation overview page and the videos. Unpaired Bluetooth LE Device ConnectivityĮven though the sessions reference example code and blog posts that should have been released together with the session recordings, still none of that is available so far.This finally allows developers to use the full potential of modern Bluetooth scenarios, including sensors, wearables and beacons.Īt Build 2017, Microsoft released three new sessions explaining the capabilities of the new APIs: With the Windows 10 Creators Update, Microsoft released a massive update to the Bluetooth LE capabilities of the OS. This means that, you get the exact battery level status of the external Bluetooth device.At the Microsoft Build Tour in Vienna, I had the opportunity to present an enhanced version of the Bluetooth Beacon talk. Windows 10 RS5 build 17639 and later builds show you the battery level of your external Bluetooth device. If you have connected a Bluetooth mouse, keyboard, headphone or another device to your Windows 10 PC, you can now check the battery level of the external device with ease. The good thing is that you don’t need to open your mouse, keyboard or that Bluetooth device’s software to check its battery level when it’s connected to your Windows 10 PC. The same is the case with Bluetooth devices from other manufacturers as well. The Logitech SetPoint even sends out a notification when the battery level is low, although there are indicators on the mouse to display approximate battery level. For instance, I have installed Logitech SetPoint software to know the exact status and change default button actions of Performance MX mouse (MR0007), which I bought a few years ago (an excellent mouse at its price range). Most of the Bluetooth devices come with their software to change default actions and provide information about the device’s battery status as well. RECOMMENDED: Download PC Repair tool to quickly find and fix Windows errors automatically
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |