WHAT IS A DUMB TERMINAL?
A dumb terminal is simply an output device that accepts data from the CPU In contrast, a Smart terminal is a monitor that has its own processor for special features such as bold and blinking character Dumb terminals are not as fast as smart terminals, and they do not support as many display features, but they are adequate for most applications.
Uses and Types of Terminals
The original Unix systems did not have consoles. Instead, people logged in and ran programs through terminals that were connected to the computer’s serial ports. It is quite similar to using a modem and some terminal software to dial into a remote system to do text-only work.
Today’s PCs have consoles capable of high quality graphics, but the ability to establish a login session on a serial port still exists in nearly every Unix-style operating system today; FreeBSD is no exception. By using a terminal attached to a unused serial port, you can log in and run any text program that you would normally run on the console or in an
xterm window in the X Window System.
For the business user, you can attach many terminals to a FreeBSD system and place them on your employees’ desktops. For a home user, a spare computer such as an older IBM PC or a Macintosh can be a terminal wired into a more powerful computer running FreeBSD. You can turn what might otherwise be a single-user computer into a powerful multiple user system.
For FreeBSD, there are three kinds of terminals:
- Dumb Terminals
- PCs acting as terminals
- X terminals
The remaining subsections describe each kind.
Dumb terminals are specialized pieces of hardware that let you connect to computers over serial lines. They are called “dumb” because they have only enough computational power to display, send, and receive text. You cannot run any programs on them. It is the computer to which you connect them that has all the power to run text editors, compilers, email, games, and so forth.
There are hundreds of kinds of dumb terminals made by many manufacturers, including Digital Equipment Corporation’s VT-100 and Wyse’s WY-75. Just about any kind will work with FreeBSD. Some high-end terminals can even display graphics, but only certain software packages can take advantage of these advanced features.
Dumb terminals are popular in work environments where workers do not need access to graphic applications such as those provided by the X Window System.
PCs Acting As Terminals
If a dumb terminals has just enough ability to display, send, and receive text, then certainly any spare personal computer can be a dumb terminal. All you need is the proper cable and some terminal emulation software to run on the computer.
Such a configuration is popular in homes. For example, if your spouse is busy working on your FreeBSD system’s console, you can do some text-only work at the same time from a less powerful personal computer hooked up as a terminal to the FreeBSD system.
X terminals are the most sophisticated kind of terminal available. Instead of connecting to a serial port, they usually connect to a network like Ethernet. Instead of being relegated to text-only applications, they can display any X application.
We introduce X terminals just for the sake of completeness. However, this chapter does not cover setup, configuration, or use of X terminals.
What is a common use of dumb terminals?
Dumb Terminal is used data entry in any organization. Dumb terminal does not have processing capability. Dumb terminal is completely depends on network server.
Benefits Of Dumb Terminals
A dumb terminal uses far less power than a PC workstation. This can be between 1/5th and 1/12th of the energy of their PC counterparts. Large reduction in the amount of hardware required, which reduces environmental impact through all stages of the life cycle.
HOW TO SET UP A DUMB TERMINAL
Step 1: The Circuit
Modern devices like a Raspberry Pi generally use a 3.3v TTL UART for hardware serial communications. Vintage equipment (like the beautiful 300 baud acoustic coupler we are going to interface to) use +/-15v RS-232 for their hardware serial communications.
To get around this, we are going to use a special integrated circuit called a transceiver. This device only has one job, to translate back and forth between TTL and RS-232. The part I chose for the circuit is SP2322E a ‘true +3.0v to +5.5v RS-232 Transceiver’. This part gets its power from the Raspberry Pi. The Raspberry Pi, however, does not have the ability to source +/-15v. Where do these voltages come from? The transceiver chip uses a set of external capacitors as part of its charge pump circuits. In other words, with a little help from its capacitive friends, the transceiver is capable of generating its own +/-15 rails. Fancy!
While this part is capable of two serial channels, we only require one for this job. Connected to the Raspberry Pi’s GPIO UART are transceiver pins T1IN and R1OUT. Connected to the RS-232 cable are transceiver pins T1OUT, R1IN, and GPIO GND (need that ground reference, buddy).
So there we have it, a simple circuit that will allow our new-fangled Raspberry Pi to talk to 40 year old telecommunications equipment.
Let’s build it!Add TipAsk QuestionCommentDownload
Step 2: Soldering
Instructables sent us a Perma-Proto Pi Hat board along with a Raspberry Pi 2 as part of the Raspberry Pi 2 Build Night earlier this year. I’m going to use this to make building my circuit onto the Raspberry Pi quick and easy.
I started by soldering a 16 pin dip socket onto the hat. Then I angled the pins on the IC properly and inserted it into the socket.
I soldered a blue jumper wire between the transceiver T1IN pin and Raspberry Pi GPIO TXD pin. Then a yellow jumper between the transceiver R1OUT pin and the Raspberry Pi GPIO RXD pin.
I scrounged around my junk boxes for a standard DB9 serial port. I soldered a green wire to pin 5, a blue wire to pin 3 and a yellow wire to pin 2. I soldered the green wire to the GND rail on the hat. I soldered the blue wire to the transceiver T1OUT pin. I soldered the yellow wire to the transceiver R1IN pin.
I soldered all of the capacitors in place.
I soldered a black jumper wire between the transceiver GND pin and the GND rail on the hat.
I soldered a red jumper wire between the transceiver VCC pin and the +3.3v rail on the hat.
I soldered the included female 2×20 header onto the hat, facing down.
Our transceiver hat is now complete, let’s hook it up!Add TipAsk QuestionCommentDownload
Step 3: Connections
The antique Novation 300 baud acoustic coupler modem relies on a DB25 RS-232 cable for serial communications. So I connect a DB9 to DB25 adapter cable between the transceiver hat and the coupler.
I place a type G telephone handset into the acoustic coupler’s cups.
The rest is monitor, keyboard, power, etc.
Let’s get it working!Add TipAsk QuestionCommentDownload
Step 4: Configuration
Out of the box, a Raspbian installation assigns a process to handle everything that happens on the Raspberry Pi’s GPIO UART serial port (ttyAMA0). This process is getty, and it allows you to log into your Raspberry Pi directly over the serial port at 115200 baud. Pretty cool, but absolutely in our way at the moment. We need that serial port to be open and unoccupied!
The first step to taking back the serial port is to stop the system from setting it up as a console in /boot/cmdline.txt
Let’s start by backing up the file
sudo cp /boot/cmdline.txt /boot/cmdline_backup.txt
Alright, now to edit the file (I’m going to use vim for this)
sudo vim /boot/cmdline.txt
Remove these two settings (you may only find the first setting if you are on a NOOBS install):
Save the file.
Now we need to stop the system from using getty to handle data on the serial port. This handler is assigned to the serial port in another file: /etc/inittab. Let’s edit the file.
sudo vim /etc/inittab
Comment out the serial port handler line by changing
2:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
#2:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
Save the file.
At this point the serial port will no longer be used by the system at bootup. Now we need a program that allows us to type into and read back from with the serial port directly. I’m going to use Picocom. Picocom is a very stripped down command line terminal emulator.
sudo apt-get install picocom
Once it is installed you can run it like this:
picocom -b 300 /dev/ttyAMA0
The -b sets the baud rate. This is the fastest rate my antique modem functions, so I’m going with that! And /dev/ttyAMA0 is our GPIO UART serial port, of course. With Picocom running, everything you type gets sent down the serial port, and everything sent up from the serial port gets printed directly on your screen. Old School!
You can now interface your ancient telecommunications equipment directly to a modern Raspberry Pi. This opens up all sorts of great project ideas. Let us know yours in the comments section.
You could stop there, but I want a REALLY dumb terminal. So I’m going to go a step further and make my Raspberry Pi boot directly into Picocom with no login. Time for hack-foo!
Create a bash script. This script clears the screen, prints a welcome message, then runs Picocom.
sudo vim /usr/bin/vterm
echo “Toymaker Television Terminal”
/usr/bin/picocom -b 300 /dev/ttyAMA0
Save the file.
Set the file to be executable
sudo chmod +x /usr/bin/vterm
Now for the deep magic. We’re going to assign the handling of tty1 (the console you get attached to when the Raspberry Pi boots up, and that you usually log into) to our own script. In a normal world tty1 is handled by a getty process, but we’re feeling adventurous so
sudo vim /etc/inittab
1:2345:respawn:/sbin/getty –noclear 38400 tty1
Save the file.
So now, when the Raspberry Pi boots up, instead of asking you to login it is instead going to hand you over to our vterm script. Which clears the screen, prints a welcome message, and starts Picocom connected to the GPIO UART serial port (and our acoustic coupler). Note that ‘respawn’. What that means is that if you exit Picocom (and the script ends) the system will respawn a new vterm script and hook you to it. Cool!
So you might think, well ok, but how the heck do I log back into my Raspberry Pi now? We’ve disabled the serial port login, and we’ve hijacked the tty1 login!
Don’t worry, by default Raspbian starts a whole bunch of ttys (you may have noticed them while you were editing /etc/inittab). You can switch another tty by holding ALT on your keyboard along with one of the F keys (F1 = tty1, F2 = tty2, etc). If you switch to tty2, you’ll get your usual Login: prompt, allowing you to get into your Raspberry Pi.
I hope you found this Instructable fun and informative. Thanks for taking the time out of your day!
Drop your comment