Skip to main content

File Transfer

In daily development, we often need to transfer files between the local machine and the development board. While there are various methods available, this article focuses on a few commonly used file transfer methods.


File Transfer Using Electerm

Electerm is an open-source SSH/SFTP client developed with Electron. It is compatible with Linux, macOS, and Windows operating systems.

  1. SSH Login to the Development Board
  2. File Transfer.

File Transfer Using ADB

  1. Connect the development board to the PC via USB. Upload files or folders from the PC to the root directory of the development board.

  2. Execute the adb push command in PowerShell to upload files or folders to the development board:

    adb push test/ /home/luckfox
    • Result is as follows:
  3. Download the file 1.txt from the /home/luckfox directory on the development board to the PC:

    adb pull /home/luckfox/1.txt .

Transferring Files with SCP

scp (Secure Copy Protocol) is a secure remote file copy command based on SSH. It supports copying files or directories between Linux servers. Unlike cp, which only works locally, scp enables cross-server file transfer.

All data transferred via scp is encrypted, ensuring secure transmission.

scp is ideal for quick and simple transfers of a few files, especially in resource-constrained environments. For complex file transfers or backups, consider using rsync, which only transfers differences between the source and destination, saving bandwidth and time, especially for large or frequently updated files.

  1. Transfer a local file to the development board:

    scp  luckfox.txt luckfox@192.168.10.95:/home/luckfox
  2. Transfer a local directory to the development board:

    scp -r luckfox luckfox@192.168.10.95:/home/luckfox
  3. Transfer a file from the development board to the local machine:

    scp luckfox@192.168.10.95:/home/luckfox/luckfox.txt .
  4. Transfer a directory from the development board to the local machine:

    scp -r luckfox@192.168.10.95:/home/luckfox/luckfox .

Using Samba for File Sharing

When working with the Omni3576, file transfers between Windows and the Omni3576 can be facilitated using Samba services. This allows seamless access to the Omni3576 file system via Windows Network Neighborhood.

  1. Update package sources:

    sudo apt-get update
  2. Install Samba:

    sudo apt install samba samba-common-bin -y
  3. .After installation, modify the configuration file /etc/samba/smb.conf:

    sudo vim /etc/samba/smb.conf
    将 homes 下的 read only = yes 改成 read only = no
  4. Restart the Samba service:

    sudo /etc/init.d/samba-ad-dc restart
  5. Add the default user luckfox to Samba and set a password:

    sudo smbpasswd -a luckfox
  6. Access Omni3576 from Windows by entering the following in the address bar (replace with your actual IP address):

    \\192.168.10.95\luckfox
  7. Enter the username luckfox and the password set earlier to access the Omni3576 directories.