PiEconetBridge

Episode 3 introduced Acorn Universal Networking (AUN), which lets Econet services communicate over an IP network. In this episode, I will set up PiEconetBridge, a Raspberry Pi-based bridge between a real, cabled Econet and AUN devices on an IP network.

This makes it possible for BBC computers on a physical Econet to communicate with AUN stations, including emulators such as BeebEm. With two bridges, separate Econet networks can also be connected over an IP link. The Pi needs Econet interface hardware as well as its normal network connection.

In May of 2024, I started playing with Acorn Econet using PiEconetBridge on a Raspberry Pi 3A+.

Ken Lowe designed the Econet HAT, a Raspberry Pi add-on for connecting to a physical Econet. Newer HAT versions like mine include an Econet clock and termination.

Chris Royle wrote PiEconetBridge; the software that links that bus to AUN over IP.

OS installation

I use a Raspberry Pi 3A+ (WiFi only) with a 16GB or 32GB MicroSD card. You can use a model 3B+ or 4 if you need Wired LAN.

  • Download Raspberry Pi Imager to write the MicroSD card
  • Insert the MicroSD card and start the Imager
  • In the Imager, select “Raspberry Pi 3” device, “Raspberry Pi OS (Other)”, “Raspberry Pi OS Lite (64-bit)”
  • Select your MicroSD card
  • Customize settings: configure Wi-Fi, enable SSH. Username ‘pi’ is recommended.
  • Write the image to your MicroSD card

Plug the Econet HAT into your Raspberry Pi, insert the MicroSD and connect a display and keyboard. Power up the Raspberry Pi and log in as user ‘pi’ (you can also connect via SSH; consult your router for the appropriate IP address)

PiEconetBridge installation

First, install additional packages required to build the software:

sudo apt install attr cmake curl git jq \
    libexplain51 libexplain-dev libexplain-doc \
    libssl-dev linux-headers-rpi-v8 locate wget

Download and install the most recent PiEconetBridge software release:

mkdir ~/workarea
cd ~/workarea/
git clone https://github.com/cr12925/PiEconetBridge
make install

After successful installation, reboot to activate the Econet HAT.

Note:

  • On my Econet HAT boards, I had to update the EEPROM contents during software installation before the interface was recognized.
  • Do not forget to re-run the installer after every kernel upgrade (“apt update && apt upgrade”). The kernel module needs to be updated and installed after every kernel upgrade.

Basic configuration

The PiEconetBridge configuration file is in /etc/econet-gpio/econet-hpbridge.cfg. Example configuration from my bridge:

# Documentation:
#   https://github.com/cr12925/PiEconetBridge/blob/v2.1-release/docs/README.CONFIG-v2.1
    
# Create Econet wire network 1, with an emulated file server on station 254
#   The order of configuration statements is important!
WIRE NET 1 ON DEVICE /dev/econet-gpio
FILESERVER ON 1.254 PATH /home/pi/econetfs

# Configure Econet clock
SET NETWORK CLOCK ON NET 1 PERIOD 5 MARK 1

# Allow remote BeebEm to communicate with stations on the bridge
#   - use AUTOACK for emulators, NONE for Acorn AUN stations (e.g. RiscPC)
#
# Emulator: BeebEm on laptop, assuming LAN subnet 192.168.1.0/24
AUN MAP HOST 1.238 ON 192.168.1.238 PORT 32768 AUTOACK

# Expose locally emulated fileserver to AUN/IP (e.g. for BeebEm)
EXPOSE HOST 1.254 ON PORT *:32768

# EXPOSE lines must come at the end of the configuration file

Fileserver

Fileserver contents are located in the home directory of user ‘pi’, specifically /home/pi/econetfs/:

$ cd ~/econetfs; tree -L 2
.
├── 0PIBRIDGE-00
│   ├── ArthurLib
│   ├── econet001
│   ├── ELK
│   ├── Library
│   ├── Library1
│   └── SYSTEM
├── 1STORAGE
├── Configuration
├── Configuration.txt
├── Groups
├── MDFSPasswords
└── Passwords

Note that Acorn file attributes are stored as Extended file attributes on Linux filesystems:

$ getfattr -d ~/econetfs/0PIBRIDGE-00/Library/Users
# file: Users
user.econet_exec="FFFF0E23"
user.econet_homeof="0000"
user.econet_load="FFFF0E23"
user.econet_owner="0000"
user.econet_perm="15"

If you copy Acorn files via Linux, you MUST also copy the Extended Attributes (ask me how I know…). For example, use the ‘X’ option with rsync:

rsync -avX source/ destination/

In the next episode, I will dive into more advanced PiEconetBridge configuration - for example linking two bridges together so you can connect 2 phyisical Econets via an Ethernet (WiFi) connection.

References

Series episodes

Updated: