Psion MC400 – retro computing via RS232 to Raspberry Pi – handshaking fixed…

My first attempt at getting my Psion MC400online” via an attached Raspberry Pi had partially failed due to good old RS232 hardware handshaking issues when using my custom shortened Psion serial cables (the FTDI USB-serial modules I’d selected didn’t expose DTR/DSR/DCD signals, these are needed by the Psion Link/MCLINK.EXE file sharing protocol). I could still open a serial terminal session to the Pi but not establish the “Link” for file sharing. My aim was to use the MC400 basically as a text processor and save text files to the Pi – from where they could then be synced to cloud services (gdrive etc. via rclone) or processed automagically by scripts on the Pi into tweets/SMS/emails/whatever.

UPDATE: more elegant scripting and screenshot image file conversion 😎

emailing from the MC400: my simple OPL code writes some RFC5322 compliant text to the Pi where a script then calls msmtp to handle the sending
Custom shortened USB-serial leads for the Psion MC400

Now things are working much better thanks to some pl2303 modules that do have all the necessary signals; soldered on to the ends of the shortened Psion serial link cables that will also work with Series 3/3a/3c “soap-on-a-rope” 3Link.

Prolific pl2303 modules from AliExpress with CTS/RTS & DTR/DSR/DCD signals

My MC400 has 2 x serial ports – port A (on the left) is used by the terminal to log in and start/stop scripts etc. on the Pi and port B (on the right) is used by The Link to access the DOS file-system emulated on the Pi. Running MCLINK.EXE in dosbox-x on the Pi and starting the Link application on the MC now allows the MC to load/save files directly from/to the Pi. /home/pi/mc400 is mounted as REM::C:\ on the MC400. I’ve created subdirectories on the Pi like /home/pi/mc400/TWEET, /home/pi/mc400/NOTES, /home/pi/mc400/EMAIL where I can save files to directly from the Psion. I’m currently refining some scripts on the Pi that run as cron jobs every few minutes and will tweet/sync-to-gdrive/email based on what they find in the above subdirectories.

Computing pioneers Psion & Raspberry Pi – roughly 20yrs difference in age 😁
I added a cheeky little PSION logo inside the Pi’s transparent lid (cut from the cardboard box of an old Series 3 mains power supply)

A particularly nasty script runs every 2 mins on the Pi (via crontab) to see if a file TWEET.TXT exists in /home/pi/mc400/TWEET/INBOX then simply tweets the contents of the file via rainbowstream before moving TWEET.TXT to /home/pi/mc400/TWEET/OUTBOX adding the date/time to the filename.

#!/bin/bash
if test -e /home/pi/mc400/TWEET/INBOX/TWEET.TXT ; then
  content=`cat /home/pi/mc400/TWEET/INBOX/TWEET.TXT`
  printf "\nt $content\nexit()" | /usr/local/bin/rainbowstream
  sleep 15
  mv /home/pi/mc400/TWEET/INBOX/TWEET.TXT /home/pi/mc400/TWEET/OUTBOX/TWEET`date +"%Y-%m-%d-%H%M%S"`.TXT
fi
tweet magic! Psion MC text processor – -> raspberry pi –> rainbowstream –> twitter

Next step will be to refine a simple OPL program I’ve written on the MC to get the tweet text and IOOPEN/IOWRITE/IOCLOSE the file directly to REM::C:\TWEET\INBOX\TWEET.TXT

first version of some basic OPL to directly write tweet body to the Pi’s filesystem
Installed in the system with a twitter icon πŸ™‚

This is currently very much a proof of concept, and mostly one-way (mainly MC –> Pi) but I’m planning on making it a little more two-way, with the Pi parsing incoming emails/tweets and placing text versions in the /home/pi/mc400/ directory structure that can be read directly on the MC. I’ve already got a really simple RSS/XML parser that creates a “BBC_NEWS.TXT” text file containing the top 15 BBC headlines, updated every 15 mins.

BBC news in a text file via RSS/XML and shell script mangling on the Pi

I’m powering both the MC400 and the Pi from the same USB battery (MC via a USB-to-12V converter). I might mount the Pi on the MC’s lid with some velcro at a later date to make things look a tiny bit more streamlined. My Pi has the Sense Hat installed and I’d planned on using the 8×8 RGB LED display to show some basic status of the MC link connection etc. but haven’t quite got there yet 😁

USB power for the Pi (direct) and MC400 (via USB-to-12V converter)
Screenshots from the MC400 (in Psion’s .PIC format) also converted to .PNG automatically on the Pi πŸ˜€

Published by zedstarr

Chilled out human being, doing techy stuff.

7 thoughts on “Psion MC400 – retro computing via RS232 to Raspberry Pi – handshaking fixed…

  1. Hi, whta’s the trick to get RTS/CTS etc. working on DOSBOX, I allways get some warings like : treid to activate hardware handshake, I’m trieing to copy files via Lapliking from an moderm win10 PC to an old DOS PC both have REAL comports, but hardware handshake is not working.
    best regards
    Frank

    1. Hi – hardware handshaking can be a nightmare but it’s not clear to me what you’ve got connected to what. If you have a Win10 PC and an old DOS PC where are you running dosbox? It might just be a case of the physical cable(s) you’re using not having the handshaking lines connected through.

      1. Win10 is running dosbox and LapLink is running on both sides.

      2. It’s likely the software will try to set/read the states of the RTS/CTS + DSR/DTR signals and if it detects any failures/inconsistency it will raise the “Warning: tried to activate hardware handshake” error. Do you see the same error if your serial cable is not connected to the win10 pc? I’m no expert on Win10/dosbox though, doesn’t windows have Microsoft’s NTVDM virtual DOS machine? Might be worth trying with that.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: