How to Build a BT Downloader with Orange Pi and Other Linux Development Boards

S2E22

This summer, a few days before moving, I bought an Orange Pi. As for why I bought it, there isn’t much reason, just to play around and learn a bit. After all, Linux is still quite a tricky thing for me. In fact, Linux is indeed a rather tricky thing, but it doesn’t matter; you get used to it after a while, although I still haven’t figured out the issue of the application startup problem (this issue is quite strange; I’ve tried various methods and failed). So I just gave up. However, I still want to share some of my experiences with you, which are worth trying.

How to Build a BT Downloader with Orange Pi and Other Linux Development Boards

First, you need a development board. Of course, the price isn’t too high unless you plan to buy a high-end model. According to my experience, buying one with 4G of memory is enough for most people to tinker with, while 2G of memory is sufficient for long-term small workload tasks. Now, when booting up and connecting to SSH, the memory usage is still below 2GB. The main chip of the development board doesn’t need to be too good; it just needs to be sufficient. The Rockchip RK3588 is great, but it costs at least seven or eight hundred, so I bought a board with RK3566. Although the 4-core Cortex-A55 isn’t strong, it’s enough to handle Linux. The GPU G52 is just something I hope works; the important thing is that the power consumption is low. A heat sink can keep it running for a long time, and a relatively quiet fan can be used under high load. Although 22nm is quite an old process, at least it’s still Fin-FET.

This is my Orange Pi 3B, and I mainly focused on its rich expandability. It has 4 USB ports, allowing you to plug in a USB drive. The system can be installed on a MicroSD card or on an eMMC module (officially sold, but the price is a bit high; 64GB still costs 69 yuan, and it has been this price for many years; everyone is like this…). There’s even an NVMe m.2 slot that can also install the system, but the specifications are somewhat regrettable; it’s only a Gen2x1 low-end specification. Want better specifications? Please buy the RK3588 board, and you can spend more money.

How to Build a BT Downloader with Orange Pi and Other Linux Development Boards

Of course, if you think RK3566 is still too luxurious, you can choose a board from Allwinner A618, such as the Orange Pi Zero3. However, the performance of this board is not bad, but the expandability is terribly poor. Besides the storage card (which also needs to install the system), there is only one USB2.0, and if you don’t plug in a Hub, there isn’t even a place to plug in a mouse. However, the biggest advantage is that it is very compact, which is nice if you like it.

This type of development board must support video output (such as HDMI), otherwise, you will feel very uncomfortable.

I just used my 3B as an example (I don’t have other boards).

Once you get the board, you need a power supply. For my board, a 5V3A is best. I previously used my Huawei 5A charger to power it, and now I’m using a 3A “Cyber Dingzhen” adapter (to be honest, it’s a bit trashy; it was quite expensive when I bought it). The most cost-effective option is to buy a second-hand OPPO VOOC charger with a 5V4A specification, which is enough for the RK3588 board.

You also need a medium to install the system. I use a storage card because it’s relatively simple to install the system. Whether it’s an eMMC module or an NVMe SSD, both require “flashing”. Of course, flashing isn’t impossible, but it is a bit troublesome, and you also need a dual A data cable (just a USB2.0 one will do; you can use a phone charging cable and connect it with a A male to C female adapter). I’m just using the storage card as an example. The downside of the storage card is that its performance is much worse than that of eMMC, and compared to NVMe SSD, it’s like heaven and earth. However, Raspberry Pi users have tolerated this for many years, so I guess I can too; it’s just that the system is a bit slow.

Storage cards may have certain limitations, but I’ve tried brands like Patriot and Yi Su (za brands) cards and haven’t encountered any major issues, so there’s no need to insist on buying SanDisk; the price-performance ratio of Lexar is too low.

Since we are talking about storage cards, you will need a card reader, preferably a high-performance one. Don’t use a 5 yuan roadside trashy chip card reader (this kind of trashy card reader caused me a lot of trouble back then).

Finally, please prepare the flashing package, the system img image, which is available on the Orange Pi official website, but they use Baidu Cloud… I’m really speechless; the download speed is very slow. Please be patient; it will definitely be completed in one night.

I recommend the Debian Bookworm version (which is also Debian 12). There is also Ubuntu, which I have used before, but I find Debian to be a bit more stable (in fact, Ubuntu is a commercial branch of Debian). The main reason is that the system updates of Debian are as slow as a snail, so there is no upgrade anxiety.Arch I don’t recommend, as I feel everyone might not be used to it; everyone else is using apt or yum, and you are using pacman, no wonder you get stuck (very foggy).

