Android Question Access Remote Device

ahmadalibeck

Member
Licensed User
Longtime User
Greetings ..

I am connecting two phones over internet using B4A, where one device is sending data, and the other is displaying the data.

Each device connects to internet through Wifi, so a Port Forwarding should be done in the Router at each side, and I did it.

My problem is that they are not connecting!

Any idea ?!

Please note that when I connect one device using 3G, and only when the Wifi phone request connection it works, but if the 3G connected phone requests the connection from the Wifi connected phone, it is not connecting !!

I think the problem is in the Port Forwarding, is it or no? If so, any suggestions ?!
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
Each device connects to internet through Wifi, so a Port Forwarding should be done in the Router at each side, and I did it.
Port forwarding is only required in the side that accepts the connection.

and only when the Wifi phone request connection it works, but if the 3G connected phone requests the connection from the Wifi connected phone, it is not connecting !!
What do you mean with "requests the connection"?

Check this tutorial: https://www.b4x.com/android/forum/t...-your-device-over-the-internet.26611/#content
 
Upvote 0

ahmadalibeck

Member
Licensed User
Longtime User
I think it is a port forwarding issue. Because when both phones are using 3G, the connection is successful.

So can you help why when using Wifi with port forwarding the connection fails ?!
 
Upvote 0

Daniel-White

Active Member
Licensed User
Longtime User
for a test, connect your PC to wifi, and do a telnet xxxx.xxxx.xxxx.xxxx port and example, if you need to test the port 25 is open in another end, which ip is 200.200.200.200 it will be telnet 200.200.200.200 25 and you will see an echo or black screen with some garbage characters, if you try and does not open the blacks screen (MsDos), the port is closed. you can use putty or similar software.
 
Upvote 0

ahmadalibeck

Member
Licensed User
Longtime User
Hi Mr. Tigrot,

If the remote phone (the one who is listening) is connected by Wifi, Connection fails.
If the local phone (the one who will request connection) is connected through 3G or even Wifi, it can request connection.

The problem comes only with the listening phone, not the one which requests.
 
Upvote 0
Top