amorosik Expert Licensed User Longtime User Aug 9, 2021 #1 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?
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?
josejad Expert Licensed User Longtime User Aug 9, 2021 #2 amorosik said: can it always be reached by starting the connection from a PC? Click to expand... As far as I know, when you're connected to the telephone internet network, the most probably is that you are inside a VPN or tunnel of your phone provider. I think there are just few cases where your phone provider assign you a public ip, reachable from outside. Upvote 0
amorosik said: can it always be reached by starting the connection from a PC? Click to expand... As far as I know, when you're connected to the telephone internet network, the most probably is that you are inside a VPN or tunnel of your phone provider. I think there are just few cases where your phone provider assign you a public ip, reachable from outside.
tigrot Well-Known Member Licensed User Longtime User Aug 9, 2021 #3 You must bridge the connection to a server outside. Then you can comunicate. MQTT is a perfect choice. Upvote 0
You must bridge the connection to a server outside. Then you can comunicate. MQTT is a perfect choice.
tigrot Well-Known Member Licensed User Longtime User Aug 9, 2021 #4 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
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.
KMatle Expert Licensed User Longtime User Aug 10, 2021 #5 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
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.