Files
Daniel Markstedt 485298ffe5 restore X68000 Host Bridge support
Restore the SCBR device as an X68000 Host Bridge, including the Human68k-compatible host file-system service and the bridge-specific SCSI message handlers. Back its Ethernet path with the TAP driver, derive a stable locally administered MAC address, preserve the driver minimum-frame/FCS expectations, and restrict received traffic to its own unicast frames and broadcasts.

Match the RASCTL/RASETHER/RASDRV bridge protocol that originated in the parent RaSCSI project: dispatch its non-standard message format on READ(10)/WRITE(10) (0x28/0x2a), with type, function, phase, and a three-byte byte count carried in the CDB. Advertise the legacy control channel required by RASCTL, translate its list and device-management commands to PiSCSI operations, and defer stop or system-shutdown requests until after the response is sent, while gating this insecure interface behind a new '-c disabled|media|full' runtime option. Preserve the type-1 Ethernet exchange used by RASETHER and the type-2, phased filesystem exchange used by RASDRV.

Register the device in the factory, protobuf API, controller transfer path, command-line tooling, device listings, and web UI. Share the explicit bridge and proxy-ARP topology workflow with DaynaPort so both adapters validate and use the same mode/interface pair.

Add build support for iconv where needed, extend unit coverage for device creation, RAS* protocol handling, CLI parsing, web attachment, and topology selection, and update the man pages and network-profile documentation for Host Bridge operation and its networking limits.
2026-09-01 00:52:00 +02:00
..
2026-08-02 09:01:26 +02:00
2026-08-02 09:01:26 +02:00
2026-08-02 09:01:26 +02:00
2026-08-02 09:01:26 +02:00
2026-08-02 09:01:26 +02:00
2026-08-02 09:01:26 +02:00
2026-08-02 09:01:26 +02:00
2026-08-02 09:01:26 +02:00
2026-09-01 00:52:00 +02:00

PiSCSI Control Board client

piscsi-ctrlboard is the Go client for the PiSCSI Control Board. It reads the rotary encoder and buttons through the PCA9554 I2C expander, presents the menu on a 128x64 SSD1306 I2C display, and sends PiSCSI daemon commands for SCSI-ID management, image attach/eject, profiles, and system actions. The input path is kept separate from menu, network, and display work so that hardware events remain responsive.

It is intended to run on a Raspberry Pi with the Control Board attached. By default it uses /dev/i2c-1, PCA9554 address 0x3f, SSD1306 address 0x3c, and BCM GPIO 9 for the expander interrupt. The PiSCSI daemon is expected at localhost:6868.

The PiSCSI Control Board hardware and original Python client were created by Benjamin Zeiss, and the Go client is a rewrite of that software.

I2C and GPIO prerequisites

Enable I2C on Raspberry Pi OS and verify that the board devices are visible:

sudo apt-get update
sudo apt-get install --no-install-recommends --assume-yes i2c-tools raspi-config
sudo raspi-config nonint do_i2c 0
i2cdetect -y 1

Reboot if I2C was newly enabled. The usual addresses are 0x3c for the display and 0x3f for the PCA9554. The process also needs access to /dev/gpiochip0; run it with the appropriate device permissions or through the service manager.

Build and run

From the shared Go module root, build the native binary and run it on the Pi:

cd go
go build -o piscsi-ctrlboard ./cmd/piscsi-ctrlboard
./piscsi-ctrlboard

Print the PiSCSI project version and copyright information without accessing the Control Board hardware or daemon:

./piscsi-ctrlboard -v

The Makefile offers equivalent build targets, including cross-compilation for Raspberry Pi targets:

cd go
make build-ctrlboard
make build-ctrlboard-linux-arm64
make build-ctrlboard-linux-armv7

Use --help to list all options. Common overrides include --host and --port for the daemon, --password for a daemon token, --rotation=180 for an inverted display, and --transitions to animate submenu navigation. Set --display=false to disable SSD1306 rendering; the Control Board PCA9554 and GPIO interrupt are still required.

./piscsi-ctrlboard --host=piscsi.local --port=6868 --rotation=180
./piscsi-ctrlboard --diagnostic

Diagnostic mode logs PCA9554 snapshots, decoded input events, queue drops, and latency counters. It is useful when verifying encoder direction, button debounce, I2C addresses, or the GPIO interrupt connection.

Service

The piscsi-ctrlboard Debian package installs piscsi-ctrlboard.service. Enable it after installing the package:

sudo systemctl enable --now piscsi-ctrlboard

Use a systemd drop-in to pass non-default hardware addresses, daemon connection details, or display options.