crosspad_bench_claim
Claim the shared CrossPad bench before any hardware call to get a lease or queue position, preventing concurrent sessions from disrupting active tests.
Instructions
[ESP HW | STM HW] Claim the shared CrossPad bench before any hardware call; the reply says whether the lease is granted or your place in the queue. Several sessions use one board; opening its CDC port or flashing it breaks whoever is mid-test, so the board is leased: one holder, a queue behind it, expiry after the ttl without renewal. granted=true: you hold it; this server then sends your holder name with every hardware call and each call renews the lease. granted=false: another session holds it (message names it and its ETA, position is your place in the queue); hardware tools answer BENCH_BUSY until you hold it, so claim again later. A place not refreshed for an hour lapses; when the holder releases, the head of the queue has 10 minutes to claim. Calling it while you hold the board renews the lease. When done, call crosspad_bench_release.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"holder": "<holder>",
"purpose": "<purpose>"
},
"name": "crosspad_bench_claim"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Take the board from its current holder. Only for a holder that is gone (no answer, long past its ETA); it is logged in the board's history. | |
| device | No | Device id (dev_xxxx) or one of its port paths; omit when one CrossPad is connected. An id works even while the board is unplugged or in DFU. | |
| holder | Yes | Your session's name, e.g. 'platform-idf-cf' or 'crosspad-web-twin'. Use the same name every time: it is how the lease knows you. | |
| purpose | Yes | What you are about to do and which firmware you will flash, e.g. 'firmware_app test on pidf eac76e8, ~40 min'. Other sessions see it. | |
| ttl_min | No | Minutes before the lease expires unless renewed (default 30). Every hardware call you make renews it, and a running scenario or OTA keeps it alive. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ts | No | ||
| now | No | ||
| docs | No | ||
| hint | No | ||
| next | No | ||
| path | No | ||
| error | No | ||
| lease | No | ||
| queue | No | ||
| device | No | ||
| holder | No | ||
| notice | No | ||
| now_at | No | ||
| details | No | ||
| devices | No | ||
| granted | No | ||
| history | No | ||
| message | No | ||
| success | Yes | ||
| firmware | No | ||
| position | No | ||
| released | No | ||
| left_queue | No | ||
| reserved_for | No | ||
| session_holder | No |