/// <summary> /// Creates a hub instance that uses LibUsb or WinUSB as transport. /// </summary> /// <param name="usbVid">The VID of the BT4.0 dongle.</param> /// <param name="usbPid">The PID of the BT4.0 dongle.</param> public BeaconHub(int usbVid, int usbPid) { controller = new LibUsbLeController(usbVid, usbPid); controller.LeMetaEventReceived += controller_LeMetaEventReceived; controller.Open(); controller.EnableScanning(); }
/// <summary> /// Release used resources. /// </summary> public void Dispose() { if (controller != null) { controller.LeMetaEventReceived -= controller_LeMetaEventReceived; controller.Dispose(); } controller = null; }