|
openaliro
Aliro reader: UWB/CCC core and ESP32-S3/C5/C6 port
|
— `aliro` UART shell command: colored console over the UWB engine. More...
#include <stdint.h>#include <string.h>#include <zephyr/kernel.h>#include <zephyr/shell/shell.h>#include "aliro_shell.h"#include "ccc_shim.h"#include "fira_session.h"#include "flight_recorder.h"#include "uwb_cirdiag.h"#include "uwb_min.h"#include "uwb_rxdiag.h"Functions | |
| static void | hdr (const struct shell *sh, const char *title) |
| Section header: green "aliro · <title>" over a dim rule. | |
| static int | cmd_chip (const struct shell *sh, size_t argc, char **argv) |
| Read and display the DW3110 DEV_ID register; verify chip identification. | |
| static int | cmd_rx (const struct shell *sh, size_t argc, char **argv) |
| Display RX/TX frame tally and error counters. | |
| static int | cmd_range (const struct shell *sh, size_t argc, char **argv) |
| Display the last valid DS-TWR distance measurement and metadata. | |
| static int | cmd_selftest (const struct shell *sh, size_t argc, char **argv) |
| Run radio TX/RX self-test and display results. | |
| static int | cmd_log (const struct shell *sh, size_t argc, char **argv) |
| Enable, disable, or query the ranging heartbeat log output stream. | |
| static int | cmd_frames (const struct shell *sh, size_t argc, char **argv) |
| Enable, disable, or query the per-block distance stream output. | |
| void | aliro_shell_set_factory_reset (void(*fn)(void)) |
Supply the handler that aliro factoryreset yes invokes. | |
| static int | cmd_factoryreset (const struct shell *sh, size_t argc, char **argv) |
| Erase every stored credential and reboot, but only on an explicit "yes". | |
| static int | cmd_version (const struct shell *sh, size_t argc, char **argv) |
| Display the build commit SHA. | |
| static int | cmd_status (const struct shell *sh, size_t argc, char **argv) |
| Display all system status: chip ID, CCC bind state, URSK provisioning, last range, RX tally, and stream state. | |
| static int | cmd_aliro (const struct shell *sh, size_t argc, char **argv) |
| Print aliro shell command help and list all available subcommands. | |
— `aliro` UART shell command: colored console over the UWB engine.
| void aliro_shell_set_factory_reset | ( | void(*)(void) | fn | ) |
Supply the handler that aliro factoryreset yes invokes.
A factory reset is a Matter/CHIP operation, and CHIP is C++. This file's module is pure C and has no CHIP include paths, so the application registers the call instead of this layer reaching up for it. Pass NULL to unregister.
The handler is expected to erase provisioning and reboot; it may not return. Left unregistered (host tests, a build without the application) the command refuses with -ENOTSUP rather than pretending to have done anything.
| fn | Reset handler, or NULL. |
|
static |
Print aliro shell command help and list all available subcommands.
| sh | Shell context. |
| argc | Argument count; if >1, returns error for unknown subcommand. |
| argv | Argument vector; argv[1] if present must be empty or help request. |
|
static |
Read and display the DW3110 DEV_ID register; verify chip identification.
| sh | Shell context. |
| argc | Argument count (unused). |
| argv | Argument vector (unused). |
|
static |
Erase every stored credential and reboot, but only on an explicit "yes".
The confirm word is the whole safety mechanism: this is reachable over a bare UART with no undo, and aliro fa<TAB> completes to something that would otherwise unpair the lock on Enter. Without it the command only explains what it would destroy.
| sh | Shell context. |
| argc | Argument count; argv[1] must be the literal "yes" to proceed. |
| argv | Command arguments. |
|
static |
Enable, disable, or query the per-block distance stream output.
| sh | Shell context. |
| argc | Argument count; if ≥2, argv[1] must be "on" or "off". |
| argv | Command arguments; argv[1] optionally specifies "on" or "off". |
|
static |
Enable, disable, or query the ranging heartbeat log output stream.
| sh | Shell context. |
| argc | Argument count; if ≥2, argv[1] must be "on" or "off". |
| argv | Command arguments; argv[1] optionally specifies "on" or "off". |
|
static |
Display the last valid DS-TWR distance measurement and metadata.
| sh | Shell context. |
| argc | Argument count (unused). |
| argv | Argument vector (unused). |
|
static |
Display RX/TX frame tally and error counters.
| sh | Shell context. |
| argc | Argument count (unused). |
| argv | Argument vector (unused). |
|
static |
Run radio TX/RX self-test and display results.
| sh | Shell context. |
| argc | Argument count (unused). |
| argv | Argument vector (unused). |
|
static |
Display all system status: chip ID, CCC bind state, URSK provisioning, last range, RX tally, and stream state.
| sh | Shell context. |
| argc | Argument count (unused). |
| argv | Argument vector (unused). |
|
static |
Display the build commit SHA.
| sh | Shell context. |
| argc | Argument count (unused). |
| argv | Argument vector (unused). |