Android Question Failed TCP/IP connection

Paolodc

Member
Hello guys. I have a problem with TCP/IP connection. I've seen Erel Network Tutorial until 17:58 minute. I've written all code both in B4J and B4A. I've used the 51042 port and my device ip. The code It was compiled in debug mode and with USB debug, but it wasn't work. I don't understand. (Sorry for my english)
 

Paolodc

Member
Erel after I writen this code I have this problem:
Failed to connect: (SocketTimeoutException) java.net.SocketTimeoutException: failed to connect to /***.***.1.21 (port 51042) from /***.***.1.24 (port 38552) after 10000ms
Maybe the problem will be the closed port or port not available?
 
Upvote 0

Paolodc

Member
I tried to connect the pc to Android, but it doesn't work. I also reversed the video tutorial codes but it just doesn't make the connection and I don't understand what's the problem.

The code has no errors and I also tried using different ports but nothing. On the windows firewall I also put port 51042 accessible to all but nothing. I just don't understand.
 
Upvote 0

Paolodc

Member
java.net.SocketTimeoutException: connect timed out
at java.base/java.net.PlainSocketImpl.waitForConnect(Native Method)
at java.base/java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:107)
at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403)
at java.base/java.net.Socket.connect(Socket.java:591)
at anywheresoftware.b4a.objects.SocketWrapper$1.run(SocketWrapper.java:140)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
It is possible that your router is configured to block local traffic.
This. Make sure your router does not have WiFi isolation turned on.
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Sagecom Modem (F@ST3896LG-TN)
The quick research on this modem shows that it can be configured by an app and through the router's web interface. According to some posts I read, both are limited in their capabilities. Looks like this modem was furnished by your cable company and it might be worth giving them a call to check your configuration of your device.
 
Upvote 0

Cenny

Active Member
Licensed User
Longtime User
Assumed that my modem has AP-isolation switched on, then it should be possible to go past the modem by switching wifi off and let the communication go via the telephone network. It did not work either.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…