Reading BBC Headlines on the Psion MC400

Using a 30 year old laptop in 2021:

As the MC400 has no native networking capability we can’t read any websites directly on the machine itself. But, if you attach to another computer that does have a internet access via the serial link(s) then it becomes possible. I could have just used the terminal and read directly from the Raspberry Pi command line but I wanted something that felt more integrated with the MC itself. This solution uses classic shell script techniques with curl and sed so doesn’t need any other special packages to be installed.

The shell script gets the BBC RSS/XML news feed via curl and then strips out some of the tags & headers with sed, writing the output to /home/pi/mc400/NEWS/BBC_NEWS.TXT. There’s no automatic copying over to the MC400 at the moment, to read the news headlines the file has to be accessed manually as REM::C:\NEWS\BBC_NEWS.TXT. This is possible as I have the DOS “MCLINK.EXE” running on the Pi in the dosbos-x emulator, but this obviously relies on the Link app running on the MC400. The dosbox-x config uses the USB-serial adapter /dev/ttyUSB1 as COM1 and mounts /home/pi/mc400 as C:\

It’s a nasty, hacky script, but it works. For now. I’ve created a crontab entry to run this script every 15 mins, and write the top 15 (ish) headlines to a text file.

Shell script – /home/pi/src/

curl --silent "$url" | grep -E '(title>|description>|link>)'  | \
sed -n '4,$p' |  \
sed -e 's/          //' -e 's/<title>//' -e 's/<\/title>//' -e 's/<description>/   /' \
-e 's/<\/description>//' -e 's/<link>/    /' -e 's/<\/link>/\n/' \
-e 's/<!\[CDATA\[//' -e 's/\]\]>//' -e 's/?at_medium=RSS&amp;at_campaign=KARANGA//' 

crontab entry:

2,17,32,47 * * * * /home/pi/src/ | head -n62 > /home/pi/mc400/NEWS/BBC_NEWS.TXT
%d bloggers like this: