Vintage Tech: Le Minitel

Minitel is this super fancy terminal introduced in France in the 80's (see the full story). I used Minitel when I was a kid and it crossed my path again recently.
Since it is indeed "just" a terminal, it can be connected to the console of your favourite linux machine, including your Pi. I have a couple Orange Pi myself...
It turned out not to be completely straight forward to connect my Orange Pi One and my Minitel, so I thought I would make a record of the aventure on instructables !
Hardware

Le Minitel levels can go up to 15v which way too much for an Orange Pi ! A solution is to adapt said signals through a Logic Level Converter.
You want to look for a "Logic Level Converter Bi-Directional Module 5V to 3.3V".
You will also need a "MIDI 5 Pin DIN Cable" to connect to Le Minitel. The Image above shows the 3 pins to need to note: Rx, Tx and GND.
Connect Everything






Pictures should be self explanatory.
Keep in mind:
- Tx, Rx and GND from the Minitel connect to the logic level converter.
- Tx, Rx, GND, 3v and 5v from the Orange PI connect to the logic level converter.
- Minitel Rx is connected to Orange Pi Tx on the logic level converter.
- Minitel Tx is connected to Orange Pi Rx on the logic level converter.
Software: Build It With OSX

I have tried many distro for this project and here is the score: if you want a (working) wifi connection through a usb dongle, settle for Armbian, no more, no less.
You may need to install brew and 7za to unzip .7z archives
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/instal...
brew install p7zip
Download image and unzip
wget <a href="https://dl.armbian.com/orangepione/archive/Armbia..."> https://dl.armbian.com/orangepione/archive/Armbia...>
7za x Downloads/Armbian_5.75_Orangepione_Ubuntu_bionic_next_4.19.20.7z
Identify your usb card (mine is disk1) and burn Armbian image onto it
diskutil list diskutil unmountDisk /dev/disk1 sudo dd bs=1m if=Armbian_5.75_Orangepione_Ubuntu_bionic_next_4.19.20.img of=/dev/rdisk1 conv=sync
Insert the sd card into your Orange Pi and connect to it
user: root password: 1234 tip: change the password to "orangepi"
Configure a Wifi Connection (optional)

Your dongle (assuming it is Realtek RTL8188CUS based) should be working out-of-the-box. All you need to do is to launch raspbian-config.
Configure Your Orange Pi Console (4800 Baud, Minitel1b-80 Terminal)




Here is my exact situation:
root@orangepione:~# cat /etc/lsb-release <br>DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS" root@orangepione:~# uname -a Linux orangepione 4.19.20-sunxi #5.75 SMP Sat Feb 9 19:02:47 CET 2019 armv7l armv7l armv7l GNU/Linux
I enabled uart1 (c.f. pictures):
root@orangepione:~# armbian-config
I changed lib/systemd/system/serial-getty@.service:
#ExecStart=-/sbin/agetty -o '-p -- \\u' --keep-baud 115200,38400,9600 %I $TERM ExecStart=-/sbin/agetty -c %i 4800 minitel1b-80
I installed ttyS1 with systemd:
ln -s /etc/systemd/system/serial-getty@.service /etc/systemd/system/getty.target.wants/serial-getty@ttyS1.service systemctl daemon-reload systemctl start serial-getty@ttyS1.service
I installed a better version of minitel1b
wget http://canal.chez.com/mntl.ti
tic mntl.ti -o /etc/terminfo
Use Your Minitel




Switch on Le Minitel, then
- switch Le Minitel to 4800 baud: Fnct+P, then 4
- choose 80-column mode: Fnct+T, then A
- disable echo: Fnct+T, then E
Voila.