-
Notifications
You must be signed in to change notification settings - Fork 461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
read failed, socket might closed or timeout, read ret: -1 #18
Comments
Same issue. |
I created a new pull correcting this error |
I merged @rafaelterada. As soon as possible I'll release a new version. Thanks a lot. |
Hi, I got the same issue. Is there any way to know when the version including this fix will be available or if there is a way to by pass this issue in order to connect my app to an arduino (using a groveBLE v1.0) ? |
Hi @AlexanderHow, if your adapter is BLE compatible, try to use flutter_blue. Best. |
Thanks for your answer. Unfortunately, I already tried this solution and as my flutter app use the 0.13.11 version of protobuf (for gRpc), I'm also waiting for the fix of their issue#257. Thanks for your help, I wish you good luck in future |
I dig into the Java code, I found whenever socket.connect(); It has exception: read failed, socket might closed or timeout, read ret: -1. What is the exact cause for this? Is my echo server problem or bluetooth USB hardware problem? Thanks. |
I found in the code MY_UUID is hard coded to a specific uuid string. |
Why do I still have this error? I'm using 0.1.0 which should include @rafaelterada's fix. Update: |
There are few issues that could make the error happen: A) Remove device is not responding.
B) Service Discovery Protocol is not available,
C) End device is using other Bluetooth protocol,
D) Secure connection is unavailable.
E) Remote device is busy.
F) You misunderstood Bluetooth Serial for Bluetooth Low Energy.
The issue will stay open for now (until other protocols or/and custom UUID will be implemented?) |
I am getting the same error. I am using the latest version of the plugin and I am trying to run the example app provided in Plugin repo. |
Is it chat example with Raspberry or the one with sensors and Arduino? Please provide more details about your testing environment if possible. |
I have the same error. Trying to connect to a HC05. |
Hi PsychoXIVI , When I am connecting to a paired android mobile device (running Android 9) , using the code
I am facing the exception socket might closed or timeout, read ret: -1. I am not understanding how to resolve the issue. Could you please help or suggest anything. |
Is the device you are trying to connect listening? Does it run also SDP? Does UUID match? From my very important comment above:
|
PsychoXIVI, Thanks for the prompt reply. So does that mean I can connect to only android standalone modules like HC-05 or Raspberry pi using this package? Has anyone being successful in trying to connect 2 android mobile phones using this package? |
Sorry, Bluetooth connection require both slave (server) and master (client). This library allow only act as client - at least for now. It is planned feature. Issue #17 is used to track this issue. |
@edufolly i am still facing this issue can u please help me i m facing the same issue |
@edufolly I have this issue while I am trying to connect to ESP32 Bluetooth :( |
Hi @ctrleffive, Was this issue resolved? Are you able to use the module without occurrence of this error? Thanks. |
Hey @vaibhiarora03, |
@ctrleffive okay. thanks. |
hi @edufolly and @AgainPsychoX , is this issue resolved? |
` if (isConnected()) {
|
Hi @david-macharia . Thanks for replying. Were you able to completely resolve it by this integration of yours? What was the occurrence rate of this issue with you? Was this less frequent or was it a complete failure that your connection was not able to be created even once? I also tried something which decreased the connection failure rate. I integrated re-connection by closing the socket, input and output streams. Sometimes due to connection failure, the socket and input-output streams are left open and when we try to re-connect the connection doesn't get established. But that too didn't help me completely resolve the issue.
In the function
|
Hi all Is any one have any solution for this ?? Thanks regards |
can anyone please explain about the error and how to correct the error ??? void main() => runApp(MyApp()); class MyApp extends StatelessWidget { class BluetoothApp extends StatefulWidget { class _BluetoothAppState extends State { @OverRide Future _requestPermissions() async { Future _startDiscovery() async { Future _connectToDevice(BluetoothDevice device) async { void _configureBluetoothConnection() { void _startReadingData() { @OverRide
} @OverRide |
Error occurred while connecting to a paired device.
Flutter Doctor
The text was updated successfully, but these errors were encountered: