Android Question How to reach the smartphone ip address for connection to the internal ftp server ?

amorosik

Expert
Licensed User
I think the project that shows how to create an Ftp server on both Android and PC is of great value in order to exchange files between smartphones and PCs
But, suppose you have a smartphone connected via the telephone internet network (not in LAN with the pc), how to start a connection from pc to smartphone?
What ip address to set?
And, even if the external IP address of the smartphone connection is available, can it always be reached by starting the connection from a PC?
 

tigrot

Well-Known Member
Licensed User
Longtime User
Or you can check from phone if data are available. Connect to PC server and test of data are present. If it is, then receive. Data are available in both direction. You can mix MQTT and FTP as well. Phone can be informed that data are available.
 
Upvote 0

KMatle

Expert
Licensed User
Longtime User
Either you use a server "in the middle" (PC & Phone can access it and store/retrieve data) or (if you are brave -> security and have a static ip address) open a port in your router at home and forward it to your pc (where a B4J app is running). From the phone you can now connect to the pc (AsyncStreams) and do what you need. Of course using a middleware like MQTT or a own hosted server is much safer and better.
 
Upvote 0
Top