Embedded FTP server - dwhinham/mt32-pi GitHub Wiki
As of version 0.11.0, mt32-pi includes an embedded FTP server to allow you to transfer files to and from the Raspberry Pi over the network, and avoid the requirement of ejecting the SD card. This makes it easier to update mt32-pi, change its configuration, or add/replace SoundFonts.
FTP is quite an old protocol, therefore client software is available for almost any system. It should not be confused with SFTP, SSH or SCP. Because mt32-pi is a baremetal implementation and not a generic Linux environment, it is not possible to simply run an SSH or FTP server daemon - any kind of networking protocol has to be integrated into the kernel code by hand. Hence, FTP was chosen for its simplicity.
⚠️ Note: The FTP server does NOT implement any security/encryption extensions such as FTPS, therefore it should NEVER be used on a public network, or be exposed to the Internet (e.g. via port forwarding). It is provided as a convenience feature for your private LAN/home network ONLY.
Supported features/limitations
- The server listens on port 21.
- Active and passive modes are both supported.
- You can access the SD card and/or a connected USB mass storage device.
- Storing/retrieving/renaming/deleting files, and directory creation/renaming/deletion is supported.
- Various clients have been tested: Directory Opus, FileZilla, lftp, ncftp, Windows Explorer, WinSCP.
- FTPS (FTP-SSL) is not supported.
- Only a single login account is supported, and no permissions are implemented (it can read/write everywhere on the filesystem).
- ASCII mode is not properly implemented - always use binary mode or you will experience file corruption.
- Multiple connections are supported, however this is not recommended. You should limit your client to a single connection otherwise it is possible that mt32-pi could freeze.
Setup
Enable Networking in mt32-pi, and enable the ftp
configuration option. The default username and password are both mt32-pi
; you can also change these by setting ftp_username
and ftp_password
if you like.
With networking enabled, mt32-pi will briefly display its IP address on the LCD once it connects successfully. mt32-pi will then be listening for FTP connections.
Using FileZilla
This is a popular cross-platform FTP client which works well, but the default settings are not ideal for mt32-pi. Change the transfer type setting as follows:
- From the Edit menu, choose Settings.
- Under the Transfers section, choose FTP: File Types.
- Change Default transfer type to Binary.
When creating a new entry in the Site Manager, make sure you use the following settings:
"General" tab
- Protocol: "FTP - File Transfer Protocol"
- Host: Use mt32-pi's hostname or IP address -
mt32-pi
is the default hostname - Port: Leave blank (or enter 21)
- Encryption: "Only use plain FTP (insecure)"
- Logon Type: "Normal"
- User/Password:
mt32-pi
/mt32-pi
(unless you have changed them in the configuration file).
"Transfer settings" tab
- Limit number of simultaneous connections: Enabled (checked)
- Maximum number of connections: 1
Issues
Attempting to transfer multiple files at once using multiple connections in parallel can overwhelm the server and cause connections to hang/time out, or mt32-pi to freeze. You should limit your client to a single connection.