Skip to content Skip to sidebar Skip to footer

Server-client Malfunction In Android (socket Is Not Bound/socket Is Already In Use)

Hayho, well my problem is a little tricky to me to explain. I try to connect my android tablet (4.0.3) to a RS-232 converter. That already works, but only oneway. If i try to send

Solution 1:

  1. Please note that, depending on your Android version, AsyncTasks are not executed in parallel, unless you explicitly specify the executor for that.

  2. I guess you'll have to actively connect to the converter device. If so, you don't have a server socket; it's really a client socket.

  3. I have no idea why you create so many sockets along the way; a socket is a bi-directional communication channel.

  4. If you really need a server socket, you wait vor incoming connections, which you accept(), and accept() will give you your client-specific socket.

Hote this helps; if not, you need to update your questions with information about the device you're connecting to, as far as I'm concerned.

Solution 2:

Done it, with the knowing, a socket is bidirectional and can read AND write i got it now, i just shifted 2 seperate classes into each other and voilá it works ^^ no doublebound sockets left. Thanks Class Stacker. FOr help with the same or an even issue have a look at the link above.

Post a Comment for "Server-client Malfunction In Android (socket Is Not Bound/socket Is Already In Use)"