Telic Alcatel Minitel - running as a USB Raspberry Pi Terminal

As mentioned I managed to obtain a rather good conditioned "Minitel 1" device.

As it states on Wikipedia:
"The Minitel was a Videotex online service accessible through telephone lines, and is considered one of the world's most successful pre-World Wide Web online services."

Pretty cool start...and and I was feeling a bit nostalgic, thinking of fond memories of "that" mid-90s movie starring a certain Angelina someone-or-other.... anyway...

The journey started by doing a lot of searching.

My first port of call was the Minitel Research Lab, but that only provided me with so much info.

I found a REALLY USEFUL blog post from Pila.  I have to admit, I did base a lot of my initial work on this Blog and I am really grateful that this information exists.

The follow up blog post from Pila, about using a Raspberry Pi was also very useful.

I wandered through a lot of articles available on this website (and got quite distracted too)...

I found another Blog post about running a Minitel terminal as Linux, from 2012.  Okay, so I wasn't going to be pioneering anything new then, I'm quite late to the game....well, so I thought, more about that later.

Then I found another Blog posting and yes, this one references the infamous FNCT button.

and one last article that repeated the same thing, albeit using the GPIO of the Pi.

If you trawl through all of these blog posts/sites, you start to accumulate some common information and can start to make some progress.

Time to take some action.

I ordered myself (yet another)  Raspberry Pi.  When it arrived it was a Raspberry Pi 3.  I didn't think that would make much of a difference, would it? (Oh yes, it does, those sneeky buggers have done away with the /etc/inittab file that all the above articles reference.  I did spend a short time working out that they now use systemd and I need to do some "other" stuff, but as I'm impatient and I already spent a couple of nights until 1am, I just wanted it to work!  I'll come back to an update using RPi3 at a later date).



I then ordered a couple of 5 DIN audio sockets and USB PL2303HX plugs with the wires nicely split out.  I hunted around the cupboards and found some resistors and the correct transistor (as they were all common items).  2N2222A transistor, 10k, 22k and 220k resistors.  Some wires, stanley knife, some crocodile clips and a couple of beers.  I used a breadboard to mock-up what I needed, I'll splice everything together eventually and solder it together and make it all nice and pretty as a single-cable at some point in the future too.

The Blog post by Pila explains the mathematics about why the specific resistors are needed and the transistor for the adaption of the signals.  It's all pretty smart stuff and makes perfect sense.

I stripped the 5 DIN audio plug down to the basics, as it has 4 audio connectors and we don't need them.  I removed the pins and just pushed the black into pin 3, red into pin 1 and white into pin 2.

The logical mapping from the USB side of things is:

Tx Minitel (3) ------> Rx (White) USB
Gnd Minitel (2)-----> Gnd (Black) USB
Rx Minitel (1) ------> Tx (Green) USB
The USB +5v is also needed (Red), you plug that before the 220k resistor.

Once that is setup on the breadboard like so:

You can then plug in the USB cable to the Raspberry Pi.  Now, as I mentioned I swapped out the RPi3 running Jessie, for an RPi2 running Wheezy as the configurations discussed seemed to work nicely.

UPDATE: I found a guy who makes/sells the cable, so if you don't fancy the joy/fun of hacking your own cable together (no idea why you wouldn't want to miss out on all the fun?!), then CLICK HERE to go buy a ready made cable....that is, if he has any left/has enough ready made one's to hand :-)

Setup of Minitel and RPi2

After plugging the cable into the back of the Minitel, you can turn on the Minitel at the mains, it will just boot up normally and sit at it's normal prompt.




(Just a twisty to keep the other 2 cables out of the way for the moment - as you can see the DIN plug is on the back of the monitor)

To setup the Minitel 1, you need to hold down SHIFT+SETUP (the key with the phone on it).  If you do not press SHIFT, you will hear it engage the phoneline and it will want you to enter numbers to dial, you don't want to do that.



You will be shown several screens.  Press the [PREV]/[NEXT] orange buttons to navigate up/down the screen, press the [1] or [2] numbers to choose the values you want to change.

 Press [NEXT] until you see the Variable Parameters screen, here you want to change the bottom values to be as shown:

The great thing about the Minitel 1 is that is actually remembers/saves the values that you set, so once you've set them up correctly, you're all done.


You can now start up the RPi2.  As an initial test, after logging in you can check that the USB has been detected by running:
>lsusb
you should see the USB cable listed as a device.  If not, there's something wrong with the wiring!
Enter the following command:
>stty -F /dev/ttyUSB0 1200 istrip cs7 parenb -parodd brkint ignpar icrnl ixon ixany opost onlcr cread hupcl isig icanon echo echoe echok

That will assign /dev/ttyUSB0 connection at 1200 baud 7-bit etc...etc.. that we need, you can then enter the following command to see something output to the screen:

