Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[border-agent]: Improve the documentation returned by --help #2444

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mrene
Copy link

@mrene mrene commented Aug 18, 2024

This PR expands on the existing --help text by including short and long option names when available, and by adding options that were missing.

The current --help text is now:

Usage: ./otbr-agent [-I interfaceName] [-B backboneIfName] [-d DEBUG_LEVEL] [-v] [-s] [--auto-attach[=0/1]] RADIO_URL [RADIO_URL]
     -I, --thread-ifname    Name of the Thread network interface (default: wpan0).
     -B, --backbone-ifname  Name of the backbone network interfaces (can be specified multiple times).
     -d, --debug-level      The log level (EMERG=0, ALERT=1, CRIT=2, ERR=3, WARNING=4, NOTICE=5, INFO=6, DEBUG=7).
     -v, --verbose          Enable verbose logging.
     -s, --syslog-disable   Disable syslog and print to standard out.
     -h, --help             Show this help text.
     -V, --version          Print the application's version and exit.
     --radio-version        Print the radio coprocessor version and exit.
     --auto-attach          Whether or not to automatically attach to the saved network (default: 1).
     --rest-listen-address  Network address to listen on for the REST API (default: [::]).
     --rest-listen-port     Network port to listen on for the REST API (default: 8081).

RadioURL:
Radio Url format:    {Protocol}://${PATH_TO_DEVICE}?${Parameters}

Protocol=[spinel+hdlc*]           Specify the Spinel interface as the Spinel HDLC interface
    forkpty-arg[=argument string]  Command line arguments for subprocess, can be repeated.
    spinel+hdlc+uart://${PATH_TO_UART_DEVICE}?${Parameters} for real uart device
    spinel+hdlc+forkpty://${PATH_TO_UART_DEVICE}?${Parameters} for forking a pty subprocess.
Parameters:
    uart-parity[=even|odd]         Uart parity config, optional.
    uart-stop[=number-of-bits]     Uart stop bit, default is 1.
    uart-baudrate[=baudrate]       Uart baud rate, default is 115200 (460800 is another common value).
    uart-flow-control              Enable flow control, disabled by default.
    uart-reset                     Reset connection after hard resetting RCP(USB CDC ACM).

    region[=region-code]          Set the radio's region code. The region code must be an
                                  ISO 3166 alpha-2 code.
    cca-threshold[=dbm]           Set the radio's CCA ED threshold in dBm measured at antenna connector.
    enable-coex[=1|0]             If not specified, RCP coex operates with its default configuration.
                                  Disable coex with 0, and enable it with other values.
    fem-lnagain[=dbm]             Set the Rx LNA gain in dBm of the external FEM.
    no-reset                      Do not send Spinel reset command to RCP on initialization.
    skip-rcp-compatibility-check  Skip checking RCP API version and capabilities during initialization.
    bus-latency[=usec]            Communication latency in usec, default is 0.

Options that had both short and long names are rendered as such to make
scripts easier to read. Options that were undocumented were added.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant