DocsReferenceAPI reference
Debug and drills
Fault drills and UI debugging: make the device drop the network or crash, or inject a status to check the UI. Use dropping and crashing only in drills (stick drill)
POST /v1/debug/status#
Inject a status to check the system screen, banner and icons
UI debugging: brings up the system screen, banner or status bar icon of a status. Only the UI sees it; the device's real state does not change. set clears itself when time is up (only the latest injection is kept). While an HID_* status is injected, a click of BOOT counts as an emergency stop
Request body#
application/json
Status to inject
| Field | Type | Required | Values | Range | Description |
|---|---|---|---|---|---|
id | string | Yes | pattern ^[A-Z][A-Z0-9_]*$ | Status name (status_map.def, such as PROVISIONING, IDENTIFY, WIFI_OFFLINE); same as id in GET /v1/status | |
op | string | set clear event; default set | set = show it and clear it when time is up, clear = clear it, event = send a one-off event | ||
value | integer | default -1 | Status value; meaning depends on the status | ||
detail | string | Detail text; truncated beyond 63 bytes | |||
seconds | integer | default 10 | 1–120 | How long set lasts, in seconds, 1–120 |
Examples#
Banner: identify#
{"id": "IDENTIFY", "op": "event"}Status bar shows offline for 15 s#
{"id": "WIFI_OFFLINE", "op": "set", "seconds": 15}Clear it#
{"id": "WIFI_OFFLINE", "op": "clear"}Reply#
Injected
Successful reply; endpoints add their own fields
| Field | Type | Required | Values | Range | Description |
|---|---|---|---|---|---|
ok | boolean | Yes | true | Always true |
Error codes#
| Status | Code | Description |
|---|---|---|
400 | bad_args | id is not a known status name, op is not set / clear / event, or seconds is not in 1–120. See the example “Banner: identify” for the correct form |
For errors any endpoint can return, see Common errors.
POST /v1/debug/net_drop#
Fault injection: drop the network for N s, then reconnect (this page drops too)
For drills (stick drill wifi): about 300 ms after replying the device disconnects Wi-Fi, neither reconnects nor enters Wi-Fi setup for seconds, then rejoins the same network. The device is unreachable meanwhile
Request body#
application/json · optional
The body is optional (defaults to 20 s)
| Field | Type | Required | Values | Range | Description |
|---|---|---|---|---|---|
seconds | integer | default 20 | 1–60 | Seconds offline, 1–60 |
Examples#
Drop for 10 s#
{"seconds": 10}Longest: 60 s#
{"seconds": 60}Reply#
Dropping
Disconnects about 300 ms after replying
| Field | Type | Required | Values | Range | Description |
|---|---|---|---|---|---|
ok | boolean | Yes | true | Always true | |
seconds | integer | Yes | 1–60 | Seconds offline |
Error codes#
| Status | Code | Description |
|---|---|---|
400 | bad_args | seconds is not an integer in 1–60, or the body is not a JSON object. See the example “Drop for 10 s” for the correct form |
409 | not_connected | Wi-Fi is not connected (joining or in setup); nothing to drop |
For errors any endpoint can return, see Common errors.
POST /v1/debug/crash#
Fault injection: crash and restart after about 0.5 s
For drills (stick drill crash / crash-wdt): logs one E-level line, then crashes and restarts about 500 ms after replying. It leaves a crash dump as usual (GET /v1/crash), counts toward the consecutive-crash count of boot protection, and the black-box log shows the lines before it
Request body#
application/json · optional
The body is optional (defaults to panic)
| Field | Type | Required | Values | Range | Description |
|---|---|---|---|---|---|
kind | string | panic int_wdt; default panic | panic = abort(); int_wdt = spin with interrupts off on this core so the interrupt watchdog fires |
Examples#
Panic#
{"kind": "panic"}Interrupt watchdog#
{"kind": "int_wdt"}Reply#
Crashing
Crashes and restarts about 500 ms after replying
| Field | Type | Required | Values | Range | Description |
|---|---|---|---|---|---|
ok | boolean | Yes | true | Always true | |
kind | string | Yes | panic int_wdt | How it crashes |
Error codes#
| Status | Code | Description |
|---|---|---|
400 | bad_args | kind must be panic or int_wdt, or the body is not a JSON object. See the example “Panic” for the correct form |
409 | busy | A crash is already scheduled |
For errors any endpoint can return, see Common errors.