I recommend using a desktop system with a GUI. Using without a GUI is really uncomfortable.

The flashing method is very simple; you need a Windows computer (I have said, if you don’t have some background, don’t mess around with Linux development boards). Insert the storage card into the card reader, plug the card reader into the computer, first format the storage card clean, and use Win32DiskImager to write to the card (be careful not to write wrongly; be careful of writing to the computer hard drive incorrectly, or all data will be lost).

Once the flashing is complete, remove the card, insert it into the development board, power it on directly without pressing any buttons, and just wait for it to boot up.

Once booted, the system’s GUI interface will appear on the screen. Of course, there are still many things you need to do, such as setting the system to Chinese. This is introduced in the manual, so I won’t go into it. I believe everyone speaks English well, and you can use the English system just fine.

First, develop a good habit of updating the software packages before installing software. The command is as follows:

sudo apt update

How to Build a BT Downloader with Orange Pi and Other Linux Development Boards

After that, upgrading the software on the first boot is also harmless:

sudo apt upgrade

You might ask, what do I use to execute these commands? In fact, there are many methods. You can buy on the GUI interface (the default GUI is xfce) of the desktop, right-click to open the terminal, and execute inside, or you can connect to the SSH from another computer to execute.

I almost forgot one point; the default root account password of the Orange Pi is orangepi

The default ordinary account of the Orange Pi is orangepi, and the password is also orangepi

If you are not used to it, you need to change it:

Linux GUI right-click to open the terminal, first execute

sudo passwd

It will prompt you to enter the password; please input orangepi

Then it will prompt you to enter a new password; please enter your preferred root account password. I will use 123456 as an example; please input it without showing.

Then execute

sudo passwd orangepi

It will prompt you to enter a new password; please enter your preferred ordinary user’s password. I will use 114514 as an example; please input it without showing.

Thus, the password modification is complete.

How to connect via SSH? First, set a fixed IP for the development board; this is a bit complicated, so I will explain slowly.

You need to connect to the network! Use a network cable to connect your router/switch device and the development board. Of course, you can also use Wi-Fi, but I still recommend using a network cable for stability and speed.

Right-click on the network connection icon in the upper right corner of the screen to configure the network and find the IP configuration option inside.

Choose any IP address you like, for example, 192.168.1.114 (be careful not to conflict with the IP of other devices in the local network). The format of IPv4 belongs to compulsory education, so I won’t elaborate here. Note that if your router’s gateway is not 192.168.1.1, but 192.168.2.1 (for example), then set the IP address to 192.168.2.114, and so on. The subnet mask is 255.255.255.0, and please use the router gateway address (for example, 192.168.1.1) as the DNS server. If you want to use public DNS (for example, 1.2.4.8 and 119.29.29.29), then enter the DNS addresses like this:

1.2.4.8,119.29.29.29

After that, confirm, and your internal network IP address will be fixed.

Then take out your Windows computer, preferably with Windows7 or above (the stubborn xp party please go away, thanks eggplant), open Windows Power Shell (Win11 is renamed “Terminal”), and enter:

ssh [email protected]

(192.168.1.114 is the IP you just set for the development board; you can set whatever you like)

Press Enter to execute, and it will prompt you to enter the password. Please input the password without showing; it’s 123456 (use whatever you like!).

Then you can control the development board through this Windows computer.

Because the Orange Pi system has OpenSSH Server installed by default, and there is no firewall, you can connect without installing these things, which is very thoughtful.

Now let’s start the main content~

First, install the BT software. Since you need to install PeerBanHelper, I recommend using the qBittorrent BT client, which has better compatibility.

Please execute the following command with root privileges in the Linux GUI terminal or via SSH:

sudo apt update

Use this command to update the software package information.

After that, execute:

sudo apt install qbittorrent -y

Then just wait.

Then you can find qbittorrent in the “Network” section of the menu in the upper left corner (the version used in Debian is 4.5.2, which is very old but very stable; I don’t recommend the 5.0 version because it has many bugs).

Set up qbittorrent, mainly the WebUI part. Enable WebUI, and just enter an asterisk (*) in the IP address field; don’t fill in anything else. You can set the port arbitrarily, but don’t let it conflict with other software! I recommend using 10721, no other reason; it’s just easy to remember because my wife is named Ayato Ningning!

(A tip: qbittorrent version 5.0.0 and later seems to not allow using ports below 10000, so listen to me; just use 10721, it’s easy to remember!)

Then, in the address bar of any device in the local area network, enter

192.168.1.114:10721

