Add docs site deployment instructions and update progress log
This commit is contained in:
parent
48b61f462a
commit
612a5e94de
40
CLAUDE.md
40
CLAUDE.md
@ -307,6 +307,45 @@ The repo includes an extensive documentation collection (`Docs/`):
|
|||||||
- **BMW Communication Codes/** — 12 files with I-Bus message codes for E39/E46
|
- **BMW Communication Codes/** — 12 files with I-Bus message codes for E39/E46
|
||||||
- **HackTheIBus/** — 21 PDFs covering individual module protocols (IKE, LCM, MFL, EWS, DSP, etc.)
|
- **HackTheIBus/** — 21 PDFs covering individual module protocols (IKE, LCM, MFL, EWS, DSP, etc.)
|
||||||
|
|
||||||
|
## Docs Site
|
||||||
|
|
||||||
|
Starlight (Astro) documentation at **https://k-line.warehack.ing**. Source in `site/`.
|
||||||
|
|
||||||
|
### Local Development
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd site
|
||||||
|
npm run dev # Astro dev server on port 4329
|
||||||
|
```
|
||||||
|
|
||||||
|
Local reverse proxy: `k-line.l.warehack.ing` (via local Caddy).
|
||||||
|
|
||||||
|
### Remote Deployment
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ssh -A warehack-ing@k-line.warehack.ing "cd ~/i-k-bus-board/site && git pull && make rebuild"
|
||||||
|
```
|
||||||
|
|
||||||
|
`make rebuild` stops the container, rebuilds the Docker image (Astro build → Caddy Alpine), and starts fresh. `make up` reuses the existing image (faster but won't pick up code changes).
|
||||||
|
|
||||||
|
### Site Structure
|
||||||
|
|
||||||
|
- **Stack:** Astro + Starlight → static HTML → Caddy (via `caddy-docker-proxy` labels)
|
||||||
|
- **Config:** `site/.env` has `COMPOSE_PROJECT_NAME=k-line-docs` and `DOMAIN=k-line.warehack.ing`
|
||||||
|
- **Public assets:** `site/public/spice/` contains SPICE netlists (.cir), waveform SVGs, and schematic PNG — served at `/spice/`
|
||||||
|
- **Custom CSS:** `site/src/styles/custom.css` — waveform dark mode filter, schematic image styling
|
||||||
|
|
||||||
|
### Makefile Targets
|
||||||
|
|
||||||
|
| Target | Description |
|
||||||
|
|--------|-------------|
|
||||||
|
| `make up` | Start production (reuses existing image) |
|
||||||
|
| `make rebuild` | Force rebuild and restart (picks up code changes) |
|
||||||
|
| `make dev` | Start dev mode with hot reload |
|
||||||
|
| `make down` | Stop containers |
|
||||||
|
| `make logs` | Tail container logs |
|
||||||
|
| `make clean` | Remove containers and images |
|
||||||
|
|
||||||
## Firmware
|
## Firmware
|
||||||
|
|
||||||
PlatformIO project in `firmware/` — builds for ESP32, ESP32-C3, ESP32-S3, and OBD-II scanner.
|
PlatformIO project in `firmware/` — builds for ESP32, ESP32-C3, ESP32-S3, and OBD-II scanner.
|
||||||
@ -411,6 +450,7 @@ pio device monitor # serial monitor at 115200
|
|||||||
8. **Multi-protocol refactor (K-Line)** — split monolithic IbusEsp32 into KLineTransport (hardware) + IbusHandler (BMW FSM). Library renamed from IbusEsp32 to KLine. IbusEsp32 preserved as backward-compatible facade. Zero changes to existing BMW sniffer sketch.
|
8. **Multi-protocol refactor (K-Line)** — split monolithic IbusEsp32 into KLineTransport (hardware) + IbusHandler (BMW FSM). Library renamed from IbusEsp32 to KLine. IbusEsp32 preserved as backward-compatible facade. Zero changes to existing BMW sniffer sketch.
|
||||||
9. **OBD-II K-line support** — KLineObd2 handler with ISO 9141 5-baud slow init, ISO 14230 fast init (TiniPulse), request/response with half-duplex echo clearing. Obd2Pids.h with ~20 common PID decode helpers (SAE J1979). Scanner example sketch polls RPM, speed, coolant temp, throttle, voltage.
|
9. **OBD-II K-line support** — KLineObd2 handler with ISO 9141 5-baud slow init, ISO 14230 fast init (TiniPulse), request/response with half-duplex echo clearing. Obd2Pids.h with ~20 common PID decode helpers (SAE J1979). Scanner example sketch polls RPM, speed, coolant temp, throttle, voltage.
|
||||||
10. **OBD-II code review + hardening** — Apollo code review identified 4 critical and 7 important issues. All fixed: proper UART pin detach (`pinMatrixOutDetach`), timeout underflow guards, checksum validation, echo verification, RX buffer flush after init, structural ISO 14230 frame parsing, negative response handling, TesterPresent keepalive, and session re-initialization.
|
10. **OBD-II code review + hardening** — Apollo code review identified 4 critical and 7 important issues. All fixed: proper UART pin detach (`pinMatrixOutDetach`), timeout underflow guards, checksum validation, echo verification, RX buffer flush after init, structural ISO 14230 frame parsing, negative response handling, TesterPresent keepalive, and session re-initialization.
|
||||||
|
11. **Docs site with SPICE waveforms** — Starlight site deployed to `k-line.warehack.ing`. Circuit design page has inline schematic, tabbed waveform SVGs (RX/TX paths, 2000-point plots from mcltspice), and all 8 netlists as downloadable `.cir` files. Dark mode CSS filter for white-background SVGs.
|
||||||
|
|
||||||
## What's Next
|
## What's Next
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user