Android Question FTP dont connect on 3G in B4A

Discussion in 'Android Questions' started by hibrid0, Jun 27, 2015.

  1. hibrid0

    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:

    Sub FTP_ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)
    If Success = False Then
    Msgbox("Error en el Usuario o Clave""Error")
    ProgressDialogShow("Conectando al servidor....")

    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"
  2. hibrid0

    hibrid0 Active Member Licensed User

    Partial Solved.
    Partion Solution:

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

    Erel Administrator Staff Member Licensed User

    Do both upload and download work fine in passive mode?
  4. tigrot

    tigrot Well-Known Member Licensed User

    I have similar problems in Italy, some port seems to be blocked by provider, also FTPS does on Vodafone network.
  5. hibrid0

    hibrid0 Active Member Licensed User

    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: Jun 27, 2015
  6. tigrot

    tigrot Well-Known Member Licensed User

    Passive mode is a constant behind the routers, 'cause of NAT, I have lost any hope to use active mode!
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice