Connexion par câble entre un ordinateur sous Linux et un Minitel

Connexion par câble entre un ordinateur sous Linux et un Minitel.

Lien :
https://arduiblog.com/2019/04/29/ressuscitez-le-minitel/

1/ Montage du câble USB/DIN.

Matériel :
* Câble série debug USB-TTL RB-TTL
Basé sur la puce PL2303 de ‘Prolific Technology, Inc.
https://www.gotronic.fr/art-cable-serie-debug-usb-ttl-rb-ttl-20673.htm
* 10 résistances 1/4W 220kΩ
https://www.gotronic.fr/art-10-resistances-1-4w-220k-8486-2595.htm
* 10 résistances 1/4W 10kΩ
https://www.gotronic.fr/art-10-resistances-1-4w-10k-8486-19.htm
* 10 résistances 1/4W 22kΩ
https://www.gotronic.fr/art-10-resistances-1-4w-22k-8486-2585.htm
* Transistor 2N2222A-TO92
https://www.gotronic.fr/art-transistor-2n2222a-to92-1539.htm
* Fiche Din FM545 / mâle 5 cts à 45°
https://www.gotronic.fr/art-fiche-din-fm545-4747.htm
* Plaque de montage rapide / SD04N 400 contacts
https://www.gotronic.fr/art-plaque-de-montage-rapide-19403.htm
Schéma :

Montage :

2/ Brancher le câble Minitel entre l’ordinateur et le Minitel.

– Détection du câble USB :
$ lsusb
...
Bus 003 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
...

3/ Configurer le Minitel.

* Passer du mode répertoire au mode terminal :
Fnct + Sommaire (en même temps)
* Passage en mode périphérique :
Fnct + T (en même temps), relâcher puis A
* Désactivation de l’echo du terminal
Fnct + T (en même temps), relâcher puis E
* Connexion à 4800 bauds
Fnct + P (en même temps), relâcher puis 4

4/ Passer en utilisateur ‘root’.

util01@station66:~$ sudo su
[sudo] Mot de passe de util01 :
root@station66:/home/util01#

5/ Configuration de la connexion Linux.

root@station66:/home/util01# stty -F /dev/ttyUSB0 4800 istrip cs7 parenb -parodd brkint ignpar icrnl ixon ixany opost onlcr cread hupcl isig icanon echo echoe echok

6/ Envoyer un texte depuis l’ordinateur vers le Minitel.

root@station66:/home/util01# echo 'Hello World' > /dev/ttyUSB0
Résultat :

7/ Envoyer un texte depuis le Minitel vers le l’ordinateur.

– Configuration :
root@station66:/home/util01# cat /dev/ttyUSB0
– Taper un texte avec le clavier du Minitel :

– Résultat :

8/ Répertoire de travail.

root@station66:/home/util01# exit
exit

util01@station66:~$ mkdir MINITEL
util01@station66:~$ cd MINITEL/
util01@station66:~/MINITEL$

9/ Configuration du Minitel comme Terminal Linux.

Lien:
http://sta6502.blogspot.com/2016/02/utiliser-un-minitel-comme-terminal-sur.html
util01@station66:~/MINITEL$ wget http://canal.chez.com/mntl.ti
util01@station66:~/MINITEL$ tic mntl.ti -o /etc/terminfo
util01@station66:~/MINITEL$ agetty -c ttyUSB0 4800 minitel1b-80

10/ Configuration de getty.

Créer :
/etc/systemd/system/serial-getty\@.service
Ajouter :
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation; either version 2.1 of the License,
# or (at your option) any later version.
[Unit]
Description=Serial Getty on %I
Documentation=man:agetty(8) man:systemd-getty-generator(8)
Documentation=http://0pointer.de/blog/projects/serial-console.html
BindsTo=dev-%i.device
After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service
After=rc-local.service
# If additional gettys are spawned during boot then we should make
# sure that this is synchronized before getty.target, even though
# getty.target didn't actually pull it in.
Before=getty.target
IgnoreOnIsolate=yes
[Service]
ExecStart=-/sbin/agetty -c %i 4800 minitel1b-80
Type=idle
Restart=always
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
KillMode=process
IgnoreSIGPIPE=no
SendSIGHUP=yes
[Install]
WantedBy=getty.target

11/ Post-configuration.

root@station66:/home/util01/MINITEL# ln -s /etc/systemd/system/serial-getty@.service /etc/systemd/system/getty.target.wants/serial-getty@ttyUSB0.service

12/ Lancement des services.

root@station66:/home/util01/MINITEL# systemctl daemon-reload
root@station66:/home/util01/MINITEL# systemctl start serial-getty@ttyUSB0.service

Le login apparaît sur le Minitel :

Après le login :

Résultat de la commande ‘ls’ :

Résultat de la commande ‘sl’ :

13/ Un RPG sous Minitel : Nethack !!

14/ Arrêter le service ‘ttyUSB’.

# systemctl stop serial-getty@ttyUSB0.service

15/ Boitier du montage Minitel.

https://www.thingiverse.com/thing:4250938

Comments are closed, but trackbacks and pingbacks are open.