The following code generates the error at the FTP Server end.
Server connects with "150 opening data connection for 1.TXT (152 Bytes).
After a short delay (around 20 seconds) a second line appears: 425 Cannot Open Data Connection for 1.txt (152 bytes)
The FTP Server is Bullet Proof FTP Server. It is constantly in operation and works successfully from both the PC with the android emulator and from the Android Tablet I am using. My application needs to FTP directly, ie. I cannot use a pre-written App. In the example I have changed the actual ip address to the wording "ip address".
Sub Process_Globals
Dim FTP As FTP
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("MR_FTP_Header")
If FirstTime Then
FTP.Initialize("FTP", "ip address", 21, "android", "androidftp")
End If
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
sdRoot = File.DirInternal & "/"
FTP.DownloadFile("1.txt", False, sdroot, "1.txt")
End Sub
Sub FTP_DownloadCompleted (ServerPath As String, Success As Boolean)
Log(ServerPath & ", Success=" & Success)
If Success = False Then Log(LastException.Message)
End Sub