Android Question FTP dont connect on 3G in B4A

hibrid0

Active Member
Licensed User
Hi make an small app, my app get content over FTP, and on the finish upload content to the FTP server.

I test all and work fine over wifi, list files, list folders, download files etc, now I test it with Wifi off, not connect.
In list complete I have this:

B4X:
Sub FTP_ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)
   
    Log(ServerPath)
    If Success = False Then
        Log(LastException)
        Msgbox("Error en el Usuario o Clave", "Error")
        Log(Success)
        ProgressDialogHide
    Else
         ProgressDialogShow("Conectando al servidor....")
          StartActivity("lista_files")

    End If
   
End Sub
This code work fine, but with mobile Network, the app say "Error en el Usuario o Clave"(Wrong password or user.)

I feel is something about the timeout.

I test the app called "AndFTP" with the same server, credential and network, and I see my carrier not blocking connection because I can list files, download and upload files with "AndFTP"
 

hibrid0

Active Member
Licensed User
Partial Solved.
Partion Solution:
FTP.PassiveMode=True

If a list a subfolder I receive this error over 3G/4G
recvfrom failed: ECONNORESET
(Connection reset by peer)
 
Last edited:

hibrid0

Active Member
Licensed User
I have similar problems in Italy, some port seems to be blocked by provider, also FTPS does on Vodafone network.
I'm using a shared hosting and don't provide ftps access, but sftp is avaliable.
I'm going to try sftp.
To upload I'm using the library called ftp auto, and have the same problem ECONNORESET.
In FTP Auto I set to passive mode and work again the upload.


Problem Solved, only Passive Mode.
The error was I close the connection and in the other sub re-initialize without passivemode.
 
Last edited:
Top