Arduino Ethernet Lib. Let’s apply FTP Client to Ethernet Shield-WIZ550io




Arduino Ethernet Lib. Let’s experience SD file system and Ethernet communication simply by using WIZ550io, which is a representative Ethernet Shield of File transfer protocol (FTP) Client


Preparation materials

  1. Hardware :
    – Arduino board
    – Ethernet Shield : WIZ550io with ioShield-A (included Micro SD connector)
    – Micro-SD Memory card
  2. Software :
    – Ethernet Lib. : WIZ_Ethernet_LIB_IDE-1.5.7 (included FTPPassiveClient Sketch)
    – SD Lib. :
    – Arduino IDE : IDE 1.5.7
    – Ethernet example : FTPPassiveClient sketch
  3. Etc
    – FTP Server on PC side

Arduino Due + Ethernet Shield is based on Ethernet and SD Lib. It uses FTPPassiveClient to connect to FTP Server on PC and download predefined file.

Download the Library from here:

Zip File link:


Setting of FTPPassiveClient Sketch

  1. WIZ Ethernet Lib setting
    To use WIZ550io
    , check lines 19 ~ 24 of “~ / arduino1.5.7 / libraries / Ethernet / src / utility / w5100.h” file .
    #define W5500_ETHERNET_SHIELD // use WIZ550io or W5500
    #if defined (W5500_ETHERNET_SHIELD)
    #define WIZ550io_WITH_MACADDRESS // use WIZ550io’s MAC address
    #include “utility / w5500.h”
  2. Network setting The
    Arduino Due + Ethernet Shield and the PC running the FTP Server must be set up on the same network, which can be set on the PC or Board side.
    First, if Sketch’s IP address is set to and the subnet and gateway are set to and,
    the IPaddress function of Sketch is set to
    IPaddress ip (;
    IPaddress gateway (;
    IPaddress subnet (; 

    The second method is Sketch’s network configuration. In case of windows, you can configure IP / Subnet / gateway using the address in the first example in Local area connection-> Properties-> Internet Protocol-> Properties .
  3. FTP address Account / password setting / filename
    FTP address, account, and passowrd can be applied to Sketch using the FTP server settings.
    For example, if the setting of the following FTP Server
    FTP in the Address IP: to
    the Account: Test
    Password: testtest
    test.txt: Download file name you want to
    be when in the Sketch to modify the section below. 
    -28Line: IPAddress server (; // FTP IP address
    -36Line: char fileName [13] = “test.txt”; // Prepare test.txt on Server side !!
    -126Line: clinet.println (F (“USER test”)); // FTP account
    -130Line: clinet.println (F (“PASS testTest”)); // FTP account

Now that the preparation is complete, after downloading sketch to the board after compiling, I confirmed that the test.txt will be downloaded to the Micro-SD card of the board after logging in using FTP server account and password. It also reads the last file from the SD card and outputs it to the serial port.

Tip 1. WIZ550io and Micro-SD data lines use Serial Peripheral Interface Bus (SPI) and distinguish WIZ550io and Micro-SD with Chip Select (CS) signal. WIZ550io uses GPIO D10 and Micro-SD uses D4 as CS. In order to prevent collision of CS with existing code, D10 of GPIO is set to Output high before Init of Micro-SD, and then Init of WIZ550io is executed. In this sketch, WIZ55oio is initialized first and then SD is changed to Init. .

Tip 2. Space is required when setting FTP USER and PASSWORD. Because of this, I can not do login for a while. I figured out after I captured the packet with WireShark

Tags: 201802, WizFi250, Ethernet, Wiznet, Arduino, FTP



Please Login to comment
Notify of