Video Tutorial (Optional)
Watch first if you want to follow the full setup for enabling FTP on the Raspberry Pi Pico W in MicroPython.
Project Overview
Raspberry Pi Pico W + MicroPython FTP (ftplib): In this tutorial, you enable FTP support on a Raspberry Pi Pico W by adding a working ftplib.py file, so you can connect to (FTP into) an external FTP server from MicroPython.
The Pico W does not support FTP out of the box, and the micropython-ftplib library shown in Thonny can be a non-functional (dummy) library. This approach uses the real MicroPython-compatible code from GitHub.
- Time: 5 to 15 minutes
- Skill level: Beginner
- What you will build: A Pico W MicroPython setup that can use a working FTP library to connect to an external FTP server
Parts List
From ShillehTek
- Raspberry Pi Pico 2W - the WiFi microcontroller board used in this build
External
- MicroPython firmware on the Pico W
- Thonny (or another MicroPython editor) to create/upload files
- WiFi network access for the Pico W
- An external FTP server you can connect to
- Working ftplib.py source (GitHub)
- FTP usage example (GitHub)
Note: The key requirement is placing ftplib.py on the Pico W filesystem (top-level directory) so your MicroPython code imports the working library instead of relying on a non-functional Thonny package.
Step-by-Step Guide
Step 1 - Create ftplib.py on your Pico W
Goal: Add a working FTP library file to the Pico W so MicroPython can import it.
What to do: Create a new file on your Raspberry Pi Pico W named ftplib.py in the highest (top-level) directory on the Pico.
Copy the contents from this GitHub file and paste it into your ftplib.py, then save:
Expected result: You can see ftplib.py on the Pico W filesystem, and it is ready to be imported by your MicroPython scripts.
Step 2 - Use the FTP library in your MicroPython code
Goal: Confirm you can begin using the FTP library in your project.
What to do: Use the example provided here:
Expected result: Your Pico W code can import the library and you can start FTPing (connecting to an external FTP server) from MicroPython.
Conclusion
You set up FTP support on a Raspberry Pi Pico W by adding a working MicroPython ftplib.py file to the Pico filesystem, enabling your scripts to connect to an external FTP server.
Want parts for your next Pico W build? Grab what you need from ShillehTek.com. If you want help adapting this workflow to your device, network, or product requirements, check out our IoT consulting services.


