VxWorks, the real-time operating system from Wind River, is well-known for its reliability in embedded systems. One practical feature it supports is an FTP server, which enables efficient file transfers between a VxWorks target and a host machine. This guide walks through setting up and configuring an FTP server on VxWorks, with notes on compatibility, troubleshooting, and security.
Prerequisites #
Before you begin:
- VxWorks development setup (e.g., VxWorks 7 SDK or legacy versions like 5.5.1)
 - A target image with networking support enabled
 - An FTP client on your host (e.g., FileZilla, ws_ftp)
 - Familiarity with VxWorks Workbench or Tornado
 
Step 1: Add FTP Server Components to the Image #
- Open your VxWorks development IDE (Workbench or Tornado).
 - Configure your VIP (VxWorks Image Project):
- Add:
network components → networking protocols → network filesystem → ftp server 
 - Add:
 - Rebuild your VSB (VxWorks Source Build) and VIP to include the FTP server.
 - Deploy the new image to your target (e.g., QEMU, i.MX6 SabreLite).
 
Not all FTP clients work smoothly with VxWorks; FileZilla and ws_ftp are recommended for compatibility.
Step 2: Configure the FTP Server #
- 
Set the FTP root directory:
- Use the symbol 
FTPS_ROOT_DIRto specify the accessible directory. - For instance:
#define FTPS_ROOT_DIR "/ata0b" // Maps to the second partition - To serve multiple paths (e.g., 
ata0a,ata0b), ensure your image mounts both. 
 - Use the symbol 
 - 
Start the FTP server:
- If configured to start automatically, it launches on boot.
 - Otherwise, use:
ftpServerStart(); 
 - 
Configure credentials:
- Defaults are often:
Username: target Password: vxTarget - Customize for better security (if supported by your version).
 
 - Defaults are often:
 
Step 3: Access the FTP Server from a Host #
- 
Install an FTP client on your host (e.g., FileZilla).
 - 
Connect using:
- Host: 
<VxWorks_Target_IP> - Port: 
21 - Username/Password: 
target/vxTarget 
 - Host: 
 - 
Browse and transfer files:
- You can now upload, download, or even load applications like 
hello.vxefrom the target. 
 - You can now upload, download, or even load applications like 
 
Step 4: Access Host FTP Server from VxWorks #
- 
Host-side FTP server setup (Linux example):
sudo pip install pyftpdlib python -m pyftpdlib -u target -p vxTarget -d $HOME - 
From VxWorks shell, mount the remote server:
netDevCreate("wrs:", "192.168.1.100", 1); // Replace with your host IP cd "wrs:/home/your_user" - 
Access remote files like:
sp "hello.vxe" 
Optional: Use ftpLib for Programmatic File Transfers 
    
    
    
        #
            
    
For embedded apps needing file transfers:
#include "ftpLib.h"
int ctrlSock, dataSock;
ftpXfer("192.168.1.100", "target", "vxTarget", "", "RETR %s", "", "data.txt", &ctrlSock, &dataSock);
Suggested snapshot: Terminal output showing successful file transfer using ftpXfer.
Troubleshooting Tips #
- Can’t connect? Check port 21, firewalls, or DHCP-assigned IPs.
 - Large file failures? Try smaller files or switch to FileZilla Server on the host.
 - Command errors? Use 
ftpCommand()return codes for insight. 
Security Considerations #
- Avoid default credentials in production.
 - No built-in FTPS/SFTP: consider firewalls and limiting external access.
 - Disable FTP when idle to reduce attack surface.
 
Summary #
Setting up FTP on VxWorks can streamline file operations for embedded systems. With correct configuration and security hygiene, you can:
- Share files between host and target efficiently
 - Automate transfers with 
ftpLib - Access remote data on demand
 
For more details, check:
- VxWorks Network Programmer’s Guide (Chapter 8)
 ftpLibAPI documentation