# v0.7.1 — Scripts stop losing commands to a booting device ## ✨ New features **`sendlnretry` — send a command, confirm it ran, resend if it didn't** * New TTL command: `sendlnretry '' '' [max attempts]`. It sends the text, then **waits for proof the device actually ran it**, and **resends** if that proof never arrives. Leave the attempt count out and it retries until it gets through. * Drop it in wherever you send a command right after a boot — the fragile `pause` + `sendln` + `wait` dance becomes one line: ``` wait 'root@(none):/#' sendlnretry 'tpm2' 'TPM 2p0' ; retry until the device really runs it wait 'PASS' ``` * Cap the attempts and handle the failure yourself — on success `result` is **1**; when the attempts run out `result` is **0** and **the script carries on** instead of dying: ``` sendlnretry 'tpm2' 'TPM 2p0' 3 if result = 0 then dispstr 'tpm2 got no response after 3 tries' endif ``` * Pick the confirm keyword from the command's **own output** (`TPM 2p0`), not its echo (`tpm2`) — an echo is produced by the device's tty and doesn't prove the shell ever read the line. * Each attempt waits **3 seconds** by default, or your `timeout` / `mtimeout` if you've set one. (Unlike `wait`, `0` doesn't mean "wait forever" here — that would mean never retrying.) ## 🐛 Bug fixes **Scripts no longer hang forever when a booting device swallows a command** * Fixed: a device that is still booting can **silently discard console input** the moment its shell takes over the tty. The line you sent is gone — the device never echoes it and never runs it — so the `wait` that follows blocks forever and the test rig sits dead until someone notices. * This is a race, not a delay: adding `pause` before `sendln` only lowers the odds of hitting the window, it can never close it. In one overnight 45-cycle power-cycle run, **3 cycles hung this way** — and the swallowed sends landed at exactly the same moment as the 42 that worked. * Use the new `sendlnretry` above to make these sends reliable. ## 📦 Downloads Two builds are produced: | Build | Needs .NET 8 Desktop Runtime? | Notes | |-------|-------------------------------|-------| | **Standard** (`ETTerms_v0.7.1`) | ✅ Yes | Smaller; for machines that already have the runtime | | **Portable** (`ETTerms_v0.7.1_portable`) | ❌ No | Runtime bundled — unzip and run, no install / admin needed | Run `ETTerms v0.7.1.exe`. ## 🔗 Links * TTL reference (see **送出並確認 / sendlnretry**): [docs/ttl-script-reference.md](https://github.com/ETWen/ETTerms/blob/main/docs/ttl-script-reference.md) * Architecture: [ARCHITECTURE.md](https://github.com/ETWen/ETTerms/blob/main/ARCHITECTURE.md) **Full changelog:** [v0.7.0...v0.7.1](https://github.com/ETWen/ETTerms/compare/v0.7.0...v0.7.1)