* [PATCH BlueZ 0/1] *** Meshctl "sub-add" command oversight fix ***
@ 2021-11-05 16:57 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
0 siblings, 1 reply; 5+ messages in thread
From: Jefferson Zhai @ 2021-11-05 16:57 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Jefferson Zhai
From: Jefferson Zhai <jefferson@zhai.ca>
What motivated me to do this patch was that I noticed that the meshctl's
"sub-add" command in the config menu strangely did not support adding
subscriptions to vendor models, while all the other similar commands
like "pub-set" and "bind" all do support vendor model IDs. This patch
fixes this odd oversight.
Jefferson Zhai (1):
FIX: Fixed oversight of not supporting vendor model in Meshctl tool's
sub-add command
tools/mesh-gatt/config-client.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH BlueZ 1/1] FIX: Fixed oversight of not supporting vendor model in Meshctl tool's sub-add command
2021-11-05 16:57 [PATCH BlueZ 0/1] *** Meshctl "sub-add" command oversight fix *** Jefferson Zhai
@ 2021-11-05 16:57 ` Jefferson Zhai
2021-11-05 17:14 ` *** Meshctl "sub-add" command oversight fix *** bluez.test.bot
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Jefferson Zhai @ 2021-11-05 16:57 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Jefferson Zhai
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"},
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: *** Meshctl "sub-add" command oversight fix ***
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 ` bluez.test.bot
2021-11-10 18:40 ` bluez.test.bot
2021-11-11 0:51 ` [PATCH BlueZ 1/1] FIX: Fixed oversight of not supporting vendor model in Meshctl tool's sub-add command Gix, Brian
2 siblings, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2021-11-05 17:14 UTC (permalink / raw)
To: linux-bluetooth, goodgame13241324
[-- Attachment #1: Type: text/plain, Size: 1232 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=576179
---Test result---
Test Summary:
CheckPatch PASS 1.54 seconds
GitLint FAIL 1.01 seconds
Prep - Setup ELL PASS 42.84 seconds
Build - Prep PASS 0.50 seconds
Build - Configure PASS 8.04 seconds
Build - Make PASS 181.53 seconds
Make Check PASS 8.99 seconds
Make Distcheck PASS 216.82 seconds
Build w/ext ELL - Configure PASS 8.07 seconds
Build w/ext ELL - Make PASS 172.39 seconds
Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint with rule in .gitlint
Output:
[BlueZ,1/1] FIX: Fixed oversight of not supporting vendor model in Meshctl tool's sub-add command
1: T1 Title exceeds max length (97>80): "[BlueZ,1/1] FIX: Fixed oversight of not supporting vendor model in Meshctl tool's sub-add command"
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: *** Meshctl "sub-add" command oversight fix ***
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 ` [PATCH BlueZ 1/1] FIX: Fixed oversight of not supporting vendor model in Meshctl tool's sub-add command Gix, Brian
2 siblings, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2021-11-10 18:40 UTC (permalink / raw)
To: linux-bluetooth, goodgame13241324
[-- Attachment #1: Type: text/plain, Size: 1233 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=576179
---Test result---
Test Summary:
CheckPatch PASS 0.50 seconds
GitLint FAIL 0.32 seconds
Prep - Setup ELL PASS 53.92 seconds
Build - Prep PASS 0.26 seconds
Build - Configure PASS 10.35 seconds
Build - Make PASS 236.27 seconds
Make Check PASS 9.43 seconds
Make Distcheck PASS 278.09 seconds
Build w/ext ELL - Configure PASS 9.71 seconds
Build w/ext ELL - Make PASS 220.00 seconds
Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint with rule in .gitlint
Output:
[BlueZ,1/1] FIX: Fixed oversight of not supporting vendor model in Meshctl tool's sub-add command
1: T1 Title exceeds max length (97>80): "[BlueZ,1/1] FIX: Fixed oversight of not supporting vendor model in Meshctl tool's sub-add command"
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH BlueZ 1/1] FIX: Fixed oversight of not supporting vendor model in Meshctl tool's sub-add command
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
2 siblings, 0 replies; 5+ messages in thread
From: Gix, Brian @ 2021-11-11 0:51 UTC (permalink / raw)
To: goodgame13241324, linux-bluetooth; +Cc: jefferson
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"},
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-11-11 0:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH BlueZ 1/1] FIX: Fixed oversight of not supporting vendor model in Meshctl tool's sub-add command Gix, Brian
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.