This example demonstrates how FTP client running on MCU reads a file from remote FTP server. It will connect to the FTP server "test.rebex.net", port number 21, then log in using username: "demo" and password: "password", and open the file "readme.txt". File will be read and its contents will be written over UART/Application output.
- Authors : MikroE , ORYX EMBEDDED
- Version : 3.0.0
- Date : ${COPYRIGHT_YEAR}.
- Connect Ethernet cable to ETH connector on the right side of the board.
- Connect USB-C cable to USB-UART connector on the left side of the board.
We provide demo code for testing FTP client functionality. For example to work, proper clock setup is needed. To create a setup with the adequate clock scheme, follow these steps:
- Click on Setups and select New.
- Select GCC ARM or RISC-V compiler and click on Advanced.
- From Redirect standard output to: drop down menu, select UART, and then click Save.
- Select Board you are using.
- Select your MCU and click on Advanced.
- Select Config scheme from drop down menu, it will have MCU_NAME_ETHERNET name.
- If you dont see MCU_NAME_ETHERNET scheme for your MCU then ETHERNET module is not supported.
- Click Save, then Next.
- Select desired display, and choose programmer/debugger tool.
- Click Finish.
- Program the MCU.
- In case of a setup with UART open Tools view (Ctrl + 7) and select UART Terminal. In case of setup with Application output, run debug and go straight to step 17
- Click on Options and change Port to the one you are using.
- Furthemore, change Baud rate to 115200 bps.
- Press Configure
- Click on Connect.
- When prompted, press the appropriate button, and on UART/Application output you can observe the process of connecting to FTP server and reading a file from it.