Problem downloading file using ftp when not using WiFi

Brad

Active Member
Licensed User
Longtime User
I'm downloading a file off of my remote server and it works when my WiFi is turned on but not when WiFi is off. It does log into my server but it hangs on the download. No error is thrown..The code is very basic. I wonder if this could be a carrier specific problem. I'm using Verizon if that makes any difference.
B4X:
Sub btnDownload_Click

    lbldownloadprogress.Visible = True
   lbldownloadprogress.Text = "Attempting to contact server..."
   DoEvents
    
    dlftp.Initialize("FTPdownload", "ftp.mydomain.com", 21, "user", "pw")
   lbldownloadprogress.Text = "Attempting to download..."
   DoEvents   
   dlftp.DownloadFile("test.txt", False, File.DirRootExternal, "test.txt")
End Sub

Sub FTPdownload_DownloadProgress (ServerPath As String, TotalDownloaded As Long, Total As Long)
    Dim s As String
    s = "Downloaded " & Round(TotalDownloaded / 1000) & "KB"
    If Total > 0 Then s = s & " out of " & Round(Total / 1000) & "KB"
    lbldownloadprogress.Text = s
End Sub

Sub FTPdownload_DownloadCompleted (ServerPath As String, Success As Boolean)
   lbldownloadprogress.Visible = False  
If Success = False Then 
   Msgbox("Download failed. Contact support.","Download Error")
Else

End If
        dlftp.Close
End Sub
 

Brad

Active Member
Licensed User
Longtime User
Thanks Erel, I totally forgot about the net library.. When using the net library it instantly fails when using just verizon's network. Wifi turned on it downloads just fine.
 
Upvote 0

Brad

Active Member
Licensed User
Longtime User
After launching ddm to catch any errors, it just hung and wouldn't error out. I believe this is a verizon issue so I tossed the ftp and went with a http download..Works great
 
Upvote 0
Top