>echo "bonjour Minitel !" > /dev/ttyUSB0

You "should" see the following:


Now, if you've fudged up the wiring or like me allowed the pet cat to spend some time alone in the room with nice bits of wiring and curious paws, you'll find that your screen text will look something a bit like this:









That is why I take photos of the wiring setup!  I actually got this all working perfectly and was dead happy at 1am.  I woke the next morning to find that Talisker (our cat, not the Whisky) had decided to have a play around and I hadn't taken proper notes on how I set it up, I then spend several hours going around and round in circles trying to get back to where I had to got to.  Fortunately, I did get back there:

Now for the good stuff

Okay, so our little test allowed us to prove that we can communicate from the RPi2 to the Minitel 1 via our makeshift USB cable.  But, we don't want to just "echo" text to the screen.... we want to use the keyboard & screen as a Linux terminal for the RPi!

Right, to do this we have to SSH into the RPi (or you can plug screen/keyboard into the RPi, if you want to).  Then modify the /etc/inittab file to contain a line like so:

>T0:23:respawn:/sbin/getty -L -i -I "\033\143" ttyUSB0 1200

Pila explains in the blog why they use the -I (it's to send a DEL command) to get rid of funny characters, the key bit is the -L tells it to kick off the Login dialog and the -i tells it not to output all the debug text you normally get before the Login prompt.  ttyUSB0 is where you want it to open to and 1200 is the baud rate.  Now, there are some texts that have 'minitel1b-80', or 'vt100' or 'vt102' at the end, I found that doesn't help, so I left it off, seems to work okay.

Oh and some blogs tell you that in the /boot/cmdline.txt file you should remove some values, but I haven't done that yet as I'm skeptical it's needed.

This should mean that when you boot up the RPi2, it should boot straight onto the Minitel 1 screen.  The initial characters are a bit jacked up, but you'll see a blinking cursor, so just enter the username and press [SHIFT]+[SEND] and then you can enter the Password when the prompt appears.

As a test, I SSH'd to the RPi2 device and manually ran
>stty -F /dev/ttyUSB0 1200 istrip cs7 parenb -parodd brkint ignpar icrnl ixon ixany opost onlcr cread hupcl isig icanon echo echoe echok
>/sbin/getty -L -i ttyUSB0 1200

Then I see some chars on the screen, after you have entered the Login name and password, you can now do all those nice linux-ey things that you like to do.

Here I perform an >ls and you can see the output to the screen:




and here is the same thing from SSH:



I then created a file via nano and saved it:

(not the clearest of text editors in this format!!! But you can make out the content inside it)

and here is the file created and the contents shown via SSH:
Not perfect - as I keep pressing the [SEND] button, instead of SHIFT+SEND to do a carriage return and that just outputs an "A".

I need to work out a way to prevent the "Echo" from happening, so that I do not get a double echo of the characters that I type, so I can see:

>nano fromMinitel.txt

instead of:

>nnaannoo ffrroommMMiinniitteell..ttxxtt



Okay, so I am very happy that I have pretty much achieved what I set out to do, okay, it needs a little bit of ironing out, but it's pretty darned close.  I also didn't have to hack the original Minitel device about at all, so I'm happy about that.
I now need to figure out how to get it to work with an RPi3 (or just using Jessie), if you have any ideas, let me know!!!



7 comments:

  1. Hi everyone, I am the owner of the website selling cables mentioned above, my web adresse has changed because of a problem with the old one. Here it is: http://toutelectrique46.ddns.net

    ReplyDelete
  2. Nice job and good explanations! Do you have any news on how to do this with the RP 3?

    ReplyDelete
  3. Hallo again,

    I figured out how to get it to work with systemd!


    First, we set up a serial getty with the USB adaptor:
    sudo systemctl enable serial-getty@ttyUSB0.service

    reboot after and make sure that the service is running:
    systemctl status serial-getty@ttyUSB0.service

    Then we have to adjust the configuration (baudrate and such) in
    /etc/systemd/system/getty.target.wants/serial-getty@ttyUSB0.service

    Edit the line "ExexStart" to:
    ExecStart=-/sbin/agetty -L -i -I "\033\143" 4800 %I minitel1b-80

    There you go :)

    Regards
    Finn

    ReplyDelete
    Replies
    1. Absolutely awesome!!!! I'm currently working in Germany, but will try out what you have said at the weekend when I have access to an RPi3. Again, really appreciate you figuring it out....... do you know how to reduce the double-echo though on the MiniTel when typing though :-)

      Delete
  4. Give it a try and let me know if it works for you! Strangly I don't have any double echo though. Did you disable the local echo of the Minitel by FNCT+T E?

    Regards from Germany :)
    Finn

    ReplyDelete
    Replies
    1. There is no FNCT key on the MiniTel - look at the photo's above :-O

      Delete