Android Question Bluetooth

Discussion in 'Android Questions' started by Giuliano Cucchiarini, Feb 10, 2015.

  1. Giuliano Cucchiarini

    Giuliano Cucchiarini Member Licensed User

    I am trying to use the bluetooth with Android.
    Using the example provided, I am able to discover the devices, but when I try to connect I get the following error:

    java.io.IOException: read failed, socket might closed or timeout, read ret: -1

    Could you plese help me?

    Thank you

    Giuliano C.
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Are you running an app that listens for connections on the other device?
     
  3. Giuliano Cucchiarini

    Giuliano Cucchiarini Member Licensed User

    Hi Erel
    I need to write an Android App that receive data from a Bluetooth Barcode scanner.
    The app is able to discover the device, but when tries to connect I get the above error.

    I tried also to enable the SPP Mode on the device, but the same story...

    Could you please help me,
    Thank you

    Giuliano C.
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    You must enable SPP mode for it to work with Serial library.

    Maybe it listens to a non-standard address.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice