I am using the FTP part of the net library to upload a file containing GPS coordinates that will later be displayed on the web in a leaflet map marker.
It works without issues if I have connected the mobile to WIFI either in release or debug mode.
But switching off WIFI and activating mobile data connection does not work. These are the important parts:
With WIFI on all messages are shown in this order:
- "Uploading..."
- "Listing..."
- "Uploaded 66 bytes"
- "Upload ok"
- "Listing complete"
If I use mobile connection then only "Uploading..." and "Listing..." are shown. The events are never raised.
The strange thing is that the file 'gps.js' on the FTP Server IS created but has zero length. So it seems that the packet stream is blocked somehow or hangs.
But why? What's the differnce between WIFI and mobile data connection here?
It works without issues if I have connected the mobile to WIFI either in release or debug mode.
But switching off WIFI and activating mobile data connection does not work. These are the important parts:
Related parts:
Private Sub btnSend_Click
...
ToastMessageShow("Uploading...",True)
FTP.UploadFile(sDir, "gps.js", False, "/xy.com/abc/gps.js")
ToastMessageShow("Listing...",True)
FTP.List( "/xy.com/abc/")
...
End Sub
Sub FTP_ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)
ToastMessageShow("Listing completed: " & Success, True)
End Sub
Sub FTP_UploadProgress (ServerPath As String, TotalUploaded As Long, Total As Long)
ToastMessageShow("Uploaded " & TotalUploaded & " bytes", True)
End Sub
Sub FTP_UploadCompleted (ServerPath As String, Success As Boolean)
If Success = False Then
ToastMessageShow("Error uploading.", True)
Else
ToastMessageShow("Upload OK", True)
End If
End Sub
With WIFI on all messages are shown in this order:
- "Uploading..."
- "Listing..."
- "Uploaded 66 bytes"
- "Upload ok"
- "Listing complete"
If I use mobile connection then only "Uploading..." and "Listing..." are shown. The events are never raised.
The strange thing is that the file 'gps.js' on the FTP Server IS created but has zero length. So it seems that the packet stream is blocked somehow or hangs.
But why? What's the differnce between WIFI and mobile data connection here?