While trying to connect device it throws the below error sometimes and not always. I couldn't identify what causes this.
[ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: BleError (Error code: 2, ATT error code: null, iOS error code: null, Android error code: null, reason: null, internal message: null, device ID: null, service UUID: null, characteristic UUID: null, descriptor UUID: null)
The error code does not remain the same it changes to 2, 205, 204 and many but couldn't handle this error.
I tried connect(requestMtu: 250).catchError((){print("some error")}) and connect(requestMtu: 250).onError((error, stacktrace) {print("error");});. But it didn't go into catch or the error block.
Couldn't identify what is causing this exception to occur at the first place, and also don't how to handle this exception.
While trying to connect device it throws the below error sometimes and not always. I couldn't identify what causes this.
[ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: BleError (Error code: 2, ATT error code: null, iOS error code: null, Android error code: null, reason: null, internal message: null, device ID: null, service UUID: null, characteristic UUID: null, descriptor UUID: null)The error code does not remain the same it changes to 2, 205, 204 and many but couldn't handle this error.
I tried
connect(requestMtu: 250).catchError((){print("some error")})andconnect(requestMtu: 250).onError((error, stacktrace) {print("error");});. But it didn't go into catch or the error block.Couldn't identify what is causing this exception to occur at the first place, and also don't how to handle this exception.