Press Enter, and you will be able to access the qbittorrent WebUI management interface of this development board, and you can manage torrents from another computer.

As for setting the storage path, it’s also a learning experience. Normally, if you log in to the system using the orangepi user, you can only manage the contents under the /home/orangepi/ folder. If you plan to plug in a USB drive, it won’t automatically mount on boot. Don’t ask; just know that it’s a unique feature of Linux.

How to auto-mount on boot? You need to know the UUID and then modify the /etc/fstab file.

You can obtain the UUID through a command:

sudo blkid

How to Build a BT Downloader with Orange Pi and Other Linux Development Boards

To easily find the name of your USB drive, it is recommended to set this USB drive’s label on another computer, for example, “usb” so that you can recognize it at a glance.

Then execute this command

sudo vi /etc/fstab

How to Build a BT Downloader with Orange Pi and Other Linux Development Boards

This command uses the vim editor to edit the fstab file. As for how to use the vim editor… it’s way too complicated; everyone should learn online. Just explaining how to use this editor would take me a thousand words. If you don’t want to learn, you can use another method—

In the terminal on the GUI desktop, execute:

sudo thunar

This opens the system’s built-in file manager Thunar with root administrator permissions. In this file manager, find the /etc/fstab file, double-click to open it, and you can edit the file in a more human-friendly way. Not to mention, the operation of vim is indeed anti-human; the nano text editor is a bit better. If you want to experience nano, you can install it:

sudo apt install nano -y

How to edit this file? Just add a line at the end of this file—

UUID=************ [mount point] [partition file system] defaults 0 0

For example, mine:

UUID=3868EA1168E9CDA6 /home/usb ntfs defaults 0 0

(The Orange Pi system supports data disks with NTFS partitions, which is very thoughtful.)

However! If you don’t want your USB drive to be emptied, it’s best to create this folder in the mount point first. You can create a folder using the root permissions of the Thunar file manager, or you can use the command:

sudo mkdir /home/usb

The mount point can be chosen anywhere. If you want convenience, you can even create a folder under the root directory “/” to mount it.

Note! Make sure to change it correctly; otherwise, the system may become unstable.

Not done yet! You also need to set the read and write permissions for the folder using this command:

sudo chmod 777 -R /home/usb

This command means to set the permissions of the /home/usb/ folder to be readable and writable by anyone. -R means recursively, which also applies to all folders under this folder.

If you care about security, I recommend you learn about the usage of chmod online. I can only say that the three numbers 777 look meaningless, but they have profound meanings.

Now you can set the download (working) folder of qbittorrent to this USB drive (or any folder under it). You can also set an automatic download folder, which means any torrent files saved in this folder will automatically download. In actual use, it’s simply wonderful.

However, although we have set up the download for BT, we have not yet turned this development board into an smb storage server for access by other devices, so we need to set up samba for sharing with the whole family.

First, install samba, execute:

sudo apt install samba -y

Then create a samba user:

sudo smbpasswd -a orangepi

Then please input your preferred password in the dark, for example, 1919810, press Enter to save, and enter it again to save.

Then modify the configuration file:

sudo vi /etc/samba/smb.conf

Of course, you can also modify it using the GUI interface with administrator permissions in Thunar, which is more intuitive.

Modification method:

[usb]

path = /home/usb

browseable = yes

writable = yes

guest ok = no

read only = no

valid users = orangepi

(Pay attention to every space)

How to Build a BT Downloader with Orange Pi and Other Linux Development Boards

[usb] indicates that the share name is “usb”, you can write it as you like, and the following configurations are easy to understand, so I won’t elaborate.

After that, save the file and exit.

Execute this command:

sudo systemctl enable samba

This means to set this service to start automatically on boot, then restart the development board.

Find a Windows computer on the same local area network, press Win+R to run, and enter \192.168.1.114\

Enter the account: orangepi

Enter the password: 1919810

How to Build a BT Downloader with Orange Pi and Other Linux Development Boards

Check if you can access the USB drive folder of this development board. If you can, it means success. You can map this usb share as a network drive for easy access.

Of course, I strongly recommend you install PeerBanHelper to avoid being leached. I won’t go into the specific methods now; perhaps there will be opportunities in the future.

流石雪菜

a.k.a. Sasuga Setsuna

Mizuiro-Aqua co-founder, editor

bilibili:@SasugaSetsuna

WeChat official account:@流石雪菜

Mizuiro-Aqua 10th Anniversary!

How to Build a BT Downloader with Orange Pi and Other Linux Development Boards

Leave a Comment

×