Can't stop questioning!

Serial protocol through USB on Raspberry Pi

Tuyen D. Le March 02, 2022 [Raspberry-Pi] #Pi-Zero

1. Download Raspberry Pi OS

I am using the lite version at 2022-01-28-raspios-bullseye-armhf-lite image

cat /boot/config.txt
[all]
# Enable UART via PIN IO
enable_uart=1
dtoverlay=dwc2

2. Raspberry Pi settings

You need to change /boot/cmdline.txt file as follows.

$ cat /boot/cmdline.txt
console=serial0,115200 console=tty1 root=PARTUUID=22e47bc0-02 rootfstype=ext4 fsck.repair=yes rootwait modules-load=dwc2,g_serial

Default username/password: pi/raspberrypi. Entering sudo mode sudo su

systemctl enable getty@ttyGS0.service
systemctl start getty@ttyGS0.service
systemctl is-active getty@ttyGS0.service

Reboot your Raspberry Pi to apply these settings.

reboot

If everything is good, we'll see a new USB Serial Device under Ports (COM & LPT) as following picture.

usb-serial-devices-device-maneger

Teraterm login via USB.

Teraterm login via USB

3. References