3-5 Remote File Transfer

Learning Objectives

This chapter will guide you on how to establish a file-sharing mechanism between your Pandora development board and a host computer. By learning the application of the SMB (Server Message Block) protocol, you will be able to:

1. Understand how to create shared folders in Windows and have Pandora mount and access them.

2. Learn how to set up Pandora as an SMB Server, allowing other computers to remotely access its files.

3. Become familiar with using the SMB protocol for bidirectional file transfer and sharing in a cross-platform environment.

Setting Up SMB Server on Your Computer and Connecting from Pandora

1. Create the folder you want to share (e.g., shared_folder as shown in the image). This folder will serve as the directory exposed by your SMB server.

2. Right-click on the folder, select "Properties," and switch to the "Sharing" tab.

3. Click the "Share..." button. A "Network access" window will pop up, where you can choose sharing permissions and select who to share with based on your needs. Once configured, click the "Share" button at the bottom to enable network sharing for this folder.

4. Back in the Sharing tab of the Properties window, you can view the network share path for this folder (usually displayed as \\ComputerName\FolderName). You will use this path later to connect from Pandora.

5. Return to your Pandora development board, open the File Manager on the desktop, and select "Other Locations" from the left-hand menu.

6. In the "Connect to Server" field, enter the shared path, for example: smb:///. After entering, click "Connect" to establish a connection with the remote shared folder.

7. Based on the sharing permissions previously configured on Windows, the system may prompt for a username and password. Please enter the full username (for example, Ken_xxxxx@yuan.com.tw as shown in Figure 3). After entering the corresponding account information according to the configuration, click Connect.

8. If the connection process is successful, you will be able to open and browse the remote shared folder, completing the setup for accessing files from the computer on the Pandora side.

Setting Up SMB Server on Pandora and Connecting from Your Computer

1 Open the terminal and execute the following commands to update the package list and install Samba-related packages:

sudo apt update
sudo apt install samba samba-common -y

 

2. Create the folder you want to share. This folder will only be accessible by specific users (e.g., pandora) after they log in.

mkdir -p /home/pandora/shared_folder

 

After creation, you can use ls -l to confirm if the folder was created successfully and if the permissions are correct.

3. Open Samba's main configuration file with a text editor to add the shared folder settings:

sudo gedit /etc/samba/smb.conf

(1) Input the following configurations and save the file:

[global]
workgroup = WORKGROUP
server string = Pandora Samba Server
netbios name = Pandora
security = user
map to guest = Bad User
dns proxy = no

[private]
path = /home/pandora/Documents/shared_folder
browsable = yes
writable = yes
valid users = pandora
guest ok = no

 

4. Add your local user (e.g., pandora) to the Samba user database and set a Samba access password:

sudo mbpasswd -a pandora

 

5. After making changes, you need to restart the Samba server service:

sudo systemctl restart smbd

 

6. Based on the Samba configuration, if the shared folder is restricted access (like private), the system will prompt you for the Samba username and password (e.g., the pandora account you added earlier). Enter them correctly to successfully connect.

Common Issues

Q1: Pandora cannot connect to the Windows shared folder.

A1-1: Please verify that the full username is entered correctly.

A1-2: Ensure that the firewall allows the required SMB ports (TCP 445, 137–139).

Q2: File transfer speed is very slow.

A2: Please check if the network connection between Pandora and the Windows host is Gigabit (1Gbps). You can check the actual negotiated speed using ethtool on Linux or Windows network status. If either side only supports 100Mbps, the transfer speed will be limited.

Q3: I want to use native Linux permissions instead of Windows sharing permissions.

A3: It is recommended to use NFS (Network File System) instead of SMB. NFS is a network file system natively supported by Unix-like systems, which is more suitable for sharing data in a Linux environment and can preserve Linux permission settings like UID/GID.

Q4: smb.conf cannot be saved.

A4: Remember to open the text editor with sudo privileges.

 

Copyright © 2026 YUAN High-Tech Development Co., Ltd.
All rights reserved.