A framework for testing and managing Fi-Wi networks
Go to file
Robert McMahon a488dc2ed0 Add Reflex CLI, inrush Reflex program, and hub stem discovery
- Wire fiwi.py reflex (help/doc/which/compile) through reflex_lang.py; discover arc and Reflex includes from BRAINSTEM2_DEV_ROOT and repo brainstem_sdk paths.
- Add reflex/inrush.reflex, compile script, reflex/.gitignore for generated .map files.
- Add tests/check_inrush.py; extend tests/check_concentrator.py.
- FiWiConcentrator: prefer defs.model_name(spec.model) stem class, then legacy MODEL_* order, then alternate 3p/3c/2x4 retries.
- Add fiwi_link/fiwi_relay package entrypoint stub.

Made-with: Cursor
2026-04-03 15:54:26 -07:00
api first commit 2026-03-07 15:59:12 -08:00
brainstem_sdk Vendor BrainStem Linux SDK tarball and document unpack/build 2026-04-03 15:48:02 -07:00
cli first commit 2026-03-07 15:59:12 -08:00
config Consolidate SSH and hub relay under fiwi; improve remote readiness tooling. 2026-04-03 13:04:24 -07:00
docs Vendor BrainStem Linux SDK tarball and document unpack/build 2026-04-03 15:48:02 -07:00
fiwi Add Reflex CLI, inrush Reflex program, and hub stem discovery 2026-04-03 15:54:26 -07:00
fiwi_link/fiwi_relay Add Reflex CLI, inrush Reflex program, and hub stem discovery 2026-04-03 15:54:26 -07:00
githooks check_concentrator: panel order, Power totals line; README + post-commit hook. 2026-04-03 14:54:40 -07:00
linux_brainstem_driverless first commit 2026-03-07 15:59:12 -08:00
reflex Add Reflex CLI, inrush Reflex program, and hub stem discovery 2026-04-03 15:54:26 -07:00
scripts Add Reflex CLI, inrush Reflex program, and hub stem discovery 2026-04-03 15:54:26 -07:00
tests Add Reflex CLI, inrush Reflex program, and hub stem discovery 2026-04-03 15:54:26 -07:00
.gitignore Rename harness to FiWiConcentrator; config profiles and smoke test 2026-04-03 11:35:24 -07:00
README.md check_concentrator: panel order, Power totals line; README + post-commit hook. 2026-04-03 14:54:40 -07:00
acronam_setup.sh first commit 2026-03-07 15:59:12 -08:00
fiber_map.example.json Rename harness to FiWiConcentrator; config profiles and smoke test 2026-04-03 11:35:24 -07:00
fiber_map.rpi20.json Refactor hub manager into hubmgr package for maintainability. 2026-03-27 18:33:55 -07:00
fiwi.py Line-buffer remote fiwi output: stdbuf + reconfigure stdout/stderr. 2026-04-03 13:11:46 -07:00
fiwi_env.sh feat(fiwi): Fi-Wi package, SSH transport, diagnostics, and docs 2026-03-30 18:16:57 -07:00
license.txt first commit 2026-03-07 15:59:12 -08:00
peak_detect.reflex first commit 2026-03-07 15:59:12 -08:00
readme.txt first commit 2026-03-07 15:59:12 -08:00
remote_ssh.env.example Consolidate SSH and hub relay under fiwi; improve remote readiness tooling. 2026-04-03 13:04:24 -07:00
requirements.txt SSH remote: ~/ paths via $HOME; discover hub/port table; test_read_remote 2026-04-03 12:05:34 -07:00
version.txt first commit 2026-03-07 15:59:12 -08:00

README.md

FiWiManager

Fi-Wi USB power-control hubs, fiber_map.json, SSH remotes, and related tooling. Deeper detail lives under docs/ (for example docs/fiwi-cli.md and docs/fiwi-design.md).

Git hooks: post-commit push and remote pull

You can use a post-commit hook that, after each commit, runs git push for the current branch to origin, then SSH to another machine (e.g. a lab Pi) and runs git pull in a clone there.

Install once per clone

./scripts/install-git-hooks.sh

That sets core.hooksPath to githooks/ so Git uses the tracked hook in this repository.

Enable (opt-in)

The hook does nothing unless you set:

export FIWI_POST_COMMIT_SYNC=1
export FIWI_POST_COMMIT_REMOTE='user@host'
export FIWI_POST_COMMIT_REMOTE_PATH='~/Code/FiWiManager'   # optional; default shown

Put those in your shell profile if you want them every session.

Variable Meaning
FIWI_POST_COMMIT_SYNC Must be 1 for the hook to run.
FIWI_POST_COMMIT_REMOTE SSH target for git pull (e.g. rjmcmahon@192.168.1.39). Required when SYNC=1; if empty, the hook skips both push and pull and prints a message.
FIWI_POST_COMMIT_REMOTE_PATH Directory of the FiWiManager clone on that host. Paths starting with ~/ are turned into $HOME/… on the remote.

Skip once: FIWI_POST_COMMIT_SYNC=0 git commit …

SSH: the hook uses ssh -o BatchMode=yes, so it expects non-interactive auth (keys).

Disable hooks from this repos githooks/ directory:

git config --unset core.hooksPath

See also comments at the top of githooks/post-commit.