Android Question B4A FTP problem

ztfusr

New Member
Licensed User
Hi to all,
I try to use FTP object of Net library (1.80).
if I use a WiFi connection Login, filelist, download works fine and I haven't problems

Here's my (strange?) problem:

When I try to use the App on phone with the Phone internet connection, only Login works. if I try download a file, the DownloadFile method result is false with exception "android.system.errnoException: accept failed: EAGAIN (try again)".

I know that is a timeout error, but I set 70000ms in the timeout property. I also set all "SSL property" to false and passivemode to true

B4X:
ftpZ.UseSSL=False
ftpZ.UseSSLExplicit=False
ftpZ.PassiveMode=True
ftpZ.TimeoutMs=70000

during my attempts, I see in the FTP server console that the user that I use is correctly logged on and it try the download. the FTP server start to send the file (i see the number of bytes sent from server) but the client (my APP on the phone) seems don't receive bytes (server "says" 0.00b downloaded)

please note that the problems appears only with Phone connection, with Home WiFi, all works fine.

I tryed also the FTP_Autosample example, but it has the same behavior.

Then I tryed a FTP Client APP (AndFTP downloaded from Google Play store) and it works fine with both type of connections and, of course, with the same User and Password that i used in my previous attempts

Any idea or suggestions?

Thanks to everyone
 

ztfusr

New Member
Licensed User
before
B4X:
    ftpZ.UseSSL=False
    ftpZ.UseSSLExplicit=False
    ftpZ.PassiveMode=True
    ftpZ.TimeoutMs=70000   
    ftpZ.Initialize("FTP","xxx.xxx.xxx",21,User,pwd)
 
Upvote 0

ztfusr

New Member
Licensed User
Moving initialization before setting properties seems work in both type of connections

B4X:
    ftpZ.Initialize("FTP","xxx.xxx.xxx",21,User,pwd)  
    ftpZ.UseSSL=False
    ftpZ.UseSSLExplicit=False
    ftpZ.PassiveMode=True
    ftpZ.TimeoutMs=70000

thank you very very much!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…