Try this in your FTP start function (as Rex_Alex said, only after you are sure your GPRS bearer has started correctly):
const ascii * FTP_STR_HOSTNAME = "www.yourftpaddress.com";
static void pfk_FTPStart (void)
{
const ascii * FTP_STR_USERNAME = "test123";
const ascii * FTP_STR_PASSWORD = "test123";
TRACE((FTP_TRACE_LEVEL1, FTP_STR_USERNAME));
TRACE((FTP_TRACE_LEVEL1, FTP_STR_PASSWORD));
if (wip_netInit() == 0)
{
FtpCnxCh = wip_FTPCreateOpts((ascii *) FTP_STR_HOSTNAME, pfk_ftpCnxHandler, NULL, WIP_COPT_USER, FTP_STR_USERNAME,
WIP_COPT_PASSWORD, FTP_STR_PASSWORD, WIP_COPT_PASSIVE, TRUE, WIP_COPT_TYPE, (ascii) FTP_TYPE,
WIP_COPT_PEER_PORT, 21, WIP_COPT_END);
if (FtpCnxCh != NULL)
{
TRACE((FTP_TRACE_LEVEL1,"[pfk_FTPStart] FTP control channel created: %d", FtpCnxCh));
}
else
{
TRACE((FTP_TRACE_LEVEL1,"[pfk_FTPStart] FTP channel cannot be created: %d", FtpCnxCh));
pfk_ftpError();
}
}
else
{
TRACE((FTP_TRACE_LEVEL1, "[pfk_FTPStart] Could not re-init WIP"));
}
}