diff --git a/client/main.c b/client/main.c
index 3538a10..fca3176 100644
--- a/client/main.c
+++ b/client/main.c
{ } },
};
+static const struct bt_shell_menu gatt_menu = {
+ .name = "gatt",
+ .entries = {
+ { "list-attributes", "[dev]", cmd_list_attributes, "List attributes",
+ dev_generator },
+ { "set-alias", "<alias>", cmd_set_alias, "Set device alias" },
+ { "select-attribute", "<attribute/UUID>", cmd_select_attribute,
+ "Select attribute", attribute_generator },
+ { "attribute-info", "[attribute/UUID]", cmd_attribute_info,
+ "Select attribute", attribute_generator },
+ { "read", NULL, cmd_read, "Read attribute value" },
+ { "write", "<data=[xx xx ...]>", cmd_write,
+ "Write attribute value" },
+ { "acquire-write", NULL, cmd_acquire_write,
+ "Acquire Write file descriptor" },
+ { "release-write", NULL, cmd_release_write,
+ "Release Write file descriptor" },
+ { "acquire-notify", NULL, cmd_acquire_notify,
+ "Acquire Notify file descriptor" },
+ { "release-notify", NULL, cmd_release_notify,
+ "Release Notify file descriptor" },
+ { "notify", "<on/off>", cmd_notify, "Notify attribute value",
+ mode_generator },
+ { "register-application", "[UUID ...]", cmd_register_app,
+ "Register profile to connect" },
+ { "unregister-application", NULL, cmd_unregister_app,
+ "Unregister profile" },
+ { "register-service", "<UUID>", cmd_register_service,
+ "Register application service." },
+ { "unregister-service", "<UUID/object>", cmd_unregister_service,
+ "Unregister application service" },
+ { "register-characteristic", "<UUID> <Flags=read,write,notify...>",
+ cmd_register_characteristic,
+ "Register application characteristic" },
+ { "unregister-characteristic", "<UUID/object>",
+ cmd_unregister_characteristic,
+ "Unregister application characteristic" },
+ { "register-descriptor", "<UUID> <Flags=read,write...>",
+ cmd_register_descriptor,
+ "Register application descriptor" },
+ { "unregister-descriptor", "<UUID/object>",
+ cmd_unregister_descriptor,
+ "Unregister application descriptor" },
+ { } },
+};
+
static const struct bt_shell_menu main_menu = {
.name = "main",
.entries = {
dev_generator },
{ "disconnect", "[dev]", cmd_disconn, "Disconnect device",
dev_generator },
- { "list-attributes", "[dev]", cmd_list_attributes, "List attributes",
- dev_generator },
- { "set-alias", "<alias>", cmd_set_alias, "Set device alias" },
- { "select-attribute", "<attribute/UUID>", cmd_select_attribute,
- "Select attribute", attribute_generator },
- { "attribute-info", "[attribute/UUID]", cmd_attribute_info,
- "Select attribute", attribute_generator },
- { "read", NULL, cmd_read, "Read attribute value" },
- { "write", "<data=[xx xx ...]>", cmd_write,
- "Write attribute value" },
- { "acquire-write", NULL, cmd_acquire_write,
- "Acquire Write file descriptor" },
- { "release-write", NULL, cmd_release_write,
- "Release Write file descriptor" },
- { "acquire-notify", NULL, cmd_acquire_notify,
- "Acquire Notify file descriptor" },
- { "release-notify", NULL, cmd_release_notify,
- "Release Notify file descriptor" },
- { "notify", "<on/off>", cmd_notify, "Notify attribute value",
- mode_generator },
- { "register-application", "[UUID ...]", cmd_register_app,
- "Register profile to connect" },
- { "unregister-application", NULL, cmd_unregister_app,
- "Unregister profile" },
- { "register-service", "<UUID>", cmd_register_service,
- "Register application service." },
- { "unregister-service", "<UUID/object>", cmd_unregister_service,
- "Unregister application service" },
- { "register-characteristic", "<UUID> <Flags=read,write,notify...>",
- cmd_register_characteristic,
- "Register application characteristic" },
- { "unregister-characteristic", "<UUID/object>",
- cmd_unregister_characteristic,
- "Unregister application characteristic" },
- { "register-descriptor", "<UUID> <Flags=read,write...>",
- cmd_register_descriptor,
- "Register application descriptor" },
- { "unregister-descriptor", "<UUID/object>",
- cmd_unregister_descriptor,
- "Unregister application descriptor" },
{ } },
};
bt_shell_set_menu(&main_menu);
bt_shell_add_submenu(&advertise_menu);
bt_shell_add_submenu(&scan_menu);
+ bt_shell_add_submenu(&gatt_menu);
bt_shell_set_prompt(PROMPT_OFF);
dbus_conn = g_dbus_setup_bus(DBUS_BUS_SYSTEM, NULL, NULL);