My first attempt at getting my Psion MC400 “online” 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.
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.
As noted in the comments there are a few different versions of Psion serial cables around and some have different colour schemes for the internal wires. If you’re thinking of adding USB/Serial modules to a standard Psion serial cable I strongly recommend actually buzzing-out your cable with a multimeter to make sure your connections are correct.
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/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.
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
/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
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
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.
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 😁