Hello everybody,
A few days ago I opened a thread about file transfering with the NET library FTP client and the Erel writen FTP server class. Erel gave me the solution to my issue at once (even à Sunday !!!), but now I'm facing a new issue regarding the FTP server IP address ...
Let me explain my network configuration:
1- FTP server is hosted by an Android TVBox wich is connected to my Internet access router via a wired connection (IP address is 192.168.1.6)
2- FTP client is hosted by an android smartphone which is wirelessly connected to the TVBox (via its wifi hotspot, the IP address is 192.168.43.1)
When I use the ethernet IP address of the TVBox (192.168.1.6) to initialize the FTP client and upload a file everyting works OK.
When I use the wifi hotspot IP address of the TVBox (192.168.43.1) to initialize the FTP client and upload a file I get this exception:
Here after some pieces of code I use:
FTP client initialization
Upload command:
Does anybody has an idea where I'm mistaken ?
Thanks by advance for your help
Regards
A few days ago I opened a thread about file transfering with the NET library FTP client and the Erel writen FTP server class. Erel gave me the solution to my issue at once (even à Sunday !!!), but now I'm facing a new issue regarding the FTP server IP address ...
Let me explain my network configuration:
1- FTP server is hosted by an Android TVBox wich is connected to my Internet access router via a wired connection (IP address is 192.168.1.6)
2- FTP client is hosted by an android smartphone which is wirelessly connected to the TVBox (via its wifi hotspot, the IP address is 192.168.43.1)
When I use the ethernet IP address of the TVBox (192.168.1.6) to initialize the FTP client and upload a file everyting works OK.
When I use the wifi hotspot IP address of the TVBox (192.168.43.1) to initialize the FTP client and upload a file I get this exception:
B4X:
java.IOException: Host attempting data connection 192.168.1.6 is not the same as server 192.168.43.1
Here after some pieces of code I use:
FTP client initialization
B4X:
FTP.Initialize("FTP", "192.168.43.1",51041, "admin", "admin")
FTP.PassiveMode = True
Upload command:
B4X:
Sub FTP_transfer_start(FilePath As String, FileName As String)
FTP.UploadFile(FilePath, FileName, True, "/USB_DISK1/udisk0/domus/backup/"&FileName)
End Sub
Does anybody has an idea where I'm mistaken ?
Thanks by advance for your help
Regards