Android Question AsyncStreamsObject Issue

ValDog

Active Member
Licensed User
I'm trying to connect my Android to PC for file transfer using the respective AsyncStreamsObject Example programs on the PC side and the Android side.

I've open a port (Windows 7 ) under TCP protocol and use that port number in the Android program.

I get the following error: "libcore.io.ErrnoException; fcntl failed EBADF (bad file number)" when I try to connect from my Android.

Looking for some help please!
 
Last edited:

ValDog

Active Member
Licensed User
It is not related to AsyncStreamsObject. It is a network issue.

Try this B4J + B4A example: http://www.b4x.com/android/forum/th...ceive-objects-over-the-network.34612/#content

It is easier to connect from the PC to the Android. If you want to connect to the PC then you need to configure the firewall properly.
Erel, that is the example I am using, and as you noted it is easier to connect from the PC to the Android.

Does anyone have any hints they can share for configuring the firewall?
 

ValDog

Active Member
Licensed User
1. Temporary disable it and then try it to see whether the firewall is the problem.
2. http://windows.microsoft.com/en-us/windows/open-port-windows-firewall#1TC=windows-7
I temporarily disabled the Windows firewall, but still can't connect.
Error I get is:
(ErrnoException) libcore.io.ErrnoException: isConnected failed: ECONNREFUSED (Connection refused)."

When the firewall is enabled and the port opened for TCP I get:
"(SocketTimeoutException) java.net.SocketTimeoutException: failed to connect to /192.168.1.15 (port 32118) after 30000ms" followed by:
"(ErrnoException) libcore.io.ErrnoException: fcntl failed: EBADF (Bad file number)"

Any ideas?
 
Top