Android Question Network Library

Rainer@B4A

Member
Licensed User
Longtime User
Dear Forum,
I have a very special problem, but I hope some one has a tip for me.
For a direct connection between two mobile devices through the GSM-Network I have 2 SIM cards from Wireless Logic. They have an own APN and the SIM cards have a fix private IP. If I use two GSM modems (Siemens / Cinterion) I can establish a TCP/IP socket client / server communication.
But if I try to connect to the server with a B4A Network Lib Socket I get the error:

libcore.io.ErrnoExeption: Connection Failed: (Network is unreachable)

This error comes up in less then 20ms, just as if the mobile network access is switched off. So I suppose something in the Network-Lib blocks the connection.
But if I change only the IP+Port to connect to another Server, reachable through the Internet, it works.

Thanks
 

Rainer@B4A

Member
Licensed User
Longtime User
Sorry, I did not want assume that something is wrong with your library.
The problem is Android, which blocks the IP (10.xxx.xxx.xxx) as a normally private address. There must be something like a Routing Table which has to be changed, to route this IP over the mobile network.
I hoped someone in this forum with huge Android knowledge can help.
 
Upvote 0
Top