Skip to content

Managed BT stack for Windows able to detect and act as an iBeacon.

License

Notifications You must be signed in to change notification settings

19317362/win-beacon

 
 

Repository files navigation

WinBeacon

Build status

Overview

WinBeacon is a managed .NET (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
ASUS USB-BT400 BCM20702A0 VID_0B05 PID_17CB Yes
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
CSR USB Bluetooth 4.0 CSR8510 VID_0A12 PID_0001 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.

About

Managed BT stack for Windows able to detect and act as an iBeacon.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%