crosspad_cdc
Send typed CDC control verbs to a CrossPad through the crosspad-hil daemon and get parsed replies for apps, pads, LEDs, audio, BLE and system commands, plus raw command lines.
Instructions
[ESP HW] Send typed CDC control verbs (main/hil_control.cpp) to a CrossPad through the crosspad-hil daemon and return the parsed replies. The verb families are apps, kits, pads, encoder, LEDs, memory, audio tasks, BLE and system, plus raw for any literal command line. Typed verbs return parsed objects; raw returns the line, a best-effort parse and more_lines (the lines the reply continues on, e.g. COREDUMP_INFO bt:/exc:, RESET_LOG rows). action picks the operation inside a verb family (listed on that parameter). system bootloader_request / stm_dfu, and raw BOOTLOADER_REQUEST, STM_DFU, OTA_BEGIN and OTA_DELTA, need confirmation; every other raw line (STM_FW_UPDATE, FW_SWITCH, FS_DELETE too) is sent as given. To drive the UI use crosspad_ui; USB profile switches go through crosspad_usb_mode, not raw USB_AUDIO. No CDC exists in the audio USB profile.
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": {
"verb": "<verb>"
},
"name": "crosspad_cdc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ms | No | enc press: hold time; ble scan: duration | |
| on | No | audio tasks: resume (true) or park (false) the RT mixer | |
| cmd | No | raw: exact CDC command line, e.g. 'KIT_STATUS' | |
| idx | No | pad press/release/pressure/info: pad index 0..15 | |
| val | No | pad pressure: 0..255 | |
| vel | No | pad press / ble send: velocity 0..127 | |
| addr | No | ble connect: peer address AA:BB:CC:DD:EE:FF | |
| mode | No | ble start: 0=server 1=host | |
| name | No | app start: app name as listed by action=list | |
| note | No | ble send: MIDI note | |
| verb | Yes | Verb family; `raw` sends one literal CDC line | |
| delta | No | enc rotate: detents, may be negative | |
| reset | No | pad stats: reset counters after reading | |
| semis | No | ble txoff: send transpose in semitones (not persisted) | |
| action | No | Operation inside the family; not used by raw. app: list|start name|stop|destroy|self_close|versions. kit: list|status|load kit_id. pad: press idx vel|release idx|pressure idx val|stats [reset]|notes|info idx. enc: rotate delta|press [ms]|group|focus|state|ui_state. led: state. mem: info|blocks. audio: level|tasks on|smpl_peak. ble: status|start mode|stop|scan ms|devices|connect addr|disconnect|send note vel|txoff semis. system: cdc_stats|bootloader_request|stm_dfu. | |
| device | No | Device id (dev_xxxx) or port; omit when exactly one CrossPad is connected | |
| expect | No | raw: reply prefix to wait for (default: from the verb catalog) | |
| follow | No | raw: also collect the lines the reply continues on (they start with a space, e.g. COREDUMP_INFO bt:/exc:) into more_lines; default from the verb catalog | |
| kit_id | No | kit load: kit id from action=list | |
| wait_s | No | app start / kit load: how long to wait for the device to confirm | |
| timeout_ms | No | raw: reply timeout | |
| confirm_token | No | Token from a previous confirmation_required result (danger verbs only) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ts | No | ||
| docs | No | ||
| hint | No | ||
| line | No | ||
| next | No | ||
| tool | No | ||
| verb | No | ||
| error | No | ||
| device | No | ||
| notice | No | ||
| parsed | No | ||
| result | No | ||
| rtt_ms | No | ||
| details | No | ||
| outcome | No | ||
| success | Yes | ||
| more_lines | No | ||
| elicitation | No | ||
| extra_lines | No | ||
| confirmation | No |