VT510 and RaspberryPi

Last update date: 08/05/2017

This was something I wanted to do forever now. Connecting a VT510 to a RaspberryPi and then showing something on the terminal; access logs, server usage, any other kind of fun data, or even just using it as a terminal screen to my MacBook.

Since this is just a start of the project, there isn't a lot I did. I'll update this page and share it around as we go. In the end, we'll have a full build log with photos and steps to do it your self. I'm done! 🎉

Shopping list



Connecting it up

Connecting everything was simple. I've followed the GPIO pinout guide and connected VCC, TX, RX, and GND from the TTL converter to the RaspberryPi Zero. Without configuration, nothing was showing.

Next up was enabling the serial connection on Raspberry Pi. I've edited the /boot/config.txt file and at the very end added enable_uart=1. A quick reboot later...

I've changed the VT510 transmission and receiving speed to 9600. The same had to be done to the Raspberry PI. To see if everything was working I did stty -F /dev/ttyAMA0 9600 and 🎉 the login was working.


Since this was nothing more than a display piece having the keyboard connected to log in was not an option. So I configured autologin on serial connections.

Copy /lib/systemd/system/serial-getty@.service to /etc/systemd/system and rename it to serial-getty@serial0.service. Open the file and edit the following line:

ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM

to this:

ExecStart=-/sbin/agetty -a pi serial0 9600 vt510

Save the file and enable the service:

systemctl enable serial-getty@serial0.service

There is one more thing left to be done! Disabling the serial on boot since this will mess up our tmux session later on. This was a hard one to debug.

Edit the /boot/mdline.txt and remove the console=serial0 part. Be careful and leave only one space between the params.


As I said before this was meant to be setup as a display piece. So tmux had to be started at the login. Since I didn't want to start tmux on SSH login, I had to modify the default way of starting tmux.

At the very end of ~/.bashrc I added this:

[[ $(tty) == "/dev/ttyS0" ]] && [[ $TERM != "screen" ]] && exec tmx

A quick restart later tmux showed! Note that nothing wiill be showing until the device is booted up since we disabled all of that.