Jump to content

Hardware.ChiMesh/BIBLE

From MindAttic Docs

ChiMesh — Project Bible

Single source of truth for what ChiMesh IS, is NOT, and the rules that keep it coherent. README says how to build/run; this says how to think about the system.

1. The one sentence

ChiMesh is a buildable hardware guide for three solar-powered RAK4631 Meshtastic nodes (~$62/node) that prove multi-hop LoRa routing across Chicago — published as its GitHub README, with a hand-maintained static parts table drawn from the parts catalog — with PowerShell tooling to provision and health-check the physical nodes.

2. The product promise

  • A reader with ~$186 and basic soldering skill can order the parts, assemble three IP65 nodes in ~30 min each, flash stock Meshtastic, provision them identically, and watch a message route A → via B → C.
  • Every part in the bill of materials is compatibility-checked end-to-end (panel → TP5000 → LFP → JST → RAK19003 → RAK4631 → IPEX → SMA → antenna); see §4.
  • The guide covers the reader's choices (region / role / deployment / antenna) in plain prose: the README's Build options table lists them and notes per choice where a step changes. The axes are defined in configAxes in config/parts.json.
  • Two safety rules are non-negotiable and surfaced everywhere: LiFePO4-only chemistry and never-USB-while-cell-wired; see Law CM-LAW-1 and Law CM-LAW-2.

