Archived Forum Post

Index of archived forum posts


can't ftp over tmobile 28.4 in iOS

Jul 10 '17 at 15:42

I used Ftp2 to upload/download file in iphone/ipad app, and it ran well more than one year.

I guess tmobile upgrade the network. my app can work on ipad(tmobile 28.3), but can't work on iPhone(tmobile 28.4). I tried att/version, both are good. so the problem is tmobile 28.4, it is IPV6 issue?

please help.


If using an old version of Chilkat, update to see if the latest version solves the problem.


applied the latest version, but issue is still there. it can work under wifi/att, but can't work under tmobile 28.4. you can try a simple sample in tmobile iphone(ios 10.3.2)

BOOL success; success = [ftp UnlockComponent: @"abcdef.XXXXXXX_00000XXXXXX"]; if (success != YES) { NSLog(@"%@",ftp.LastErrorText); return ret; }

ftp.Passive = YES;
ftp.Hostname = @"";
ftp.Username = @"pichai"; 
ftp.Password = @"iamstupid"; 
ftp.Port = [NSNumber numberWithInt:21];
//ftp.PreferIpv6 = YES;
//ftp.AuthTls = YES;
//ftp.Ssl = NO;
success = [ftp Connect];
if (success != YES) {
    return ret;
else {

[ftp GetFile: remoteFilename localPath: localFilename]; ...


Does the Connect method call work OK, but then the call to GetFile fails? If so, then my guess is that it's a firewall or something security related blocking the FTP data connection. Try also setting the ftp.PassiveUseHostAddr property = YES.


I tried to set passiveusehostaddr property to yes, but same issue,ConnectFailReason = 7

> ftpConnect:
>       Hostname:
>       Port: 21
>       IdleTimeoutMs: 60000
>       socket2Connect:
>         connect2:
>           connectSocket:
>             connect_ipv6_or_ipv4:
>               socketErrno: 51
>               socketError: Network is unreachable
>             --connect_ipv6_or_ipv4
>           --connectSocket
>           ConnectFailReason: Connection rejected
>         --connect2
>       --socket2Connect
>       ConnectFailReason: 7
>     --ftpConnect
>     Failed to connect to FTP server.
>     Failed.   --Connect_Ftp2
> --ChilkatLog


if I set PreferIpv6 = yes. app can connect to ftp server, but call GetFile failed. BTW, we don't change any company network related setting recently.

          passive transfer mode
              sendingCommand: PASV
              replyLineQP: 229 Extended Passive Mode Entered (|||4816|)
            Malformed PASV reply (4)
            ReplyText: 229 EXTENDED PASSIVE MODE ENTERED (|||4816|)
          Failed to setup passive data socket for upload
        Failed to setup data connection for download.
            recvUntilMatch: Socket operation timeout.
            Failed to read FTP control channel reply.
            readFtpReply: Socket operation timeout.
      downloadToOutput: Elapsed time: 1320 millisec


I Googled "ios network is unreachable" and found this:

Specifically (from the web page linked above) "... I just got it working. Turns out it was the bad T-Mobile carrier settings. ..."