From: "Gix, Brian" <brian.gix@intel.com>
To: "goodgame13241324@gmail.com" <goodgame13241324@gmail.com>,
"linux-bluetooth@vger.kernel.org"
<linux-bluetooth@vger.kernel.org>
Cc: "jefferson@zhai.ca" <jefferson@zhai.ca>
Subject: Re: [PATCH BlueZ 1/1] FIX: Fixed oversight of not supporting vendor model in Meshctl tool's sub-add command
Date: Thu, 11 Nov 2021 00:51:31 +0000 [thread overview]
Message-ID: <441371f1561e4504880850db796e59de9a28bf62.camel@intel.com> (raw)
In-Reply-To: <20211105165735.13606-2-GoodGame13241324@gmail.com>
Applied with minor fix-up of commit message.
On Fri, 2021-11-05 at 09:57 -0700, Jefferson Zhai wrote:
> From: Jefferson Zhai <jefferson@zhai.ca>
>
> ---
> tools/mesh-gatt/config-client.c | 16 +++++++++++-----
> 1 file changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/tools/mesh-gatt/config-client.c b/tools/mesh-gatt/config-client.c
> index 3ec42d94a..7bdd028d2 100644
> --- a/tools/mesh-gatt/config-client.c
> +++ b/tools/mesh-gatt/config-client.c
> @@ -972,7 +972,7 @@ static void cmd_sub_add(int argc, char *argv[])
> n = mesh_opcode_set(OP_CONFIG_MODEL_SUB_ADD, msg);
>
> parm_cnt = read_input_parameters(argc, argv);
> - if (parm_cnt != 3) {
> + if (parm_cnt != 3 && parm_cnt != 4) {
> bt_shell_printf("Bad arguments: %s\n", argv[1]);
> return bt_shell_noninteractive_quit(EXIT_FAILURE);
> }
> @@ -984,9 +984,15 @@ static void cmd_sub_add(int argc, char *argv[])
> /* Subscription Address */
> put_le16(parms[1], msg + n);
> n += 2;
> - /* SIG Model ID */
> - put_le16(parms[2], msg + n);
> - n += 2;
> + /* Model ID */
> + if (parm_cnt == 4) {
> + put_le16(parms[3], msg + n);
> + put_le16(parms[2], msg + n + 2);
> + n += 4;
> + } else {
> + put_le16(parms[2], msg + n);
> + n += 2;
> + }
>
> if (!config_send(msg, n)) {
> bt_shell_printf("Failed to send \"ADD SUBSCRIPTION\"\n");
> @@ -1222,7 +1228,7 @@ static const struct bt_shell_menu cfg_menu = {
> cmd_hb_sub_set, "Set heartbeat subscribe"},
> {"hb-sub-get", NULL, cmd_hb_sub_get,
> "Get heartbeat subscribe"},
> - {"sub-add", "<ele_addr> <sub_addr> <model id>",
> + {"sub-add", "<ele_addr> <sub_addr> <mod id> [cid]",
> cmd_sub_add, "Add subscription"},
> {"sub-get", "<ele_addr> <model id>",
> cmd_sub_get, "Get subscription"},
prev parent reply other threads:[~2021-11-11 0:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-05 16:57 [PATCH BlueZ 0/1] *** Meshctl "sub-add" command oversight fix *** Jefferson Zhai
2021-11-05 16:57 ` [PATCH BlueZ 1/1] FIX: Fixed oversight of not supporting vendor model in Meshctl tool's sub-add command Jefferson Zhai
2021-11-05 17:14 ` *** Meshctl "sub-add" command oversight fix *** bluez.test.bot
2021-11-10 18:40 ` bluez.test.bot
2021-11-11 0:51 ` Gix, Brian [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=441371f1561e4504880850db796e59de9a28bf62.camel@intel.com \
--to=brian.gix@intel.com \
--cc=goodgame13241324@gmail.com \
--cc=jefferson@zhai.ca \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox