Giter Site home page Giter Site logo

win-beacon's Introduction

WinBeacon

Build status

Overview

WinBeacon is a managed (C#) library with a minimal Bluetooth LE Stack that is able to detect and act as an iBeacon¹. This stack doesn't support BLE devices, only the detection and transmission of BLE advertisement packets used by beacons.

Supported operating systems

  • Windows XP (not tested, but it should work)
  • Windows 7
  • Windows 8
  • Windows 10*

* For Windows 10, you should be able to use BluetoothLEAdvertisementWatcher instead of this library.

Supported BT4.0 LE dongles

Manufacturer Product Chipset VID / PID Compatible
Belkin Mini Bluetooth 4.0 Adapter Class 2.10M BCM20702A0 VID_050D PID_065A Yes
Pluggable USB Bluetooth 4.0 Low Energy Micro Adapter BCM20702A0 VID_0A5C PID_21E8 Yes

If anyone can test with other BT4.0 dongle types, please let me know how it works out or send us a pull request.

Installation

This library needs raw USB access to a BT4.0 dongle. Therefore you should replace the original driver of the dongle with a WinUSB driver. This also means that the default Bluetooth stack is no longer used and Windows will no longer detect the dongle as a Bluetooth dongle until you re-install the original drivers.

To replace or create a WinUSB driver for the BT4.0 dongle, we advise you to use the Zadig tool.

Get it on NuGet

Install-Package WinBeacon

Usage

Detecting beacons

using (var hub = new BeaconHub(0x050D, 0x065A))
{
    hub.BeaconDetected += (sender, e) =>
		{
			Console.WriteLine("Detected beacon: {0}", e.Beacon);
		};
    Console.ReadKey();
}

Advertise as a beacon

using (var hub = new BeaconHub(0x050D, 0x065A))
{
    hub.EnableAdvertising(new Beacon("B9407F30-F5F8-466E-AFF9-25556B57FE6D", 1000, 2000, -52));
    Console.ReadKey();
}

¹ iBeacon is a trademark of Apple inc.

win-beacon's People

Contributors

blowsie avatar huysentruitw avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.