Raspberry pie series (Part 3): source change of raspberry pie, WiFi connection, installation of transmission and samba


1, Raspberry pie for source

Model: Raspberry pie 3b

System: Raspbian system buster (August 20, 2020)


sudo vi /etc/apt/sources.list
 Cancel the original content and add the following content
#Ali's source
deb http://mirrors.aliyun.com/raspbian/raspbian/ buster main non-free contrib
deb-src http://mirrors.aliyun.com/raspbian/raspbian/ buster main non-free contrib
#Tsinghua source
deb http://mirrors.tuna.tsinghua.edu.cn/raspberry-pi-os/raspbian/ buster main non-free contrib rpi
deb-src http://mirrors.tuna.tsinghua.edu.cn/raspberry-pi-os/raspbian/ buster main non-free contrib rpi
sudo vi  /etc/apt/sources.list.d/raspi.list
 Cancel the original content and add the following content
deb http://mirrors.aliyun.com/raspbian/raspbian/ buster main
deb-src http://mirrors.aliyun.com/raspbian/raspbian/ buster main




2, Raspberry pie WiFi connection



sudo nano /etc/wpa_supplicant/wpa_supplicant.conf



Add content

ssid = "your wifi name"
psk="wifi password"


  • ssid: ssid of the network

  • psk: password

  • Priority: connection priority. The higher the priority, the higher the priority

  • scan_ssid: this value needs to be specified as 1 when connecting hidden WiFi

  • key_mgmt: encryption type


Restart the network

/etc/init.d/networking restart


3, Installing samba


Installing samba

sudo apt-get install samba samba-common-bin



Configuration file SMB conf

nano /etc/samba/smb.conf


Modify its configuration file / etc / Samba / SMB conf,


Find [global], change workgroup=MSHOME to workgroup=WORKGROUP (note that WORKGROUP here is the name of the WORKGROUP in the share) and add the following code (if it has been changed to WORKGROUP, only the following code is required)

   display charset = UTF-8
   unix charset = UTF-8
   dos charset = cp936 


Note: these three lines of code are to prevent the Chinese directory from being garbled


Add the following at the end of the file

# ======================
[share]           #The name of the shared file that will be displayed on the network
path = /share         #Path to shared file
valid users = pi        #Users allowed to access
browseable = yes        #Allow browsing
public = yes        #Sharing and opening
writable = yes        #Writable



After modification, save. Then restart the samba service and add the shared user:

Restart samba

 sudo service smbd restart


Some commands on the Internet are old and can no longer be used, as follows:

sudo /etc/init.d/samba restart


Add samba share user

sudo smbpasswd -a pi


Set password


4, Install transmission

  • Installation:

    sudo apt-get install transmission-daemon


    The installed version is 2.94


  • Authorize users:

    sudo usermod -a -G pi debian-transmission



  • Set the profile of Transmission:

    Suspend the transmission service and modify the configuration file

    service transmission-daemon stop
    sudo nano /var/lib/transmission-daemon/.config/transmission-daemon/settings.json
    #For the completed directory, set the directory yourself
    "download-dir": "/media/pi/SE/Download",
    #For the unfinished directory, set the directory yourself
    "incomplete-dir": "/media/pi/SE/DownloadCache",
    #The white list address that allows Web access can be used directly. Only LAN can access transmission Web
    "rpc-whitelist": ",192.168.199.*",
    #The following three items are the requirements for PT download
    "dht-enabled": false,
    "pex-enabled": false,
    "lpd-enabled": false,
    #The cache size is in MB. It is recommended to set it larger to avoid damaging the hard disk due to frequent reading and writing. It is recommended to set it to 1 / 6 ~ 1 / 4 of the memory size
    "cache-size-mb": 50


    Note: Raspberry pie buster comes with ntfs-3g. Plug in the NTFS hard disk and automatically mount it under / media/pi


  • Start service:

 sudo service transmission-daemon restart




Enter http: / / raspberry pie ip:9091 in the browser to access and start using.


  • How to modify the user name and password of transmission (optional, can not be set if the LAN white list has been made):

  1. Stop the service first: sudo service transmission daemon stop

  2. Modify the configuration file. The following two items are the user and password. You can see that this is an encrypted password. It doesn't matter. Just change the password to the plaintext you want:

    "rpc-username": "pi",
    "rpc-password": "123456",
  3. Start the service again: sudo service transmission Daemon Start. When starting, transmission will automatically encrypt the new password.



(very important!!!) transmission permission problem

Possible problem performance

permission denied

 Error : No data found! Ensure your drives are connected or use "Set Location". To re-download, remove the torrent and re-add 


chmod 0777 -R Download directory



transmission common commands

stop it

sudo service transmission-daemon stop


Restart configuration

 sudo service transmission-daemon reload
 sudo service transmission-daemon restart


View status

 sudo service transmission-daemon status



  • Transmission web interface optimization

Automatic installation script

1. Download script

wget https://github.com/ronggang/transmission-web-control/raw/master/release/install-tr-control-cn.sh


If you can't connect to github, go to the website: https://site.ip138.com/raw.Githubusercontent.com/

Enter raw githubusercontent. Com to query its relevant IP address:


Enter at the terminal:

sudo nano /etc/hosts


Add content

#github raw.githubusercontent.com raw.githubusercontent.com raw.githubusercontent.com


Execute the wget command again



2. Execute installation script

bash install-tr-control-cn.sh


According to the prompt, enter the corresponding number and press enter;


3. After installation, use your browser to access the Transmission Web Interface (e.g.: )You can see the new interface; If you can't see the new interface, the browser may be cached. Press Ctrl + F5 to force the page to refresh or wipe cache Then reopen it;


5, It's necessary to pass documents to raspberry pie

For / etc / SSH / sshd_ Modify the config file to enable root remote login

Add a sentence under permitrootlogin proxy password:

PermitRootLogin yes


After modification

# Authentication:

#LoginGraceTime 2m
#PermitRootLogin prohibit-password
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10


Just restart the system.

Then use xftp to enter ip, root and password to connect



Backup restore transmission


The transmission daemon file needs to be backed up

The entire directory of transmission under var/lib is backed up and copied


Recovery time

Need to restore by directory

stats.json, all files in torrents folder and all files in resume folder




Tags: Raspberry Pi

Posted by goldfiles on Wed, 11 May 2022 04:12:09 +0300