Sapphire FTP Utility Questions

Why can I not see any files on the remote server?

If you have found that you can connect to your remote server but cannot see any files, you may find that you need to change whether you connect in passive or non-passive mode. Alternatively, please ensure that there are files in your remote FTP server's default directory.

I get error 12003, what does this mean?

This may be caused by an unexpected status error being returned by the remote FTP server. The following refers to this error when using non-Microsoft FTP servers:;en-us;q168492

Other suggestions would be to verify the security permissions for the FTP account ensuring that it has read and write access to the FTP directory.

Please ensure that you are passing in the Passive option as either 1 for Passive mode and 0 for Active mode. Please do not pass in a boolean variable as this has been known to cause problems.

I get error 12103, what is happening here?

It is most likely that the error number 12103 translates to the system error number of 12003. Please refer to the above.

I can't connect to my FTP server

This may be caused for a variety of reasons. It could be a misspell in the server's domain name or IP address or a problem at some point within the network. One recommendation is to verify the connection to your FTP server by using a PC based FTP client application (e.g. DOS FTP) to connect to your server. If possible, try to ensure that this client application is connecting in a similar manner as your device, for example, through the same ISP or internal network.

If you are using Pocket PC 2002, please ensure that you have the End User Update (EUU2) patch installed on your client device. There was an initial bug in the underlying operating system that caused problems when trying to connect to FTP servers. You should be able to find the update from your manufacturer's web site. Sadly the emulator version also suffers from the same problem.

Please note, if you are using Pocket PC 2002, please ensure that you have the latest patch installed called EUU2 (downloadable from your manufacturers web site). There is a known problem when trying to connect to FTP servers and updating this will fix the problem. Sadly the Emulator version of Pocket PC 2002 also suffers from the same problem. Here are some manufacturer's web site links:

The file transfer hangs or fails when using ActiveSync

This may be a problem caused by ActiveSync itself. In some situations it has been found that ActiveSync times out a connection that can interrupt any client applications such as the Sapphire FTP Utility. The only recommendation would be to try and connect via a different method such as though a LAN adapter.

sFTPPut and sFTPGet don't work

If you are using Pocket PC 2002 then you may find the sFTPPut and sFTPGet functions do not work. Please use the sFTPPush and sFTPPull functions as a replacement.

I am not seeing the error text properly

You may not see your error messages properly if you have not initialised the message string variable with some space in memory. It is recommended that you allocate the message with an associated number of spaces in VB before using it within the Sapphire FTP DLL. Please refer to the demo project on how to do this.

The file I am uploading is zero bytes and it shouldn't be

This is a common problem when using earlier versions of ActiveSync to connect to your FTP server. For some reason, ActiveSync can terminate an upload transfer to some FTP servers resulting in the application unexpectedly completing the transfer, hence it being zero bytes. Please ensure that you are using at least ActiveSync version 3.7.1 to resolve this issue.

I have problems transferring multiple files through ActiveSync

You may find instability issues when transferring multiple file to/from your FTP server through ActiveSync. The only recommended resolution to this is to try an alternative connection method such as GSM or direct LAN access.

I can only connect to IP address and not server domain names

This is most likely due to a configuration problem with your network on the Pocket PC. Your device may not have the correct DNS server addresses configured so it is unable to resolve the DNS name of your FTP server.

What's the difference between passive and active mode?

How do you know when to use active or passive mode. Well, before we go into that, let's explain a little about how FTP works.

When you make an FTP connection to your server you create what is called a control connection. This is most commonly done using port 21. This control connection allows the client to request actions from the server. This could be as simple as logging into the server to creating directories and deleting files.

There are two types of data that you will transfer. The first will be the directory listing and the second will be a file. The control connection will request that a data connection be opened for the actual data. The data connection can either be used to send data (upload a file) or receive data (download a file or directory listing).

It is then common for an FTP connection to have a new connection created to your server for this so called data connection. So, who connects to whom for the data connection? Does the client connect to the server again (just like for the control connection on port 21)? Or does the server connect back to the client?

This is where active and passive mode comes in.

Active Mode

This is where the server connects back to the client. This will only work if the server can see the IP address of the client. If the client’s IP address is routed through an internal network or behind a firewall, then the server will not be able to see it and the data connection will timeout.

Passive Mode

This is where the client creates the connection to the server. This is ideal if your client is behind a firewall. But sometimes the FTP server may be behind a firewall and won’t allow any other connections other than port 21. You would have to contact the administrator of the server to allow some passive connection port numbers to be allowed by the firewall if active mode isn’t an option.