-
-
Save albertfilice/0f12dc87f8d1ec02ef14 to your computer and use it in GitHub Desktop.
##### | |
IF YOU'RE COMING HERE BECAUSE OF PROBLEMS MAKE SURE YOU HAVE THE PROPPER ADAPTER | |
I tried several adapters and the one from Tripplite works the best. Some don't work at all, others create a lot of gibberish on the VT220. | |
Link: http://www.amazon.com/gp/product/B0000VYJRY/ref=oh_aui_detailpage_o02_s00?ie=UTF8&psc=1 | |
##### | |
1. Installed drivers for USB -> Serial adapter | |
2. Run ls /dev/tty.* | |
I see my adapter as: '/dev/tty.usbserial' | |
3. Edit /etc/gettytab | |
Add the following lines at the end of gettytab: | |
std.ttyUSB:\ | |
:np:im=\r\n:sp#19200:tt=vt220: | |
4. Create /Library/LaunchDaemons/serialconsole.plist with the contents: | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>serialconsole</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/libexec/getty</string> | |
<string>std.ttyUSB</string> | |
<string>cu.usbserial</string> | |
</array> | |
<key>KeepAlive</key> | |
<true/> | |
</dict> | |
</plist> | |
Communications Set-Up on the VT220 V2.3: | |
--------------------------------------- | |
Transmit=19200 | |
Recieve=Transmit | |
XOFF at 64 | |
8 Bits, No Parity | |
1 Stop Bit | |
No Local Echo | |
EIA Port, Data Leads Only | |
Disconnect, 2 s Delay | |
Limited Transmit | |
I have the serial adapter -> a DB9 to DB25 Male Null Cable -> DB25/DB25 gender changer -> COMM port on the back of the VT220 | |
Running `sudo launchctl load /Library/LaunchDaemons/serialconsole.plist` does nothing. VT220 cursor blinking in top left. | |
Rebooting the computer with the VT220 plugged in and nothing happens. | |
I tried this: | |
Open the console and type `screen /dev/tty.usbserial 19200' and I get a blank screen with solid non-blinking cursor at the top. | |
Nothing changes on the VT220. | |
I saw this post: http://jstn.cc/post/8692501831 | |
He mentions: | |
'Eventually I found this page (http://www.club.cc.cmu.edu/~mdille3/doc/mac_osx_serial_console.html), which explains the problem and how to fix it. After adding a line in /etc/gettytab to manually set the terminal type to vt220 everything works perfectly!' | |
However I can't seem to find out what he's talking about on (http://www.club.cc.cmu.edu/~mdille3/doc/mac_osx_serial_console.html). |
1. Get a USB to Serial adapter. | |
I tried several, the only one that worked was a Tripp Lite Keyspan | |
Link: http://www.amazon.com/gp/product/B0000VYJRY/ref=oh_aui_detailpage_o02_s00?ie=UTF8&psc=1 | |
Drivers: http://www.tripplite.com/high-speed-usb-to-serial-adapter-keyspan~USA19HS/ | |
2. Install drivers for USB to Serial adapter | |
3. Run the following command to see your device: `ls /dev/tty.*` | |
The result of the command is below: | |
/dev/tty.Bluetooth-Incoming-Port /dev/tty.KeySerial1 | |
/dev/tty.Bluetooth-Modem /dev/tty.USA19H142P1.1 | |
I'm going to guess that "/dev/tty.KeySerial1" is the correct device | |
4. You need to add to the file '/etc/gettytab' | |
You can edit it using the program vi: | |
`sudo vi /etc/gettytab` | |
Add the following two lines to the end of the file: | |
std.ttyUSB:\ | |
:np:im=\r\n:sp#19200:tt=vt220: | |
5. Now you have to create the launch daemon that will give the login prompt to the terminal: | |
You can create the file using the program vi and name it whatever you want, I'm calling it "serialconsole.plist": | |
`sudo vi /Library/LaunchDaemons/serialconsole.plist` | |
Add the following 16 lines to "serialconsole.plist": | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>serialconsole</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/libexec/getty</string> | |
<string>std.ttyUSB</string> | |
<string>cu.KeySerial1</string> | |
</array> | |
<key>KeepAlive</key> | |
<true/> | |
</dict> | |
</plist> | |
Replacing the line "<string>cu.KeySerial1</string>" specifically the "KeySerial1" part with the name of your device | |
6. Now you have to load up the daemon: | |
You can do that by restarting your computer or running the following: | |
`sudo launchctl load /Library/LaunchDaemons/serialconsole.plist` | |
If everything went smoothly your VT220 should present you with a login prompt | |
########################### | |
Some things to keep in mind | |
########################### | |
If cu.YourSerialDevice doesn't work then try tty.YourSerialDevice | |
You were a major help, thank you so much! If you're ever in San Francisco I'll buy you a beer.
Interesting that you have the same problem, when dealing with OS X. I think I saw a post about something similar where they managed to get around it by telling the connection to use ASCII encoding or something.
The gibberish makes things pretty unusable from an OS X standpoint. I haven't played around too much with a Linux system hooked up yet though. Do you use the terminal with Linux mainly?
I'll tinker around and edit this post to update.
Went through my setup but there's nothing really worth mentioning. Setting locale to en_US.US-ASCII
didn't seem to make much of a difference either. All my *nix servers have integrated serial ports and they work flawlessly so I'd like to pin it on the USB dongle. I got another unit some time after I posted the video and it behaves the same with OS X – as does a VT320 I tried.
It only seems to happen when there's a lot of output so maybe it's something to do with flow control. Second thought I had is that perhaps the old dumb terminals are more strict with what the correct voltage levels are and the USB dongles, while compliant with the RS232 standard, just don't hit those levels. Haven't looked into it any deeper than that though.
I could still see it being useful on OS X for logging to console or being part of a notification system of some sort where the output is a few lines per sec at most. The units I have don't see a lot of use, not even with the *nix servers. I'm on a move a lot though so not really practical for me but I'd definitely set something up if I had a desktop setup that I used a lot. And even with OS X I think it's just looks too cool not to have it set up.
Humm ok cool thanks for the tips, I'll probably end up getting the same USB -> Serial adapter that JSTN used in his post, since that seemed to work for him. Which adapter did you use when you tried it with your Mac?
Even commands with minimal output seem to produce gibberish like pwd
The TOP command doesn't give me gibberish...
I just logged in again, to try to fiddle with things. I got the gibberish I usually do but decided to see what it would look like running top
and surprisingly there doesn't seem to be any gibberish there.
I also tried man top
and was able to move through the man pages without any gibberish...
I also tried playing around with the Ruby Gem "t" which can stream a twitter feed on the command line. When initially running the command there's a bunch of gibberish but once the stream moves on a bit everything smooths out.
Maybe the gibberish has something to do with the beginning and end of commands somehow?
Hey, @albertfilice, I'm trying to get the same setup working and I could use some help. I have a Macbook Pro (2015) running macOS Catalina. I have connected the VT220 (with keyboard) to the Mac using the Tripp Lite Keyspan adapter you linked. The adapter is plugged into a DB9 to DB25 adapter (https://www.amazon.com/gp/product/B00066HJCA/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&psc=1) and into the COM port.
I can see the tty.KeySerial1, but I can't connect to it in CoolTerm or with screen. In CoolTerm I get a 100 error with "Access Denied" and in screen I get a window with a solid, un-blinking white cursor in the top left (I don't know the meaning).
I'm using the Keyspan drivers from Tripp-Lite. Any suggestions on how I could move forward and get connected?
@colegleason Sorry I can't be of more help, but after reading your post and looking back I can't remember having that issue. Did you check your DB9 to DB25 adapter?
I don't have my terminal out anymore, I used to have it set up at work but was laid off from that job, and now it's in the closet of my small apartment.
I'm not sure how changes in macOS since I got mine working might impact things. Not sure what access denied means either. You could try to find somebody has one running on Catalina, but that probably isn't easy.
If I ever get mine out and working again I'll be sure to post the info.
Glad to hear it :) Let me know if you need help with any of the launchctl stuff.
EDIT: This happens with mine too sometimes, not as bad as yours though, and only with OSX machines, never with other unices. Start by turning off smooth scrolling from the VT220 settings and playing with the shell's locale settings. I'm off to bed now but I'll check my setup tomorrow and post here.