FTP Access¶
When the device is in FTP Server Mode, you can access the microSD card over the network using an FTP client.
Insecure Protocol
FTP is an inherently insecure protocol that transmits data, including credentials, in plain text. Only use this feature on a trusted, private network.
-
Switch to FTP Mode:
- Press the onboard button (single click) to switch from MSC to FTP mode.
- Alternatively, use the web API by sending a
POST
request to/mode/ftp
.
-
Connect with an FTP Client:
- Use any standard FTP client (e.g., <FileZilla>, <WinSCP>, or the command-line
ftp
). - Host: The IP address of your device (shown on the LCD).
- Port:
21
(the default FTP port). - Username: The username you configured in the WiFiManager setup page (default:
user
). - Password: The password you configured in the WiFiManager setup page (default:
password
).
- Use any standard FTP client (e.g., <FileZilla>, <WinSCP>, or the command-line
-
Upload File:
-
Open the Command Line:
- Windows: Open the Command Prompt or PowerShell.
- macOS or Linux: Open the Terminal application.
-
Connect to the FTP Server: Type the ftp command followed by the server address:
-
Enter Your Credentials: The server will prompt you for your username and password.
-
List Remote Files (Optional): You can list the files on the device by using the
ls
command: -
Navigate to the Local Directory (Optional): If the file you want to upload is not in your current local directory, you can change your local directory using the
lcd
(local change directory) command: -
Upload a Single File: Use the
put
command followed by the name of the file you want to upload:
-
Using Web API
You can also upload images using the Web API.
Using lftp
For automated synchronization, the scripts/sync.sh
script uses lftp
to mirror a local directory to the device. See the Synchronizing Files section for more details.
References¶
- <lftp>