When ASR-33 is connected to the Raspberry Pi Zero W several installations, configurations and applications have to be documented.

It doesn't help ... lets start. We're using the Out-Of-The-Box Raspian 32bit legacy, and it is March 2024.

Remember, ASR-33 is connected to /dev/ttyAMA0, see hardware setup.

stty - what's left of it

For an attached Linux the ASR-33 is difficult to drive.
For example, on output Linux sends just a simple LF (="Line feed" = 0x0a) character to terminate a line.
The ASR-33 however needs an additional CR (= "carriage return" = 0x0d) command, and it also can not process further chars until the mechanical print head is moved back to column 0.

And on input, Linux must be told to accept the ALL-UPPER key presses like lower case keys.

To handle all these needs, Linux/UNIX has a built-in tty driver whose function is setup via the "stty" command.
"stty" was in UNIX since the dawn of man, and has a myriad of special flags to adapt to every weird device:

$ stty -a
speed 38400 baud; rows 38; columns 153; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon ixoff -iuclc -ixany -imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke

For serial ASR-33 interface, at least bitrate, bit count, parity and number of stop bits must be set to 110 7N2 :

stty -F /dev/ttyAMA0 110 cs7 cstopb

However other documented flags like "iuclc" or "onlcr" seem not to be functional in the Raspian kernel anymore, despite they appear "settable" with ssty.
Its clear why they disabled code to "insert filler NULs after a carriage return" in 2024 ... hope the new retrogaming wave brings that back.

There are instructions to compile a new Linux kernel with ASR-33 functions added again ... no thanks.

ASR-33 as Linux console ?

Because I found no way to convert ASR-33 UPPER case output to lower case for the first login-session, it was not possible to use ASR as tty device for Linux login and bash sessions. You just even can't enter your password correctly.


So for working with a ASR-RPi combo, you need an independent login to Raspian (ssh, USB-RS232, graphical desktop) to login and start special setups for the ASR-33 from there.

stty replacement, SimH

As said, ASR-33 needs special handling when printing data. As stty didn't provide these flags, I made an own little program "asrout", which converts LF into CRLF and makes other changes to the output stream.

It can be used as replacement for stdout, just use regular output redirection.
And being very quick&dirty for now, it has potential to implement the whole lost world of "stty" params.

For example, to run SimH on the real ASR-33, you call it like

# start UNIX v6 from RK05 on ASR-33 connected to ttyAMA0
# make latest filter
gcc $HOME/asrout.c -o $HOME/asrout
# setup ASR-33 port to 110 7E2
export ASRPORT=/dev/ttyAMA0
sudo stty -F $ASRPORT 110 cs7 cstopb
pdp11 unixv6.simh < $ASRPORT 2>&1 | $HOME/asrout

Python with chatGPT on ASR-33

For an upcoming Retrocomputing convention at hnf.de I had the gorgeous idea to use ASR-33 as interface to the AI app "chatGPT".

Accessing chatGPT via Python is very easy: Just ask "give python code to interface chatgpt", and you have the code.
Serial I/O under Python is a matter of another 3 or 4 code lines, see "serial".

The show worked well, but I had to notice 3 other chatGPT setups on exhibit, for example with Apple I replica and Commodore C64.
Well, at least I did not fall behind the new standard!

asr 33 chatgpt poem

It does!