3. What it is NOT

  • NOT custom firmware. ChiMesh v0 runs stock Meshtastic 2.5.x; the value is deployment + config conventions, not a fork. (See README §04.)
  • NOT a lamp disguise. The disguised-enclosure ("streetlight") concept is explicitly v2, after the protocol is proven.
  • NOT a 1-hop demo. Nodes must be placed so at least one pair cannot hear each other directly; otherwise nothing about multi-hop routing is proven. (See README §6.2.)
  • NOT Li-ion. Li-ion is forbidden outdoors in Chicago winter — see Law CM-LAW-1.
  • NOT a server/app/database. There is no backend and no build output: the project page is README.md as shown by GitHub (https://github.com/mindattic/ChiMesh). README.htm is a local preview generated by tools/build-readme.ps1.
  • NOT a web deploy. Nothing renders or uploads ChiMesh to a website, here or in any sibling repo; to update the project page, edit README.md and push.
  • NOT an interactive configurator. There is no picker, cost calculator or conditional copy; the README's parts table is static and maintained by hand from config/parts.json.

4. Architecture canon

ChiMesh is content + data (the README and config/) plus node tooling (scripts/cli/). Physically, each node is a fixed signal chain.

  CONTENT
  ───────
  config/parts.json .... parts + axes ──(copied by hand)──►  README.md parts table
  config/versions.json . pinned versions ──(inlined)──────►  README.md
  config/images/* ...... part photos ──(linked)───────────►  README.md
  README.md ............ build narrative = the project page on GitHub

  NODE TOOLING (this repo, scripts/cli, runs against a USB-connected node via the meshtastic Python CLI)
  ──────────────────────────────────────────────────────────────────────────────────────────────────
  ChiMesh.Console.ps1 ──► provision-node.ps1   (set region / role / channel0 / owner)
                     └──► healthcheck-mesh.ps1  (verify region/role/channel/peers)

  PHYSICAL SIGNAL CHAIN (one node)
  ────────────────────────────────
  5V/2W solar ─► TP5000 (LFP jumper!) ─► LiFePO4 18650 ─► JST-PHR-2 ─► RAK19003 ─► RAK4631
                                                                          RAK4631 IPEX ─► pigtail ─► SMA bulkhead ─► 915 MHz antenna

4.1 Projects / components

  • README.md — the authoritative build narrative and the project page, a static GitHub page. Its parts table is written by hand from config/parts.json; nothing generates or checks it, so when a part or price changes, update both.
  • config/parts.json — L5 canon-as-data: the parts catalog, configAxes (region/role/deployment/antenna), category definitions, and prices. Registered via docs/data/parts.json against part.schema.json.
  • config/versions.json — reference snapshot of pinned upstream versions (Meshtastic firmware/CLI, board labels, region/channel defaults). Values are inlined into README.md; this file is the canonical list to keep in sync.
  • config/images/* — per-part photos, linked as images from the README.
  • scripts/cli/ChiMesh.Console.ps1 — single dispatch-table entry point for parts-catalog + node tasks (provision, healthcheck, list-parts, find-deals, pull-latest).
  • scripts/cli/provision-node.ps1 — provisions one USB node (region/role/channel0/owner) idempotently and reads back to confirm.
  • scripts/cli/healthcheck-mesh.ps1 — six-check smoke test against a connected node.
  • tools/build-readme.ps1 — regenerates the local README.htm preview through the shared engine in codex-standard.
  • /deploy — the shared global router (~/.claude/commands/deploy.md, no per-repo copy) finds no deploy mechanism here and tells the user there is no web deploy.

4.2 Domain model (NOUNS)

  • Node — one assembled unit (RAK4631 + RAK19003 + power chain + enclosure + antenna). Owner name like chimesh-001.
  • Part — a catalog row (part.<id>); category ∈ {core, consumable, tools}. Canon in config/parts.json.
  • Config axis — a reader choice (region, role, deployment, antenna), defined in configAxes and covered by the README's per-choice notes.
  • Mesh — the set of nodes; proven when a message routes through at least one intermediate hop.
  • Channel — Meshtastic channel 0 (default name ChiMeshTest), shared name + PSK across nodes.
  • Region / Role — LoRa region (default US / 915 MHz) and device role (default ROUTER_CLIENT).

4.3 Key services (VERBS)

  • Provision — provision-node.ps1 writes region/role/channel0/owner over USB, reboots, reads back.
  • Healthcheck — healthcheck-mesh.ps1 verifies CLI present, node responds, region set, role set, channel-0 named, ≥1 NodeDB peer.
  • List / find deals — ChiMesh.Console browses the parts catalog and records chosen purchase URLs.
  • Pull-latest — self-update by fast-forward (git merge --ff-only) via a detached finisher; refuses when the tree is dirty or the branch has local commits.

5. The Laws

ChiMesh inherits the org-wide MindAttic House Rules — see MindAttic.HouseRules.md (HOUSE-LAW-1 … HOUSE-LAW-9). They are not restated here. Most directly relevant: whole-number versioning [see HOUSE-LAW-1], soft-disable over hard-delete [see HOUSE-LAW-2], "done is verified, not asserted" [see HOUSE-LAW-8], and psst only on explicit request [see HOUSE-LAW-9].

Project-specific laws below override nothing in the house rules; they encode ChiMesh's hardware-safety and proof invariants.

CM-LAW-1 — LiFePO4, never Li-ion

Every outdoor ChiMesh node uses a LiFePO4 (IFR18650) cell, never Li-ion. Chicago winters charge below 0 °C; Li-ion permanently plates lithium when charged that cold and can fail dangerously by summer. Non-negotiable. (Part part.lfp-18650.)

CM-LAW-2 — Never USB-C into the RAK19003 while the LFP cell is on the JST

The RAK19003's onboard charger is Li-ion only (4.2 V termination) and will overcharge an LFP cell (3.65 V max). Safe re-flash procedure: unplug JST-PHR-2 → plug USB-C → do the work → unplug USB-C → re-plug JST. (See README §6.1.) The cell is therefore installed only AFTER firmware + config are done.

CM-LAW-3 — Set the TP5000 jumper to LFP (3.6 V) before connecting anything

The TP5000 ships with its chemistry jumper in either position. Wrong jumper (Li-ion 4.2 V) destroys the LFP cell in weeks. Setting it to LFP/3.6 V is step 1 of every build. (Part part.tp5000-lfp.)

CM-LAW-4 — SMA, not RP-SMA

LoRa antennas and pigtails are SMA. RP-SMA looks identical, mates physically in some cases, and is wrong (it's for Wi-Fi/Helium). Buy SMA for part.antenna-915-sma and part.pigtail-ipex-sma.

CM-LAW-5 — Stock firmware, conventions over forks

v0 runs unmodified Meshtastic 2.5.x. ChiMesh's value is repeatable deployment + identical multi-node config conventions, not custom firmware. Do not fork firmware for v0.

CM-LAW-6 — Prove multi-hop, or you've proven nothing

The three proof nodes must be placed so at least one pair cannot reach each other directly, forcing traffic through an intermediate node. A network where every node shows 1 hop does not satisfy the product promise. (See README §6.2, §7.3.)

CM-LAW-7 — Single home per fact; parts data is canon-as-data

Part facts (price, specs, sources) live only in config/parts.json (registered L5 via docs/data/parts.json). Pinned upstream version facts live only in config/versions.json. Prose cites by part.<id> and never restates the fields. The README's parts table is the one deliberate hand copy of the catalog; keep it in step with config/parts.json.

6. Verified state

Status legend: ✅ done (verified) · 🟡 partial · ⬜ planned · living.

  • 🟡 Content is authored and internally consistent. README.md (sections 01–08), config/parts.json (20 parts across core/consumable/tools — 10 core, 3 consumable, 7 tools — 4 config axes), config/versions.json, and 10 part images all exist and cross-reference correctly. No automated test asserts this — verified by review only, hence 🟡.
  • 🟡 Node tooling exists. provision-node.ps1 and healthcheck-mesh.ps1 are complete and parameter-validated, but exercising them requires physical RAK4631 hardware + the meshtastic Python CLI, which is not present in CI. Unproven here → 🟡.
  • ⬜ Physical proof-of-mesh (A → via B → C) — depends on three assembled nodes; not yet demonstrated in-repo.
  • ⬜ No build/test command in this repo. There is no Node or .NET project, no test tree and no npm test/dotnet test. The closest in-repo verifier is tools/codex.ps1 doctor (docs integrity).

Build/test evidence (this repo, 2026-06-07): No application build or unit-test command exists. pwsh is unavailable on this host; tooling runs under Windows PowerShell 5.1 via powershell -File. tools/codex.ps1 doctor is the authoritative in-repo gate — see USER_STORIES for per-story test citations (the codex tooling stories cite codex.ps1 doctor).

7. Active frontier

  • Physical proof run — assemble + deploy three nodes and capture the via B hop. → USER_STORIES Epic C.
  • PSK / secured channel — provision-node.ps1 currently leaves channel 0 PSK at the Meshtastic default; generating + distributing a real PSK is deferred to the deployment phase. → RFC 0001.
  • Winter power margin — December harvest (~150–200 mAh/day) barely clears draw (~250 mAh/day); §6.3 documents adding a second cell or a 5 W panel. → backlog.
  • v2 lamp disguise — out of scope for v0; tracked as a far-future epic.

8. Quality bar

A feature/change is done only when:

  1. The relevant fact has a single home (parts → config/parts.json; versions → config/versions.json; narrative → README.md; rules → this bible / house rules) — no duplication. [see CM-LAW-7]
  2. tools/codex.ps1 doctor passes (front-matter valid, IDs unique, cross-refs resolve, parts validate against schema, every ✅ story names an existing-or-best-effort test, cited paths exist, digest fresh).
  3. Per-choice notes in the README use the axis values in config/parts.json.configAxes, and the README parts table matches config/parts.json.
  4. Safety laws [CM-LAW-1..4] are honored in any procedure that touches power, charging, or RF.
  5. "Done is verified, not asserted" [see HOUSE-LAW-8]: a story is ✅ only when a test or build proves it; otherwise 🟡/⬜.

9. Glossary

  • LoRa — long-range, low-power RF modulation; here on the 915 MHz US ISM band via Semtech SX1262.
  • Meshtastic — open-source mesh firmware/app over LoRa; ChiMesh runs it stock (2.5.x).
  • Multi-hop / proof-of-mesh — a packet relayed through an intermediate node (via B); the project's headline goal. [see CM-LAW-6]
  • RAK4631 — RAK Wireless WisBlock Core: nRF52840 MCU + SX1262 radio (part.rak4631).
  • RAK19003 — WisBlock Mini base board: USB-C (flash only), JST battery in, IPEX pass-through (part.rak19003).
  • TP5000 — solar charge controller with a Li-ion/LFP chemistry jumper (part.tp5000-lfp). [see CM-LAW-3]
  • LFP / LiFePO4 / IFR18650 — the only permitted cell chemistry (part.lfp-18650). [see CM-LAW-1]
  • JST-PHR-2 — 2.0 mm battery connector feeding the RAK19003.
  • IPEX / u.FL — the tiny RF connector on the RAK4631 module; adapted to SMA by a pigtail (part.pigtail-ipex-sma).
  • SMA vs RP-SMA — interchangeable-looking RF connectors that are NOT compatible; LoRa uses SMA. [see CM-LAW-4]
  • ROUTER_CLIENT / ROUTER / CLIENT — Meshtastic device roles; fixed proof nodes use ROUTER_CLIENT.
  • Config axis — a reader choice (region/role/deployment/antenna) defined in config/parts.json.configAxes and covered by README notes.
  • Voc — open-circuit voltage; the 5 V/2 W panel reads ~6.5 V Voc unloaded.
From Hardware.ChiMesh/docs/BIBLE.md via MindAttic.Docs; synced automatically, so edit the repo, not this page.