1

I need some help about android EDR connect. I use EDR to connect device. But sometimes socket.connect throws an exception:

read failed, socket might closed or timeout, read ret: -1

Then I close bluetooth and reopen it. Connect will return success.

Andrea
  • 11,801
  • 17
  • 65
  • 72
lidongdong
  • 11
  • 1
  • pls add your code or we can't help you. – DocRattie Sep 21 '15 at 10:22
  • See related question http://stackoverflow.com/questions/29143695/java-io-ioexception-read-failed-socket-might-closed-or-timeout-read-ret-1-o – Mihai8 Sep 21 '15 at 10:26
  • this is my code `try{ socket = device.createRfcommSocketToServiceRecord(UUID); socket.connect(); }catch(Exception e){ e.printStackTrace(); }` – lidongdong Sep 21 '15 at 12:18

0 Answers0