public Hm1xConsoleTerminal(string deviceId) { _readBuffer = new byte[ReadBufferLength]; _client = new Hm1xBLEClient(deviceId ?? throw new ArgumentNullException(nameof(deviceId))); _client.Connected += OnClientConnected; _client.Disconnected += OnClientDisconnected; _readDisplayTimer = new Timer(OnReadDisplayTimerCallback, null, Timeout.Infinite, Timeout.Infinite); }
private static async Task <bool> CheckForCustomCharacteristic(BLEDeviceInfo info) { try { await using (var client = new Hm1xBLEClient(info.Id)) { return(await client.IsHm1xCompatibleDevice()); } } catch { } return(false); }