public static async Task <MiDeviceData> Do()
        {
            IEnumerable <DeviceInformation> devices = await DiscoverDevices();

            foreach (DeviceInformation device in devices)
            {
                using (var mi_device = await BluetoothLEDevice.FromIdAsync(device.Id))
                {
                    MiDeviceData datas = await GetData(mi_device);

                    Console.WriteLine($"device : {device.Id} : {datas.Moisture}/{datas.Temperature}");
                }
            }
            return(null);
        }
        public static async Task <MiDeviceData> GetData(BluetoothLEDevice mi_device)
        {
            TaskCompletionSource <MiDeviceData> tcs = new TaskCompletionSource <MiDeviceData>();
            var service = await GetService(mi_device);

            using (service)
            {
                var characteristic = await GetCharacteristic(service);

                var data = await GetSingleValueFromCharacteristic(characteristic);

                MiDeviceData deviceDatas = ReadDatas(data);


                //deviceDatas.BatteryLevel = await GetBattery(mi_device);
                return(deviceDatas);
            }
        }
        public static async Task <MiDeviceData> GetData(BluetoothLEDevice mi_device)
        {
            TaskCompletionSource <MiDeviceData> tcs = new TaskCompletionSource <MiDeviceData>();
            var service = await GetService(mi_device);

            using (service)
            {
                var characteristic = await GetCharacteristic(service);

                await characteristic.WriteClientCharacteristicConfigurationDescriptorAsync(GattClientCharacteristicConfigurationDescriptorValue.Notify);

                characteristic.ValueChanged += async(sender, evt) =>
                {
                    MiDeviceData datas = ReadDatas(evt.CharacteristicValue);
                    await characteristic.WriteClientCharacteristicConfigurationDescriptorAsync(GattClientCharacteristicConfigurationDescriptorValue.None);

                    tcs.SetResult(datas);
                };
                MiDeviceData deviceDatas = await tcs.Task;
                return(deviceDatas);
            }
        }