Skip to content

Noble Windows 10 bindings using the official C++/WinRT API

License

Notifications You must be signed in to change notification settings

tony-gutierrez/noble-winrt

 
 

Repository files navigation

WinRT bindings for noble on windows.

Forked from and based off of:

https://github.com/fido-alliance/noble-winrt
https://github.com/Timeular/noble-winrt

Changes and improvements

  • Doesn't crash like noble-uwp when running for days.
  • Fixed the service uuid filter used in scan start.
  • Faster discovery when only requesting one service. Old versions of noble-winrt and noble-uwp would request all services over BLE and then cut down to one, instead of only requesting one in the first place.
  • Fix the connectable flag to update on every advertisement. Old versions would use the value from the first advert, and never update.

Todos

  • Eliminate the local cache in this binding as windows has its own? Timeular#24
  • Be able to pass instant errors into noble. Currently this cant be done, and the user will just have to rely on timeouts. abandonware/noble#135
  • Become an official binding that lives in abandonware repo?

Tips

  • Run npm run clean to get node-gyp ready, and to generate an .sln that can be opened in VS2019. Sometimes builds double in file size, and restarting like this brings them back down to ~504kb.
  • VS debug config can be set to run a node project that requires the debug build of the binding, to debug it in real time.

Update 9/2021




Original readme:

This is a rewrite of noble-uwp using the C++/WinRT API.

System Requirements

  • Node.js v6.14.2 or later.
  • Windows 10 build 10.0.15063 or later
  • Windows 10 SDK build 10.0.17134.0

Usage

Simply require noble-winrt instead of noble:

const noble = require('noble-winrt');

On non-Windows platforms or Windows versions lower than 10.0.15063 this will use the regular noble implementation and on Windows version 10.0.15063 or later it will use the native binding using the C++/WinRT API.

Implementation Status

Everything should work that also works with the regular noble bindings except:

  • Writing/Reading to descriptor handles is not supported
  • Broadcast is not supported

About

Noble Windows 10 bindings using the official C++/WinRT API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 99.0%
  • Python 1.0%