Raspberry Pi 4B system construction (Raspberry)

1. Construction preparation

1. Download the Raspberry Pi system

download link:

Operating system images – Raspberry Pi /icon-default.png?t=N7T8″ alt=”icon-default.png?t=N7T8″>https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os -legacy

Operating system images – Raspberry Pi /icon-default.png?t=N7T8″ alt=”icon-default.png?t=N7T8″>https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os -legacy

Find here and click the first one. Since the latest system cancels the default username and password login, the latest system must use an external display screen, keyboard and mouse to set the username and password.

If you bought a display screen, you can download the latest system; if you did not buy a display screen, click on archive to download and select a version before 2022-4-07.

2. Format SD card

Prepare a 32G TF card (officially recommended to be larger than 4G), download SD Card Formatter to format the TF card into FAT32 format

Note: Do not use the formatting tool that comes with the win system. After success, the Files system displays FAT32 as shown in the figure.

3. Burn image

Image writing tool? Download link: https://sourceforge.net/projects/win32diskimager/icon-default.png?t=N7T8https://sourceforge.net/ After downloading and installing projects/win32diskimager/, import our image. Mine is 2021-12-02-raspios-buster-armhf.img and click Write and wait for completion.

It is estimated to take about four minutes, but the actual writing speed may vary.

2. Assembly system

Scenario 1: You have a self-purchased screen, mouse, and keyboard
After powering on, it automatically enters the desktop and a configuration wizard will pop up. Just follow the prompts. It is almost the same as configuring Windows startup configuration. Finally, restart.

Situation 2: No screen, mouse, or keyboard, so let’s focus on how to set up and operate the remote desktop.

1. Open boot(G:) (that is, SD card) on my computer

First create a new .txt file and rename the created .txt file to ssh (no suffix), so that the SSH channel is opened by default; secondly, create a wpa_supplicant.conf file.

One thing to note in the second step is that the created text document should not have the name first but write the configuration before changing it. Otherwise, other software is needed to open the document. The wpa_supplicant.conf file configuration code is as follows. WiFi name and password. Thank you. Just make your own:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=CN
 
network={
            ssid="jjj"
            psk="07100710"
 
}

After completing the above steps, drag the SSH and wpa_supplicant.conf files directly into the SD card to eject the SD card and insert it into the Raspberry Pi. In this way, it will automatically connect to WiFi and enable the SSH channel after powering on for the first time (in After the system is started once, insert the SD card into the computer again. The above two files will disappear, which is normal. At the same time, this can also be used as a method to judge whether the Raspberry Pi starts normally.) In the cmd background, or use the IP scanning tool to obtain the distribution assigned to the tree. Once you have the IP of the Raspberry Pi, you can use tools like SecureCRT or Putty to access the Raspberry Pi using SSH.

2. Obtain Raspberry Pi IP

Win + R, enter cmd and press Enter, then enter ping raspberrypi -4 (replace raspberrypi with your After setting the host name), you can see the IP address.

Note: Make sure that the WIFI written in the above code is consistent with the computer. The Raspberry Pi and the computer need to be on the same network. Use your mobile phone to open the hotspot. The Raspberry Pi and the computer are connected at the same time, or the computer opens the hotspot after the computer is connected to the network. Raspberry Pi connection.

If the connection is successful, a pop-up will appear:

You can get my Raspberry Pi IP: 192.168.137.111

(The IP address may be different every time, please see my other blog to configure a static IP)

https://blog.csdn.net/A469333242/article/details/134352148?spm=1001.2014.3001.5502icon-default.png?t=N7T8https: //blog.csdn.net/A469333242/article/details/134352148?spm=1001.2014.3001.5502

If not connected to the same network, it will pop up:

3. Configure PuTTY

download link:

Download PuTTY: latest release (0.78)icon-default.png?t=N7T8https://www.chiark.greenend.org.uk/~sgtatham/putty/latest .html

Find it, download and install it, open it, fill in your Raspberry Pi IP in the IP address and click open.

Then you can enter the terminal by entering the Raspberry Pi account and password. The default account is: pi, and the default password is: raspberry (characters will not be displayed when entering under the Linux system). If you make a mistake, just re-enter it. Access will pop up if you make a mistake. denied, correct and press Enter to get the following interface:

Then enter sudo raspi-config to open the Raspberry Pi configuration interface as shown below. Use the up, down, left, and right keys on the keyboard and press Enter to control the interface.

Select screen settings. I selected 7 Advanced Options, then 5 Resolution, and then selected the largest 1920×1080. Otherwise, the remote desktop may have a black screen, or select it according to your needs.

In 5 Interfacing Options, click on P3 VNC, click on P1 Camera and P2 SSH by the way, and then click OK to return.

After clicking VNC, it will ask you whether to enable the VNC server.

Then it will display: Start successfully

4.VNC remote access

VNC download address: Download VNC Viewer | VNC? Connecticon-default.png?t=N7T8https://www.realvnc.com/en/connect/download/viewer /

After downloading and running, re-open PuTTY, then enter sudo apt-get install tightvncserver. The meaning of this code is to install the VNC service, and then enter Y to continue.

After completing the installation, enter vncpasswd to set the client password, which will be used later.

Finally, enter vncserver on the console to start the VNC service. Remember this 1, which is also used after the service number.

Open VNC Viewer, click File above and then click New connection. Properties will pop up. Enter the Raspberry Pi corresponding IP address and service number in the VNC Server. You can enter the Raspberry Pi name in Name or leave it blank, and then click OK.

When logging in, you must add the IP address and port number, such as: “192.168.137.111:1”. This may occur because the port number is not added (that is, enter vncserver on the console to start the VNC service, and the 1 that appears, it That is the service number). When logging in, you must add the IP address and port number, such as: “192.168.137.111:1”.

Click Continue to continue

The password entered here is the client password you set in advance.

Click OK and we will see such an interface. Click it and you can enter your own Raspberry Pi desktop. The subsequent steps are no different from the settings using the Windows system.

3. Connect after configuring the system

The IP address may be different every time the Raspberry Pi is turned off and turned on again. Just follow the next steps.

1. Obtain Raspberry Pi IP

Win + R, enter cmd and press Enter, then enter ping raspberrypi -4 to get the IP

2. Configure PuTTY

Fill in your Raspberry Pi IP in the IP address and click open.

3. Open vnc

After entering your username and password, enter vncserver

4. Remote desktop connection

Open VNC Viewer, click File above and then click New connection. Properties will pop up. Enter the Raspberry Pi application IP address and service number in the VNC Server. You can enter the Raspberry Pi name in Name or not. Lose and click OK.

Then enter the password again and it will be OK

After the operation is successful, you will see the familiar Raspberry Pi operation interface on the computer.

The knowledge points of the article match the official knowledge files, and you can further learn relevant knowledge. Python entry skill treeHomepageOverview 388621 people are learning the system