Closed maine98 closed 4 years ago
Hi!
You're checking if it's writeableWithResponse
:
if (item.isWritableWithResponse) {
singleService = service;
characteristicWritable = item;
}
but writing without one:
return await characteristicWritable.write(Uint8List.fromList([val]), false);
Flip the boolean at the end of the line to true
.
Hi @mikolak , thank you so much for your quick response, I tested and it works correctly 💪🏽. But I have a question, why does it still work on android leaving the variable to false?
To be honest I have no idea. 😉
Write with response is the default on Android, so perhaps it falls back to it?
@dariuszseweryn perhaps you know?
Closing since it's not a bug.
Never tried using write that was not supported by a characteristic. Android may use the default or because of some bug in implementation may send a write without response anyway. Or there may be a misshandling in the library itself which did correctly set "no response"?
PROBLEM
Hi, I installed the plugin but on ios doesn't want to know how to work writing on ble, I can read but not write. On android instead everything works properly. I use a ESP32-Dev-Module with ble.
CODES
CONSOLE LOG
FLUTTER DOCTOR [MAC]
FLUTTER DOCTOR [WINDOWS]
DEVICES TESTED