@@ -2999,7 +2999,45 @@ static void endpoint_config(const char *input, void *user_data)
endpoint_set_config(cfg);
}
+static void config_endpoint_iso_stream(const char *input, void *user_data)
+{
+ struct endpoint_config *cfg = user_data;
+ char *endptr = NULL;
+ int value;
+
+ value = strtol(input, &endptr, 0);
+
+ if (!endptr || *endptr != '\0' || value > UINT8_MAX) {
+ bt_shell_printf("Invalid argument: %s\n", input);
+ return bt_shell_noninteractive_quit(EXIT_FAILURE);
+ }
+
+ bcast_qos.bcast.bis = value;
+
+ endpoint_set_config(cfg);
+}
+
+static void config_endpoint_iso_group(const char *input, void *user_data)
+{
+ struct endpoint_config *cfg = user_data;
+ char *endptr = NULL;
+ int value;
+
+ value = strtol(input, &endptr, 0);
+
+ if (!endptr || *endptr != '\0' || value > UINT8_MAX) {
+ bt_shell_printf("Invalid argument: %s\n", input);
+ return bt_shell_noninteractive_quit(EXIT_FAILURE);
+ }
+
+ bcast_qos.bcast.big = value;
+
+ bt_shell_prompt_input(cfg->ep->path, "BIS (value):",
+ config_endpoint_iso_stream, cfg);
+}
+
static struct endpoint *endpoint_new(const struct capabilities *cap);
+static void endpoint_init_defaults(struct endpoint *ep);
static void cmd_config_endpoint(int argc, char *argv[])
{
@@ -3033,6 +3071,7 @@ static void cmd_config_endpoint(int argc, char *argv[])
if (cap) {
broadcast = true;
cfg->ep = endpoint_new(cap);
+ endpoint_init_defaults(cfg->ep);
cfg->ep->preset = find_presets_name(uuid, argv[3]);
if (!cfg->ep->preset)
bt_shell_printf("Preset not found\n");
@@ -3068,7 +3107,11 @@ static void cmd_config_endpoint(int argc, char *argv[])
/* Set QoS parameters */
cfg->qos = &preset->qos;
- endpoint_set_config(cfg);
+ if (cfg->ep->broadcast)
+ bt_shell_prompt_input(cfg->ep->path, "BIG (value):",
+ config_endpoint_iso_group, cfg);
+ else
+ endpoint_set_config(cfg);
return;
}