Log in to Raspberry Pi via serial

By default, if the Raspberry Pi is connected to Bluetooth, the Bluetooth connection needs to be disconnected and data communication is carried out through the serial port. The specific steps are as follows:

1. Open the disk of the SD card

Insert picture description here

2. Modify the config.txt file

1. Add the following content at the end of config.txt and save
dtoverlay=pi3-miniuart-bt

// This stops Bluetooth and releases the occupation of the serial port.

2. Then modify the cmdline.txt of the root directory and replace all the contents with the following contents, just in case, please backup the original contents of this file first
dwc_otg.lpm_enable=0 console=tty1 console=serial0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

// Regard the serial port as the communication channel of the entire operating system, specify the serial port as serial0 and the baud rate as 115200.

3. Backup:
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=cd48578f-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet init=/usr/lib/raspi-config/init_resize.sh splash plymouth.ignore-serial-consoles

3. Raspberry Pi

1. Insert the SD card into the Raspberry Pi

Insert picture description here

2. Connect the USB-TTL to the serial port of the Raspberry Pi, connect the RXD pin of TTL to TXD of the raspberry, connect the TXD pin of TTL to RXD of the raspberry, and connect GND to GND, as shown in the figure

Insert picture description here
Insert picture description here

Insert picture description here

3. Access to the serial port

Insert picture description here

4. Connect to the power supply

Insert picture description here

4. Check the port number

1. Turn on this computer

Insert picture description here

2. Click Manage

Insert picture description here

3. Device Manager -> Port -> Port Number

Insert picture description here

5. Use MobaXterm (terminal emulation tool) to log in to the Raspberry Pi

1. Open MobaXterm
2. Select Session

Insert picture description here

3.

Insert picture description here
A black box appears but there is no data. We need to re-power the Raspberry Pi (unplug the Raspberry Pi and reconnect it)

6. At this time, you need to enter your Raspberry Pi account password

Raspberry Pi default account: pi
Raspberry Pi default password: raspberry
Insert picture description here

Guess you like

Origin blog.csdn.net/lcx1837/article/details/107818131