flutter_reactive_ble icon indicating copy to clipboard operation
flutter_reactive_ble copied to clipboard

WriteCharacteristicFailure.unknown, message: "Writechar timed-out"

Open avinashjoshi-canary opened this issue 3 years ago • 6 comments

This bug is produced by working with a nRF custom device. The bug occurs some of times and once I terminate the app and restart it disappears. Not able figure out what is the matter.

I have tried both writeCharacteristicWithoutResponse and writeCharacteristicWithResponse following is the log

[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Exception: GenericFailure<WriteCharacteristicFailure>(code: WriteCharacteristicFailure.unknown, message: "Writechar timed-out")
E/flutter (22971): #0      Result.dematerialize.<anonymous closure> (package:reactive_ble_platform_interface/src/model/result.dart:22:13)
E/flutter (22971): #1      Result.iif (package:reactive_ble_platform_interface/src/model/result.dart:34:21)
E/flutter (22971): #2      Result.dematerialize (package:reactive_ble_platform_interface/src/model/result.dart:15:28)
E/flutter (22971): #3      ConnectedDeviceOperationImpl.writeCharacteristicWithoutResponse.<anonymous closure> (package:flutter_reactive_ble/src/connected_device_operation.dart:72:39)
E/flutter (22971): #4      _rootRunUnary (dart:async/zone.dart:1436:47)
E/flutter (22971): #5      _CustomZone.runUnary (dart:async/zone.dart:1335:19)
E/flutter (22971): <asynchronous suspension>

avinashjoshi-canary avatar Oct 19 '21 12:10 avinashjoshi-canary

In general this occurs when the the peripheral is not responding anymore. Does this issue happen when you do a lot of subsequent writes (e.g. updating some firmware)?

remonh87 avatar Oct 20 '21 19:10 remonh87

I have this error when I Perform hot restart from android studio.

avinashjoshi-canary avatar Oct 21 '21 14:10 avinashjoshi-canary

I have this error when I Perform hot restart from android studio.

Same here. I have the device connected, but when I write the data, it pops this issue

akillika avatar Mar 01 '22 13:03 akillika

Could you please provide an update on this? I'm encountering the same error.

Baxi19 avatar Aug 29 '23 23:08 Baxi19