Raspberry Pi Serial Monitor
02 Nov 2023 -
Raspberry Pi Serial Monitor
I recently had to do some hardware troubleshooting for an intermittent fault. To do this, I used a Raspberry Pi as a serial monitor. It’s pretty easy to do, but I’m writing it down here so I don’t forget.
- Get yourself a Raspberry Pi with a basic OS on it. Raspbian is good. I guess it’s called Raspberry Pi OS now.
- I’m assuming you’re doing a headless setup. Once the SD card is written, re-mount it on your computer and add a file called
sshto the root of the boot partition. This will enable SSH on the Pi. - Edit/create the
/etc/shadowfile. Add this line to set thepiuser’s password toraspberry’:pi:$6$SBgOl43F$QTRz0W27/786iJiN5YLlrsce7g3taQv8TiQYfcfBTXmwPs.jw5lOzu2ciZwHSFTaw16R.UaAr6ZR.ZRO6lWDR1 - Plug the Pi in to your network and power it on.
- SSH in to it,
ssh pi@ip-address. The password israspberry. - Change the password with
passwd - Don’t forget to change the password.
- I will haunt your dreams if you don’t change the password. Seriously. It’s not that hard.
- Install
cuandscreen. Whilescreenhas the native ability to access serial ports, if you want to disconnect from the Pi and leave the serial port open,cuis needed. - Look for the serial connection via
ls /dev/tty*. It is probably/dev/ttyUSB0. - Start a new
screenconnection. Then start reading off the serial port withcu -l /dev/ttyUSB0. - There you go. Leave the Pi running, disconnect from screen, and you can come back at any time to see if the hardware malady you’re trying to troubleshoot has revealed itself.
References
- https://jasonmurray.org/posts/2020/raspconsole/
© 2025
•
Theme Moonwalk