From 6ff51bea1467ec14f26fe1d8eb9e87bb4418a2c8 Mon Sep 17 00:00:00 2001 From: "Rich O." Date: Sun, 1 Nov 2026 10:37:31 -0500 Subject: [PATCH] palm-client: install from the dev Mac over USB, drop the remote sync host pilot-link's macOS backend talks to the cradle through IOKit (port usb:), so make install runs pilot-xfer locally. --- docs/progress.md | 2 +- palm-client/Makefile | 13 ++++++----- palm-client/README.md | 24 ++++++++------------ palm-client/tools/cradle-install.sh | 35 ----------------------------- 4 files changed, 17 insertions(+), 57 deletions(-) delete mode 100755 palm-client/tools/cradle-install.sh diff --git a/docs/progress.md b/docs/progress.md index db28b55..70caa58 100644 --- a/docs/progress.md +++ b/docs/progress.md @@ -22,7 +22,7 @@ ### Palm client - [x] Toolchain set up: prc-tools-remix 2.3.6 + PilRC + Palm OS 3.5 SDK in Docker (`palm-client/Dockerfile`) - [x] Scaffold: builds `visormesh.prc` (main form + "Query radio" → CMD_DEVICE_QUERY); protocol framing with host tests -- [ ] Sync host (Mac mini, Debian 13): visor driver present ✓, build pilot-link into ~/.local, `make install` tested +- [ ] Install over USB from the dev Mac: build pilot-link (desrod) into ~/.local, `make install` tested with the Visor - [ ] Emulator: CloudpilotEmu with a Palm OS 3.5 ROM (the Visor isn't emulated); optionally POSE + a Visor Neo ROM in a Windows VM - [ ] Original Handspring SDK headers (Springboard `HsCard*` APIs; the PalmOne `HsExt.h` lacks them), needed for module-ROM work only - [ ] Port springSD bus routines; SC16IS740 driver diff --git a/palm-client/Makefile b/palm-client/Makefile index 691f687..66467b9 100644 --- a/palm-client/Makefile +++ b/palm-client/Makefile @@ -2,7 +2,7 @@ # # make build build/visormesh.prc (in Docker if the toolchain isn't installed) # make test run the host-side protocol tests -# make install copy the .prc to the sync host and install it over the USB cradle +# make install install the .prc over the USB cradle (press HotSync when asked) # make clean APP = visormesh @@ -16,9 +16,10 @@ CC = m68k-palmos-gcc CFLAGS = -palmos3.5 -O2 -Wall -Isrc PILRC = pilrc -# Linux host with the Visor USB cradle attached (see tools/cradle-install.sh). -SYNC_HOST ?= roberholtzer@10.3.0.150 -SYNC_PORT ?= /dev/ttyUSB1 +# pilot-link built from source into ~/.local (see README). On macOS the +# cradle is "usb:"; on Linux with the visor driver it's /dev/ttyUSB1. +PILOT_XFER ?= $(firstword $(wildcard $(HOME)/.local/bin/pilot-xfer) pilot-xfer) +PORT ?= usb: DOCKER_IMAGE = visormesh-palm DOCKER_RUN = docker run --rm --platform linux/amd64 -v "$(CURDIR)":/src -w /src $(DOCKER_IMAGE) @@ -59,8 +60,8 @@ build: endif install: all - scp -q build/$(APP).prc $(SYNC_HOST):/tmp/$(APP).prc - ssh $(SYNC_HOST) "bash -s -- /tmp/$(APP).prc $(SYNC_PORT)" < tools/cradle-install.sh + @echo "Press the HotSync button on the Visor cradle..." + $(PILOT_XFER) -p $(PORT) -i build/$(APP).prc clean: rm -rf build diff --git a/palm-client/README.md b/palm-client/README.md index ded3f6f..32d783f 100644 --- a/palm-client/README.md +++ b/palm-client/README.md @@ -32,26 +32,20 @@ Creator ID is `VMsh`. The database has the backup bit set, so HotSync keeps a co ## Install on the Visor -The Visor's USB cradle is plugged into a Linux sync host: the Mac mini running Debian 13 at `roberholtzer@10.3.0.150`. `make install` builds the `.prc`, copies it there, and runs `tools/cradle-install.sh`. That script waits for you to press the HotSync button and then runs `pilot-xfer -i`. +The Visor's USB cradle plugs straight into the dev Mac. `make install` builds the `.prc` and runs `pilot-xfer -p usb: -i`. Press the HotSync button when it asks. + +pilot-link isn't in Homebrew any more, so build https://github.com/desrod/pilot-link (maintained by pilot-link's original author) into `~/.local`. Its macOS USB backend uses IOKit directly, so no driver is needed: ```sh -make install # default SYNC_HOST is the Mac mini -make install SYNC_HOST=user@host SYNC_PORT=usb: # another host, or pilot-link via libusb +brew install autoconf automake libtool pkg-config libpng readline popt +git clone https://github.com/desrod/pilot-link.git ~/src/pilot-link +cd ~/src/pilot-link +./autogen.sh --prefix=$HOME/.local && make -j"$(sysctl -n hw.ncpu)" && make install ``` -The sync host needs: -- the kernel `visor` USB-serial driver. Debian 13 ships it as a module that loads when the Visor connects, and the Visor appears as `/dev/ttyUSB1` during HotSync. -- membership in the `dialout` group to open the tty -- `pilot-xfer`, from pilot-link. Debian 13 no longer packages it, so build https://github.com/desrod/pilot-link (maintained by pilot-link's original author) into `~/.local`: +The Makefile uses `~/.local/bin/pilot-xfer` when it exists. On Linux, use the kernel `visor` driver and `make install PORT=/dev/ttyUSB1`. - ```sh - git clone https://github.com/desrod/pilot-link.git ~/src/pilot-link - cd ~/src/pilot-link - ./autogen.sh --prefix=$HOME/.local && make -j"$(nproc)" && make install - ``` -- SSH key login from your dev machine - -**Not tested end to end yet.** +**Not tested end to end yet.** pilot-link's macOS USB support was tested with a Tungsten E2, not a Visor. ## Testing without hardware diff --git a/palm-client/tools/cradle-install.sh b/palm-client/tools/cradle-install.sh deleted file mode 100755 index a020273..0000000 --- a/palm-client/tools/cradle-install.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# Runs on the sync host (piped over ssh by `make install`): installs a .prc onto the -# Visor through its USB cradle using pilot-link. -# -# Usage: cradle-install.sh FILE.prc [PORT] -# PORT defaults to /dev/ttyUSB1 (the kernel visor driver's HotSync port). -# Use "usb:" instead if pilot-link was built with libusb. -set -euo pipefail - -# pilot-link is built from source into ~/.local (not packaged in Debian 13). -export PATH="$HOME/.local/bin:$PATH" - -prc="$1" -port="${2:-/dev/ttyUSB1}" - -if ! command -v pilot-xfer >/dev/null; then - echo "pilot-xfer not found on $(hostname). Install pilot-link first (see palm-client/README.md)." >&2 - exit 1 -fi - -echo "Press the HotSync button on the Visor cradle..." - -if [[ "$port" == /dev/* ]]; then - # The visor driver only creates the tty once HotSync starts. - for _ in $(seq 60); do - [[ -e "$port" ]] && break - sleep 1 - done - if [[ ! -e "$port" ]]; then - echo "Timed out waiting for $port. Is the visor kernel module loaded? (lsmod | grep visor)" >&2 - exit 1 - fi -fi - -pilot-xfer -p "$port" -i "$prc"