Bluetooth: shell: Add help to commands
This adds help strings to commands describing what parameters they take: btshell> help init init [none] btshell> help connect connect <address: XX:XX:XX:XX:XX:XX> <address type: (public)> Change-Id: I0b79cb4f2d424f74b0ddb1de7a6d7120e81e2ae3 Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
a4b26fadfe
commit
592acc09fd
|
@ -1703,50 +1703,63 @@ static void cmd_bredr_connectable(int argc, char *argv[])
|
|||
}
|
||||
#endif
|
||||
|
||||
#define HELP_NONE "[none]"
|
||||
#define HELP_ADDR "<address: XX:XX:XX:XX:XX:XX> <address type: (public)>"
|
||||
|
||||
static const struct shell_cmd commands[] = {
|
||||
{ "init", cmd_init },
|
||||
{ "connect", cmd_connect_le },
|
||||
{ "disconnect", cmd_disconnect },
|
||||
{ "auto-conn", cmd_auto_conn },
|
||||
{ "select", cmd_select },
|
||||
{ "scan", cmd_scan },
|
||||
{ "advertise", cmd_advertise },
|
||||
{ "init", cmd_init, HELP_NONE },
|
||||
{ "connect", cmd_connect_le, HELP_ADDR },
|
||||
{ "disconnect", cmd_disconnect, HELP_NONE },
|
||||
{ "auto-conn", cmd_auto_conn, HELP_ADDR },
|
||||
{ "select", cmd_select, HELP_ADDR },
|
||||
{ "scan", cmd_scan, "<value: on, off>" },
|
||||
{ "advertise", cmd_advertise,
|
||||
"<type: off, on, scan, nconn> <mode: discov, non_discov>" },
|
||||
#if defined(CONFIG_BLUETOOTH_SMP) || defined(CONFIG_BLUETOOTH_BREDR)
|
||||
{ "security", cmd_security },
|
||||
{ "auth", cmd_auth },
|
||||
{ "auth-cancel", cmd_auth_cancel },
|
||||
{ "auth-passkey", cmd_auth_passkey },
|
||||
{ "auth-confirm", cmd_auth_passkey_confirm },
|
||||
{ "auth-pairing", cmd_auth_pairing_confirm },
|
||||
{ "security", cmd_security, "<security level: 0, 1, 2, 3>" },
|
||||
{ "auth", cmd_auth,
|
||||
"<authentication method: all, input, display, yesno, none>" },
|
||||
{ "auth-cancel", cmd_auth_cancel, HELP_NONE },
|
||||
{ "auth-passkey", cmd_auth_passkey, "<passkey>" },
|
||||
{ "auth-confirm", cmd_auth_passkey_confirm, HELP_NONE },
|
||||
{ "auth-pairing", cmd_auth_pairing_confirm, HELP_NONE },
|
||||
#if defined(CONFIG_BLUETOOTH_BREDR)
|
||||
{ "auth-pincode", cmd_auth_pincode },
|
||||
{ "auth-pincode", cmd_auth_pincode, "<pincode>" },
|
||||
#endif /* CONFIG_BLUETOOTH_BREDR */
|
||||
#endif /* CONFIG_BLUETOOTH_SMP || CONFIG_BLUETOOTH_BREDR) */
|
||||
{ "gatt-exchange-mtu", cmd_gatt_exchange_mtu },
|
||||
{ "gatt-discover-primary", cmd_gatt_discover },
|
||||
{ "gatt-discover-secondary", cmd_gatt_discover },
|
||||
{ "gatt-discover-include", cmd_gatt_discover },
|
||||
{ "gatt-discover-characteristic", cmd_gatt_discover },
|
||||
{ "gatt-discover-descriptor", cmd_gatt_discover },
|
||||
{ "gatt-read", cmd_gatt_read },
|
||||
{ "gatt-read-multiple", cmd_gatt_mread },
|
||||
{ "gatt-write", cmd_gatt_write },
|
||||
{ "gatt-write-without-response", cmd_gatt_write_without_rsp },
|
||||
{ "gatt-write-signed", cmd_gatt_write_signed },
|
||||
{ "gatt-subscribe", cmd_gatt_subscribe },
|
||||
{ "gatt-unsubscribe", cmd_gatt_unsubscribe },
|
||||
{ "gatt-exchange-mtu", cmd_gatt_exchange_mtu, HELP_NONE },
|
||||
{ "gatt-discover-primary", cmd_gatt_discover,
|
||||
"<UUID> [start handle] [end handle]" },
|
||||
{ "gatt-discover-secondary", cmd_gatt_discover,
|
||||
"<UUID> [start handle] [end handle]" },
|
||||
{ "gatt-discover-include", cmd_gatt_discover,
|
||||
"[UUID] [start handle] [end handle]" },
|
||||
{ "gatt-discover-characteristic", cmd_gatt_discover,
|
||||
"[UUID] [start handle] [end handle]" },
|
||||
{ "gatt-discover-descriptor", cmd_gatt_discover,
|
||||
"[UUID] [start handle] [end handle]" },
|
||||
{ "gatt-read", cmd_gatt_read, "<handle> [offset]" },
|
||||
{ "gatt-read-multiple", cmd_gatt_mread, "<handle 1> <handle 2> ..." },
|
||||
{ "gatt-write", cmd_gatt_write, "<handle> <offset> <data> [length]" },
|
||||
{ "gatt-write-without-response", cmd_gatt_write_without_rsp,
|
||||
"<handle> <offset> <data>" },
|
||||
{ "gatt-write-signed", cmd_gatt_write_signed,
|
||||
"<handle> <offset> <data>" },
|
||||
{ "gatt-subscribe", cmd_gatt_subscribe, "<CCC handle> <value handle>" },
|
||||
{ "gatt-unsubscribe", cmd_gatt_unsubscribe, HELP_NONE },
|
||||
#if defined(CONFIG_BLUETOOTH_L2CAP_DYNAMIC_CHANNEL)
|
||||
{ "l2cap-register", cmd_l2cap_register },
|
||||
{ "l2cap-connect", cmd_l2cap_connect },
|
||||
{ "l2cap-disconnect", cmd_l2cap_disconnect },
|
||||
{ "l2cap-send", cmd_l2cap_send },
|
||||
{ "l2cap-register", cmd_l2cap_register, "<psm>" },
|
||||
{ "l2cap-connect", cmd_l2cap_connect, "<psm>" },
|
||||
{ "l2cap-disconnect", cmd_l2cap_disconnect, HELP_NONE },
|
||||
{ "l2cap-send", cmd_l2cap_send, "<number of packets>" },
|
||||
#endif
|
||||
#if defined(CONFIG_BLUETOOTH_BREDR)
|
||||
{ "br-iscan", cmd_bredr_discoverable },
|
||||
{ "br-pscan", cmd_bredr_connectable },
|
||||
{ "br-connect", cmd_connect_bredr },
|
||||
{ "br-discovery", cmd_bredr_discovery },
|
||||
{ "br-l2cap-register", cmd_bredr_l2cap_register },
|
||||
{ "br-iscan", cmd_bredr_discoverable, "<value: on, off>" },
|
||||
{ "br-pscan", cmd_bredr_connectable, "value: on, off" },
|
||||
{ "br-connect", cmd_connect_bredr, "<address>" },
|
||||
{ "br-discovery", cmd_bredr_discovery,
|
||||
"<value: on, off> [mode: limited]" },
|
||||
{ "br-l2cap-register", cmd_bredr_l2cap_register, "<psm>" },
|
||||
#endif
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue