0

For some special, personal needs I want to use a TIdHTTPServer (component from the Indy project for RAD Studio) on an Android device through a mobile network connection to which I can connect with a client, like a browser, wget or whatever.

My FireMonkey application works as expected on Windows and Android using a WLAN connection. But on Android with a mobile internet connection turned on and WLAN turned off, I cannot establish an external connection to the TIdHTTPServer server running on Android. No instant connection discarding - it's a timeout.

I think it might be something Android related or maybe it has something to do with the way how my cell phone provider handles mobile connections. Maybe they block or simply don't redirect external (mobile) connections, like NAT "firewalls" do, where one has to create a port redirection and so on.

I also tried to add the mobile IP and the port of my server app to the bindings of the TIdHTTPServer component without luck (error says that the address and port are already in use). IP is version 4 and Android is version 6. INDY is 10.6.2.5341.

Is it possible to use a server on Android with mobile connections after all? What are the obstacles? Maybe I just forgot to set certain app rights?

StanE
  • 2,704
  • 29
  • 38
  • To which address are you attempting to connect locally? `LocalHost`? `127.0.0.1`? – Jerry Dodge Oct 08 '16 at 15:21
  • I'm not connecting to a local address. I made a FireMonkey app with a TIdHTTPServer component, which runs on Android. Now I'm trying to connect from another IP through the internet to the mobile IP address of the Android device but I can't establish a connection. – StanE Oct 08 '16 at 15:28
  • Well then this is definitely a Firewall / NAT issue. In this case, it's not a programming question at all. Questions on professional server- or networking-related infrastructure administration are off-topic for Stack Overflow unless they directly involve programming or programming tools. You may be able to get help on Server Fault. – Jerry Dodge Oct 08 '16 at 15:30
  • 1
    There is no need to vote to close this question at this time, because it might be a programming related question. Couldn't it be an Android restriction, which can be avoided by setting something in the XML manifest file? – StanE Oct 08 '16 at 15:40
  • You still never said how you're connecting to it. What address are you using? – Jerry Dodge Oct 08 '16 at 15:43
  • I said multiple times how I'm connecting: Through a mobile internet connection with the HTTP protocol. The server runs as an Android app on a mobile device, while I'm trying to connect from a different IP. I'm not sure, why the exact address is relevant (and I don't really want to post it here), but since you are explicitly asking: 109.45.0.67. But mobile IPs change more frequently - I don't know how long it will be valid. – StanE Oct 08 '16 at 15:47
  • I didn't mean the actual IP. I meant from where do you get the IP which you're connecting to. Anyway, this is definitely a Firewall / NAT issue, as I said before. Since you provided your IP though, I did a reverse lookup, and this IP belongs presumably to your device's provider, on the specific node it's connected to. Actually, I'm not sure this is possible at all. I don't think this is the IP of your actual device. Just as if it were a WiFi network, this IP is of the internet connection, not the device itself. Of course that's what I gather, I can't be sure. – Jerry Dodge Oct 08 '16 at 15:49
  • Take a look here: http://stackoverflow.com/questions/4526830/how-to-make-two-android-devices-to-communicate-through-tcp – Jerry Dodge Oct 08 '16 at 16:05

0 Answers0