static void ReleaseUSBDongle() { WriteLog("Releasing USB ANT Dongle..."); try { channel0.closeChannel(); System.Threading.Thread.Sleep(1000); device0.ResetSystem(); device0.ResetUSB(); ANT_Device.shutdownDeviceInstance(ref device0); } catch (Exception ex) { WriteLog("USB ANT Dongle is already released !"); } }