All of lore.kernel.org
 help / color / mirror / Atom feed
* [BlueZ] monitor: Fix the incorrect vendor name
       [not found] <Tedd Ho-Jeong An <tedd.an@intel.com>
@ 2021-04-14  4:38 ` Tedd Ho-Jeong An
  2021-04-14  5:07   ` bluez.test.bot
  2021-04-14 10:08   ` Marcel Holtmann
  2021-04-15  1:48 ` [RFC BlueZ v2] " Tedd Ho-Jeong An
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 16+ messages in thread
From: Tedd Ho-Jeong An @ 2021-04-14  4:38 UTC (permalink / raw)
  To: linux-bluetooth, marcel

From: Tedd Ho-Jeong An <tedd.an@intel.com>

This patch fixes the vendor name is alwasy shown as "Microsoft" even
though a different vendor.

< HCI Command: Microsoft Secure Send (0x3f|0x0009) plen 249
        Type: Data fragment (0x01)
> HCI Event: Command Complete (0x0e) plen 4
      Microsoft Secure Send (0x3f|0x0009) ncmd 31
        Status: Success (0x00)
---
 monitor/packet.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/monitor/packet.c b/monitor/packet.c
index d729a01cc..91d2294ff 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -9325,18 +9325,12 @@ static const char *get_supported_command(int bit)
 
 static const char *current_vendor_str(void)
 {
-	uint16_t manufacturer, msft_opcode;
+	uint16_t manufacturer;
 
-	if (index_current < MAX_INDEX) {
+	if (index_current < MAX_INDEX)
 		manufacturer = index_list[index_current].manufacturer;
-		msft_opcode = index_list[index_current].msft_opcode;
-	} else {
+	else
 		manufacturer = fallback_manufacturer;
-		msft_opcode = BT_HCI_CMD_NOP;
-	}
-
-	if (msft_opcode != BT_HCI_CMD_NOP)
-		return "Microsoft";
 
 	switch (manufacturer) {
 	case 2:
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* RE: [BlueZ] monitor: Fix the incorrect vendor name
  2021-04-14  4:38 ` [BlueZ] monitor: Fix the incorrect vendor name Tedd Ho-Jeong An
@ 2021-04-14  5:07   ` bluez.test.bot
  2021-04-14 10:08   ` Marcel Holtmann
  1 sibling, 0 replies; 16+ messages in thread
From: bluez.test.bot @ 2021-04-14  5:07 UTC (permalink / raw)
  To: linux-bluetooth, hj.tedd.an

[-- Attachment #1: Type: text/plain, Size: 2296 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=466779

---Test result---

Test Summary:
CheckPatch                    PASS      0.39 seconds
GitLint                       PASS      0.10 seconds
Prep - Setup ELL              PASS      44.99 seconds
Build - Prep                  PASS      0.10 seconds
Build - Configure             PASS      7.84 seconds
Build - Make                  PASS      187.18 seconds
Make Check                    PASS      9.45 seconds
Make Dist                     PASS      12.13 seconds
Make Dist - Configure         PASS      4.91 seconds
Make Dist - Make              PASS      79.26 seconds
Build w/ext ELL - Configure   PASS      7.94 seconds
Build w/ext ELL - Make        PASS      181.20 seconds

Details
##############################
Test: CheckPatch - PASS
Desc: Run checkpatch.pl script with rule in .checkpatch.conf

##############################
Test: GitLint - PASS
Desc: Run gitlint with rule in .gitlint

##############################
Test: Prep - Setup ELL - PASS
Desc: Clone, build, and install ELL

##############################
Test: Build - Prep - PASS
Desc: Prepare environment for build

##############################
Test: Build - Configure - PASS
Desc: Configure the BlueZ source tree

##############################
Test: Build - Make - PASS
Desc: Build the BlueZ source tree

##############################
Test: Make Check - PASS
Desc: Run 'make check'

##############################
Test: Make Dist - PASS
Desc: Run 'make dist' and build the distribution tarball

##############################
Test: Make Dist - Configure - PASS
Desc: Configure the source from distribution tarball

##############################
Test: Make Dist - Make - PASS
Desc: Build the source from distribution tarball

##############################
Test: Build w/ext ELL - Configure - PASS
Desc: Configure BlueZ source with '--enable-external-ell' configuration

##############################
Test: Build w/ext ELL - Make - PASS
Desc: Build BlueZ source with '--enable-external-ell' configuration



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [BlueZ] monitor: Fix the incorrect vendor name
  2021-04-14  4:38 ` [BlueZ] monitor: Fix the incorrect vendor name Tedd Ho-Jeong An
  2021-04-14  5:07   ` bluez.test.bot
@ 2021-04-14 10:08   ` Marcel Holtmann
  2021-04-15  2:25     ` An, Tedd
  1 sibling, 1 reply; 16+ messages in thread
From: Marcel Holtmann @ 2021-04-14 10:08 UTC (permalink / raw)
  To: Tedd Ho-Jeong An; +Cc: linux-bluetooth

Hi Tedd,

> This patch fixes the vendor name is alwasy shown as "Microsoft" even
> though a different vendor.
> 
> < HCI Command: Microsoft Secure Send (0x3f|0x0009) plen 249
>        Type: Data fragment (0x01)
>> HCI Event: Command Complete (0x0e) plen 4
>      Microsoft Secure Send (0x3f|0x0009) ncmd 31
>        Status: Success (0x00)
> ---
> monitor/packet.c | 12 +++---------
> 1 file changed, 3 insertions(+), 9 deletions(-)
> 
> diff --git a/monitor/packet.c b/monitor/packet.c
> index d729a01cc..91d2294ff 100644
> --- a/monitor/packet.c
> +++ b/monitor/packet.c
> @@ -9325,18 +9325,12 @@ static const char *get_supported_command(int bit)
> 
> static const char *current_vendor_str(void)
> {
> -	uint16_t manufacturer, msft_opcode;
> +	uint16_t manufacturer;
> 
> -	if (index_current < MAX_INDEX) {
> +	if (index_current < MAX_INDEX)
> 		manufacturer = index_list[index_current].manufacturer;
> -		msft_opcode = index_list[index_current].msft_opcode;
> -	} else {
> +	else
> 		manufacturer = fallback_manufacturer;
> -		msft_opcode = BT_HCI_CMD_NOP;
> -	}
> -
> -	if (msft_opcode != BT_HCI_CMD_NOP)
> -		return "Microsoft";

seems we have a bug here, but the fix can not be correct either. If we are running on Intel firmware and the Microsoft extension is used, it should show Microsoft and not Intel for the vendor commands.

Regards

Marcel


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [RFC BlueZ v2] monitor: Fix the incorrect vendor name
       [not found] <Tedd Ho-Jeong An <tedd.an@intel.com>
  2021-04-14  4:38 ` [BlueZ] monitor: Fix the incorrect vendor name Tedd Ho-Jeong An
@ 2021-04-15  1:48 ` Tedd Ho-Jeong An
  2021-04-15  2:35   ` [RFC,BlueZ,v2] " bluez.test.bot
  2021-04-16  5:56 ` [BlueZ PATCH] monitor: Update manpage Tedd Ho-Jeong An
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 16+ messages in thread
From: Tedd Ho-Jeong An @ 2021-04-15  1:48 UTC (permalink / raw)
  To: linux-bluetooth, marcel

From: Tedd Ho-Jeong An <tedd.an@intel.com>

This patch fixes the vendor name is alwasy shown as "Microsoft".

< HCI Command: Microsoft Secure Send (0x3f|0x0009) plen 249
        Type: Data fragment (0x01)
> HCI Event: Command Complete (0x0e) plen 4
      Microsoft Secure Send (0x3f|0x0009) ncmd 31
        Status: Success (0x00)
---
 monitor/packet.c | 56 +++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 44 insertions(+), 12 deletions(-)

diff --git a/monitor/packet.c b/monitor/packet.c
index d729a01cc..30ed9944c 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -266,6 +266,7 @@ struct index_data {
 	uint8_t  bdaddr[6];
 	uint16_t manufacturer;
 	uint16_t msft_opcode;
+	uint8_t  msft_evt_code;
 	size_t   frame;
 };
 
@@ -3940,6 +3941,7 @@ void packet_monitor(struct timeval *tv, struct ucred *cred,
 			memcpy(index_list[index].bdaddr, ni->bdaddr, 6);
 			index_list[index].manufacturer = fallback_manufacturer;
 			index_list[index].msft_opcode = BT_HCI_CMD_NOP;
+			index_list[index].msft_evt_code = 0x00;
 		}
 
 		addr2str(ni->bdaddr, str);
@@ -4006,9 +4008,11 @@ void packet_monitor(struct timeval *tv, struct ucred *cred,
 				/*
 				 * Intel controllers that support the
 				 * Microsoft vendor extension are using
-				 * 0xFC1E for VsMsftOpCode.
+				 * 0xFC1E for VsMsftOpCode and 0x50 for event
+				 * code.
 				 */
 				index_list[index].msft_opcode = 0xFC1E;
+				index_list[index].msft_evt_code = 0x50;
 				break;
 			case 93:
 				/*
@@ -9323,7 +9327,7 @@ static const char *get_supported_command(int bit)
 	return NULL;
 }
 
-static const char *current_vendor_str(void)
+static const char *current_vendor_str(uint16_t ocf)
 {
 	uint16_t manufacturer, msft_opcode;
 
@@ -9335,7 +9339,35 @@ static const char *current_vendor_str(void)
 		msft_opcode = BT_HCI_CMD_NOP;
 	}
 
-	if (msft_opcode != BT_HCI_CMD_NOP)
+	if (msft_opcode != BT_HCI_CMD_NOP &&
+				cmd_opcode_ocf(msft_opcode) == ocf)
+		return "Microsoft";
+
+	switch (manufacturer) {
+	case 2:
+		return "Intel";
+	case 15:
+		return "Broadcom";
+	case 93:
+		return "Realtek";
+	}
+
+	return NULL;
+}
+
+static const char *current_vendor_evt_str(uint8_t evt)
+{
+	uint16_t manufacturer, msft_evt_code;
+
+	if (index_current < MAX_INDEX) {
+		manufacturer = index_list[index_current].manufacturer;
+		msft_evt_code = index_list[index_current].msft_evt_code;
+	} else {
+		manufacturer = fallback_manufacturer;
+		msft_evt_code = 0x00;
+	}
+
+	if (msft_evt_code == evt)
 		return "Microsoft";
 
 	switch (manufacturer) {
@@ -9378,18 +9410,18 @@ static const struct vendor_ocf *current_vendor_ocf(uint16_t ocf)
 
 static const struct vendor_evt *current_vendor_evt(uint8_t evt)
 {
-	uint16_t manufacturer, msft_opcode;
+	uint16_t manufacturer, msft_evt_code;
 
 	if (index_current < MAX_INDEX) {
 		manufacturer = index_list[index_current].manufacturer;
-		msft_opcode = index_list[index_current].msft_opcode;
+		msft_evt_code = index_list[index_current].msft_evt_code;
 	} else {
 		manufacturer = fallback_manufacturer;
-		msft_opcode = BT_HCI_CMD_NOP;
+		msft_evt_code = 0x00;
 	}
 
-	if (msft_opcode != BT_HCI_CMD_NOP)
-		return NULL;
+	if (msft_evt_code == evt)
+		return msft_vendor_evt();
 
 	switch (manufacturer) {
 	case 2:
@@ -9573,7 +9605,7 @@ static void cmd_complete_evt(const void *data, uint8_t size)
 			const struct vendor_ocf *vnd = current_vendor_ocf(ocf);
 
 			if (vnd) {
-				const char *str = current_vendor_str();
+				const char *str = current_vendor_str(ocf);
 
 				if (str) {
 					snprintf(vendor_str, sizeof(vendor_str),
@@ -9665,7 +9697,7 @@ static void cmd_status_evt(const void *data, uint8_t size)
 			const struct vendor_ocf *vnd = current_vendor_ocf(ocf);
 
 			if (vnd) {
-				const char *str = current_vendor_str();
+				const char *str = current_vendor_str(ocf);
 
 				if (str) {
 					snprintf(vendor_str, sizeof(vendor_str),
@@ -11018,7 +11050,7 @@ static void vendor_evt(const void *data, uint8_t size)
 	const struct vendor_evt *vnd = current_vendor_evt(subevent);
 
 	if (vnd) {
-		const char *str = current_vendor_str();
+		const char *str = current_vendor_evt_str(subevent);
 
 		if (str) {
 			snprintf(vendor_str, sizeof(vendor_str),
@@ -11419,7 +11451,7 @@ void packet_hci_command(struct timeval *tv, struct ucred *cred, uint16_t index,
 			const struct vendor_ocf *vnd = current_vendor_ocf(ocf);
 
 			if (vnd) {
-				const char *str = current_vendor_str();
+				const char *str = current_vendor_str(ocf);
 
 				if (str) {
 					snprintf(vendor_str, sizeof(vendor_str),
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [BlueZ] monitor: Fix the incorrect vendor name
  2021-04-14 10:08   ` Marcel Holtmann
@ 2021-04-15  2:25     ` An, Tedd
  2021-04-15  3:47       ` Archie Pusaka
  0 siblings, 1 reply; 16+ messages in thread
From: An, Tedd @ 2021-04-15  2:25 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth

Hi Marcel,

On 4/14/21, 3:09 AM, "Marcel Holtmann" <marcel@holtmann.org> wrote:

    Hi Tedd,

    > This patch fixes the vendor name is alwasy shown as "Microsoft" even
    > though a different vendor.
    > 
    > < HCI Command: Microsoft Secure Send (0x3f|0x0009) plen 249
    >        Type: Data fragment (0x01)
    >> HCI Event: Command Complete (0x0e) plen 4
    >      Microsoft Secure Send (0x3f|0x0009) ncmd 31
    >        Status: Success (0x00)
    > ---
    > monitor/packet.c | 12 +++---------
    > 1 file changed, 3 insertions(+), 9 deletions(-)
    > 
    > diff --git a/monitor/packet.c b/monitor/packet.c
    > index d729a01cc..91d2294ff 100644
    > --- a/monitor/packet.c
    > +++ b/monitor/packet.c
    > @@ -9325,18 +9325,12 @@ static const char *get_supported_command(int bit)
    > 
    > static const char *current_vendor_str(void)
    > {
    > -	uint16_t manufacturer, msft_opcode;
    > +	uint16_t manufacturer;
    > 
    > -	if (index_current < MAX_INDEX) {
    > +	if (index_current < MAX_INDEX)
    > 		manufacturer = index_list[index_current].manufacturer;
    > -		msft_opcode = index_list[index_current].msft_opcode;
    > -	} else {
    > +	else
    > 		manufacturer = fallback_manufacturer;
    > -		msft_opcode = BT_HCI_CMD_NOP;
    > -	}
    > -
    > -	if (msft_opcode != BT_HCI_CMD_NOP)
    > -		return "Microsoft";

    seems we have a bug here, but the fix can not be correct either. If we are running on Intel firmware and the Microsoft extension is used, it should show Microsoft and not Intel for the vendor commands.

I submitted v2 and I think I took care of the msft_opcode handling but I realized that the msft_event_opcode is also like msft_opcode - each vendor will have a different value.
I know the msft_event_code for Intel, which is 0x50, but don't know for Realtek. (Do you happen to know?)

I changed the v2 to RFC for your further comments.

    Regards

    Marcel

Regards,
Tedd


^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: [RFC,BlueZ,v2] monitor: Fix the incorrect vendor name
  2021-04-15  1:48 ` [RFC BlueZ v2] " Tedd Ho-Jeong An
@ 2021-04-15  2:35   ` bluez.test.bot
  0 siblings, 0 replies; 16+ messages in thread
From: bluez.test.bot @ 2021-04-15  2:35 UTC (permalink / raw)
  To: linux-bluetooth, hj.tedd.an

[-- Attachment #1: Type: text/plain, Size: 2296 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=467397

---Test result---

Test Summary:
CheckPatch                    PASS      0.36 seconds
GitLint                       PASS      0.12 seconds
Prep - Setup ELL              PASS      48.80 seconds
Build - Prep                  PASS      0.12 seconds
Build - Configure             PASS      8.55 seconds
Build - Make                  PASS      204.79 seconds
Make Check                    PASS      9.22 seconds
Make Dist                     PASS      12.94 seconds
Make Dist - Configure         PASS      5.25 seconds
Make Dist - Make              PASS      84.41 seconds
Build w/ext ELL - Configure   PASS      8.55 seconds
Build w/ext ELL - Make        PASS      196.08 seconds

Details
##############################
Test: CheckPatch - PASS
Desc: Run checkpatch.pl script with rule in .checkpatch.conf

##############################
Test: GitLint - PASS
Desc: Run gitlint with rule in .gitlint

##############################
Test: Prep - Setup ELL - PASS
Desc: Clone, build, and install ELL

##############################
Test: Build - Prep - PASS
Desc: Prepare environment for build

##############################
Test: Build - Configure - PASS
Desc: Configure the BlueZ source tree

##############################
Test: Build - Make - PASS
Desc: Build the BlueZ source tree

##############################
Test: Make Check - PASS
Desc: Run 'make check'

##############################
Test: Make Dist - PASS
Desc: Run 'make dist' and build the distribution tarball

##############################
Test: Make Dist - Configure - PASS
Desc: Configure the source from distribution tarball

##############################
Test: Make Dist - Make - PASS
Desc: Build the source from distribution tarball

##############################
Test: Build w/ext ELL - Configure - PASS
Desc: Configure BlueZ source with '--enable-external-ell' configuration

##############################
Test: Build w/ext ELL - Make - PASS
Desc: Build BlueZ source with '--enable-external-ell' configuration



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [BlueZ] monitor: Fix the incorrect vendor name
  2021-04-15  2:25     ` An, Tedd
@ 2021-04-15  3:47       ` Archie Pusaka
  2021-04-15  4:34         ` Tedd Ho-Jeong An
  2021-04-16  5:23         ` Marcel Holtmann
  0 siblings, 2 replies; 16+ messages in thread
From: Archie Pusaka @ 2021-04-15  3:47 UTC (permalink / raw)
  To: An, Tedd; +Cc: Marcel Holtmann, linux-bluetooth

Hi Tedd,

On Thu, 15 Apr 2021 at 10:26, An, Tedd <tedd.an@intel.com> wrote:
>
> Hi Marcel,
>
> On 4/14/21, 3:09 AM, "Marcel Holtmann" <marcel@holtmann.org> wrote:
>
>     Hi Tedd,
>
>     > This patch fixes the vendor name is alwasy shown as "Microsoft" even
>     > though a different vendor.
>     >
>     > < HCI Command: Microsoft Secure Send (0x3f|0x0009) plen 249
>     >        Type: Data fragment (0x01)
>     >> HCI Event: Command Complete (0x0e) plen 4
>     >      Microsoft Secure Send (0x3f|0x0009) ncmd 31
>     >        Status: Success (0x00)
>     > ---
>     > monitor/packet.c | 12 +++---------
>     > 1 file changed, 3 insertions(+), 9 deletions(-)
>     >
>     > diff --git a/monitor/packet.c b/monitor/packet.c
>     > index d729a01cc..91d2294ff 100644
>     > --- a/monitor/packet.c
>     > +++ b/monitor/packet.c
>     > @@ -9325,18 +9325,12 @@ static const char *get_supported_command(int bit)
>     >
>     > static const char *current_vendor_str(void)
>     > {
>     > - uint16_t manufacturer, msft_opcode;
>     > + uint16_t manufacturer;
>     >
>     > - if (index_current < MAX_INDEX) {
>     > + if (index_current < MAX_INDEX)
>     >           manufacturer = index_list[index_current].manufacturer;
>     > -         msft_opcode = index_list[index_current].msft_opcode;
>     > - } else {
>     > + else
>     >           manufacturer = fallback_manufacturer;
>     > -         msft_opcode = BT_HCI_CMD_NOP;
>     > - }
>     > -
>     > - if (msft_opcode != BT_HCI_CMD_NOP)
>     > -         return "Microsoft";
>
>     seems we have a bug here, but the fix can not be correct either. If we are running on Intel firmware and the Microsoft extension is used, it should show Microsoft and not Intel for the vendor commands.
>
> I submitted v2 and I think I took care of the msft_opcode handling but I realized that the msft_event_opcode is also like msft_opcode - each vendor will have a different value.
> I know the msft_event_code for Intel, which is 0x50, but don't know for Realtek. (Do you happen to know?)

On my Realtek device the msft_event_code is 8 bytes long: 0x23 0x79
0x54 0x33 0x77 0x88 0x97 0x68.

localhost ~ # hcitool cmd 0x3f 0xf0 0x00
< HCI Command: ogf 0x3f, ocf 0x00f0, plen 1
  00
> HCI Event: 0x0e plen 22
  02 F0 FC 00 00 3F 00 00 00 00 00 00 00 08 23 79 54 33 77 88
  97 68

> I changed the v2 to RFC for your further comments.
>
>     Regards
>
>     Marcel
>
> Regards,
> Tedd
>

Cheers,
Archie

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [BlueZ] monitor: Fix the incorrect vendor name
  2021-04-15  3:47       ` Archie Pusaka
@ 2021-04-15  4:34         ` Tedd Ho-Jeong An
  2021-04-16  5:23         ` Marcel Holtmann
  1 sibling, 0 replies; 16+ messages in thread
From: Tedd Ho-Jeong An @ 2021-04-15  4:34 UTC (permalink / raw)
  To: Archie Pusaka, An, Tedd; +Cc: Marcel Holtmann, linux-bluetooth

Hi Archie,

On Thu, 2021-04-15 at 11:47 +0800, Archie Pusaka wrote:
> Hi Tedd,
> 
> On Thu, 15 Apr 2021 at 10:26, An, Tedd <tedd.an@intel.com> wrote:
> > Hi Marcel,
> > 
> > On 4/14/21, 3:09 AM, "Marcel Holtmann" <marcel@holtmann.org> wrote:
> > 
> >     Hi Tedd,
> > 
> >     > This patch fixes the vendor name is alwasy shown as "Microsoft" even
> >     > though a different vendor.
> >     >
> >     > < HCI Command: Microsoft Secure Send (0x3f|0x0009) plen 249
> >     >        Type: Data fragment (0x01)
> >     >> HCI Event: Command Complete (0x0e) plen 4
> >     >      Microsoft Secure Send (0x3f|0x0009) ncmd 31
> >     >        Status: Success (0x00)
> >     > ---
> >     > monitor/packet.c | 12 +++---------
> >     > 1 file changed, 3 insertions(+), 9 deletions(-)
> >     >
> >     > diff --git a/monitor/packet.c b/monitor/packet.c
> >     > index d729a01cc..91d2294ff 100644
> >     > --- a/monitor/packet.c
> >     > +++ b/monitor/packet.c
> >     > @@ -9325,18 +9325,12 @@ static const char *get_supported_command(int
> > bit)
> >     >
> >     > static const char *current_vendor_str(void)
> >     > {
> >     > - uint16_t manufacturer, msft_opcode;
> >     > + uint16_t manufacturer;
> >     >
> >     > - if (index_current < MAX_INDEX) {
> >     > + if (index_current < MAX_INDEX)
> >     >           manufacturer = index_list[index_current].manufacturer;
> >     > -         msft_opcode = index_list[index_current].msft_opcode;
> >     > - } else {
> >     > + else
> >     >           manufacturer = fallback_manufacturer;
> >     > -         msft_opcode = BT_HCI_CMD_NOP;
> >     > - }
> >     > -
> >     > - if (msft_opcode != BT_HCI_CMD_NOP)
> >     > -         return "Microsoft";
> > 
> >     seems we have a bug here, but the fix can not be correct either. If we
> > are running on Intel firmware and the Microsoft extension is used, it should
> > show Microsoft and not Intel for the vendor commands.
> > 
> > I submitted v2 and I think I took care of the msft_opcode handling but I
> > realized that the msft_event_opcode is also like msft_opcode - each vendor
> > will have a different value.
> > I know the msft_event_code for Intel, which is 0x50, but don't know for
> > Realtek. (Do you happen to know?)
> 
> On my Realtek device the msft_event_code is 8 bytes long: 0x23 0x79
> 0x54 0x33 0x77 0x88 0x97 0x68.
> 
> localhost ~ # hcitool cmd 0x3f 0xf0 0x00
> < HCI Command: ogf 0x3f, ocf 0x00f0, plen 1
>   00
> > HCI Event: 0x0e plen 22
>   02 F0 FC 00 00 3F 00 00 00 00 00 00 00 08 23 79 54 33 77 88
>   97 68
> 

Thanks for the info.
I am going to change the pat to support "variable" length of msft_event_code.

> > I changed the v2 to RFC for your further comments.
> > 
> >     Regards
> > 
> >     Marcel
> > 
> > Regards,
> > Tedd
> > 
> 
> Cheers,
> Archie


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [BlueZ] monitor: Fix the incorrect vendor name
  2021-04-15  3:47       ` Archie Pusaka
  2021-04-15  4:34         ` Tedd Ho-Jeong An
@ 2021-04-16  5:23         ` Marcel Holtmann
  1 sibling, 0 replies; 16+ messages in thread
From: Marcel Holtmann @ 2021-04-16  5:23 UTC (permalink / raw)
  To: Archie Pusaka; +Cc: An, Tedd, linux-bluetooth

Hi Archie,

>>> This patch fixes the vendor name is alwasy shown as "Microsoft" even
>>> though a different vendor.
>>> 
>>> < HCI Command: Microsoft Secure Send (0x3f|0x0009) plen 249
>>>       Type: Data fragment (0x01)
>>>> HCI Event: Command Complete (0x0e) plen 4
>>>     Microsoft Secure Send (0x3f|0x0009) ncmd 31
>>>       Status: Success (0x00)
>>> ---
>>> monitor/packet.c | 12 +++---------
>>> 1 file changed, 3 insertions(+), 9 deletions(-)
>>> 
>>> diff --git a/monitor/packet.c b/monitor/packet.c
>>> index d729a01cc..91d2294ff 100644
>>> --- a/monitor/packet.c
>>> +++ b/monitor/packet.c
>>> @@ -9325,18 +9325,12 @@ static const char *get_supported_command(int bit)
>>> 
>>> static const char *current_vendor_str(void)
>>> {
>>> - uint16_t manufacturer, msft_opcode;
>>> + uint16_t manufacturer;
>>> 
>>> - if (index_current < MAX_INDEX) {
>>> + if (index_current < MAX_INDEX)
>>>          manufacturer = index_list[index_current].manufacturer;
>>> -         msft_opcode = index_list[index_current].msft_opcode;
>>> - } else {
>>> + else
>>>          manufacturer = fallback_manufacturer;
>>> -         msft_opcode = BT_HCI_CMD_NOP;
>>> - }
>>> -
>>> - if (msft_opcode != BT_HCI_CMD_NOP)
>>> -         return "Microsoft";
>> 
>>    seems we have a bug here, but the fix can not be correct either. If we are running on Intel firmware and the Microsoft extension is used, it should show Microsoft and not Intel for the vendor commands.
>> 
>> I submitted v2 and I think I took care of the msft_opcode handling but I realized that the msft_event_opcode is also like msft_opcode - each vendor will have a different value.
>> I know the msft_event_code for Intel, which is 0x50, but don't know for Realtek. (Do you happen to know?)
> 
> On my Realtek device the msft_event_code is 8 bytes long: 0x23 0x79
> 0x54 0x33 0x77 0x88 0x97 0x68.


I remember having seen different event prefixes for Realtek controllers. However after re-testing it seems to be the same.

My latest 5.1 dongle has this:

> HCI Event: Command Complete (0x0e) plen 22
      Microsoft Extension (0x3f|0x00f0) ncmd 2
      Read Supported Features (0x00)
        Status: Success (0x00)
        Features: 0x3f 0x00 0x00 0x00 0x00 0x00 0x00 0x00
          RSSI Monitoring feature for BR/EDR
          RSSI Monitoring feature for LE connections
          RSSI Monitoring of LE advertisements
          Advertising Monitoring of LE advertisements
          Verifying the validity of P-192 and P-256 keys
          Continuous Advertising Monitoring
        Event prefix length: 8
        23 79 54 33 77 88 97 68 

And my older 4.2 dongle has this:

> HCI Event: Command Complete (0x0e) plen 22
      Microsoft Extension (0x3f|0x00f0) ncmd 2
      Read Supported Features (0x00)
        Status: Success (0x00)
        Features: 0x0f 0x00 0x00 0x00 0x00 0x00 0x00 0x00
          RSSI Monitoring feature for BR/EDR
          RSSI Monitoring feature for LE connections
          RSSI Monitoring of LE advertisements
          Advertising Monitoring of LE advertisements
        Event prefix length: 8
        23 79 54 33 77 88 97 68

Regards

Marcel


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [BlueZ PATCH] monitor: Update manpage
       [not found] <Tedd Ho-Jeong An <tedd.an@intel.com>
  2021-04-14  4:38 ` [BlueZ] monitor: Fix the incorrect vendor name Tedd Ho-Jeong An
  2021-04-15  1:48 ` [RFC BlueZ v2] " Tedd Ho-Jeong An
@ 2021-04-16  5:56 ` Tedd Ho-Jeong An
  2021-04-16  6:43   ` [BlueZ] " bluez.test.bot
  2021-04-16 20:06 ` [BlueZ PATCH] monitor: Add Intel read supported VS features command Tedd Ho-Jeong An
  2021-04-17  0:34 ` [BlueZ v2] " Tedd Ho-Jeong An
  4 siblings, 1 reply; 16+ messages in thread
From: Tedd Ho-Jeong An @ 2021-04-16  5:56 UTC (permalink / raw)
  To: linux-bluetooth

From: Tedd Ho-Jeong An <tedd.an@intel.com>

This patch updates the manpage for btmon.
---
 Makefile.am     |  10 +---
 Makefile.tools  |   3 +
 doc/btmon.txt   |  35 -----------
 monitor/btmon.1 | 152 ++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 156 insertions(+), 44 deletions(-)
 delete mode 100644 doc/btmon.txt
 create mode 100644 monitor/btmon.1

diff --git a/Makefile.am b/Makefile.am
index f98243f72..625a7ce3d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -579,14 +579,6 @@ if LIBRARY
 pkgconfig_DATA = lib/bluez.pc
 endif
 
-manual_pages = doc/btmon.1
-
-if MANPAGES
-dist_noinst_MANS += $(manual_pages)
-endif
-
-EXTRA_DIST += $(manual_pages:.1=.txt)
-
 DISTCHECK_CONFIGURE_FLAGS = --disable-datafiles --enable-library \
 						--enable-health \
 						--enable-midi \
@@ -597,7 +589,7 @@ DISTCHECK_CONFIGURE_FLAGS = --disable-datafiles --enable-library \
 						--disable-systemd \
 						--disable-udev
 
-DISTCLEANFILES = $(pkgconfig_DATA) $(unit_tests) $(manual_pages)
+DISTCLEANFILES = $(pkgconfig_DATA) $(unit_tests)
 
 MAINTAINERCLEANFILES = Makefile.in \
 	aclocal.m4 configure config.h.in config.sub config.guess \
diff --git a/Makefile.tools b/Makefile.tools
index 57e858290..069f40ec8 100644
--- a/Makefile.tools
+++ b/Makefile.tools
@@ -49,6 +49,9 @@ monitor_btmon_SOURCES = monitor/main.c monitor/bt.h \
 				monitor/tty.h
 monitor_btmon_LDADD = lib/libbluetooth-internal.la \
 				src/libshared-mainloop.la $(UDEV_LIBS) -ldl
+dist_man_MANS += monitor/btmon.1
+else
+EXTRA_DIST += monitor/btmon.1
 endif
 
 if LOGGER
diff --git a/doc/btmon.txt b/doc/btmon.txt
deleted file mode 100644
index 7a7fc537b..000000000
--- a/doc/btmon.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-BTMON(1)
-========
-:doctype: manpage
-
-
-NAME
-----
-btmon - Bluetooth monitor
-
-
-SYNOPSIS
---------
-*btmon* ['OPTIONS']
-
-
-DESCRIPTION
------------
-The btmon(1) command provides access to the Bluetooth subsystem monitor
-infrastructure for reading HCI traces.
-
-
-AUTHOR
-------
-btmon was originally written by Marcel Holtmann.
-
-
-RESOURCES
----------
-See <http://www.bluez.org/>
-
-
-COPYING
--------
-Free use of this software is granted under ther terms of the GNU Lesser
-General Public Licenses (LGPL).
diff --git a/monitor/btmon.1 b/monitor/btmon.1
new file mode 100644
index 000000000..a9d8430c8
--- /dev/null
+++ b/monitor/btmon.1
@@ -0,0 +1,152 @@
+.\" Manpage for btmon
+.TH btmon 1 "April 2021" BlueZ "Linux System Administration"
+
+.SH NAME
+btmon - Bluetooth monitor
+
+.SH SYNOPSIS
+.B btmon
+.RI [ OPTIONS ]
+.SH DESCRIPTION
+The btmon(1) command provides access to the Bluetooth subsystem monitor
+infrastructure for reading HCI traces.
+.SH OPTIONS
+.TP
+.BR \-r , " \-\-read " \fIFILE\fR
+Read traces in btsnoop format.
+
+.TP
+.BR \-w , " \-\-write " \fIFILE\fR
+Save traces in btsnoop format.
+
+.TP
+.BR \-a , " \-\-analyze " \fIFILE\fR
+Analyze traces in btsnoop format. It displays the devices found in the
+\fIFILE\fR with its packets by type.
+
+.TP
+.BR \-s , " \-\-server " \fISOCKET\fR
+Start monitor server socket.
+
+.TP
+.BR \-p , " \-\-priority " \fIPRIORITY\fR
+Show only priority or lower for user log.
+.sp
+\fIPRIORITY\fR
+.IP
+.TS
+tab(:);
+l l.
+3:Error
+4:Warning
+6:Information (default)
+7:Debug. 'debug' can be to use.
+.TE
+
+.TP
+.BR \-i , " \-\-index " \fINUM\fR
+Show only specified controller. \fBhci\fINUM\fR is also acceptable.
+This is useful to capture the traces from the specific controller when the
+multiple controllers are presented.
+
+.TP
+.BR \-d , " \-\-tty " \fITTY\fR
+Read data from TTY.
+
+.TP
+.BR \-B , " \-\-rate " \fISPEED\fR
+Set TTY speed. The default \fISPEED\fR is 115300q
+
+.TP
+.BR \-V , " \-\-vendor " \fICOMPID\fR
+Set the default company identifier. The \fICOMPID\fR is a unique number
+assigned by the Bluetooth SIG to a member company and can be found/searched
+from the Bluetooth SIG webpage. For example, Intel is 2 and Realtek is 93.
+
+.TP
+.BR \-M ", " \-\-mgmt
+Open channel for mgmt events.
+
+.TP
+.BR \-t ", " \-\-time
+Show a time instead of time offset.
+
+.TP
+.BR \-T ", " \-\-date
+Show a time and date information instead of time offset.
+
+.TP
+.BR \-S ", " \-\-sco
+Dump SCO traffic in raw hex format.
+
+.TP
+.BR \-A ", " \-\-a2dp
+Dump A2DP stream traffic in a raw hex format.
+
+.TP
+.BR \-E , " \-\-ellisys " \fIIP\fR
+Send Ellisys HCI Injection.
+
+.TP
+.BR \-P ", " \-\-no\-pager
+Disable pager usage while reading the log file.
+
+.TP
+.BR \-J , " \-\-jlink " \fIDEVICE\fR,[\fISERIALNO\fR],[\fIINTERFACE\fR],[\fISPEED\fR]
+Read data from RTT
+
+.TP
+.BR \-R , " \-\-rtt " [\fIADDRESS\fR],[\fIAREA\fR],[\fINAME\fR]
+RTT control block parameters
+
+.TP
+.BR \-C , " \-\-columns " \fIWIDTH\fR
+Output width if not a terminal
+
+.TP
+.BR \-c , " \-\-color " \fIMODE\fR
+Set output color. The possible \fImode\fR values are:
+.sp
+\fIMODE\fR
+.IP
+.TS
+l.
+auto
+always
+never
+.TE
+
+.TP
+.BR \-v , " \-\-version
+Show version
+
+.TP
+.BR \-h , " \-\-help
+Show help options
+
+.SH EXAMPLES
+.TP
+.B Capture the traces from hci0 to hcidump.log file
+.IP
+$ btmon -i hci0 -w hcidump.log
+
+.TP
+.B Open the trace file
+.IP
+$ btmon -r hcidump.log
+
+.SH RESOURCES
+.TP
+<http://www.bluez.org/>
+
+.SH AUTHOR
+Written by Marcel Holtmann <marcel@holtmann.org>.
+.sp
+man page by Tedd Ho-Jeong An <tedd.an@intel.com>.
+
+.SH REPORTING BUGS
+linux-bluetooth@vger.kernel.org
+
+.SH COPYRIGHT
+Free use of this software is granted under ther terms of the GNU Lesser
+General Public Licenses (LGPL).
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* RE: [BlueZ] monitor: Update manpage
  2021-04-16  5:56 ` [BlueZ PATCH] monitor: Update manpage Tedd Ho-Jeong An
@ 2021-04-16  6:43   ` bluez.test.bot
  0 siblings, 0 replies; 16+ messages in thread
From: bluez.test.bot @ 2021-04-16  6:43 UTC (permalink / raw)
  To: linux-bluetooth, hj.tedd.an

[-- Attachment #1: Type: text/plain, Size: 2296 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=468265

---Test result---

Test Summary:
CheckPatch                    PASS      0.37 seconds
GitLint                       PASS      0.12 seconds
Prep - Setup ELL              PASS      46.72 seconds
Build - Prep                  PASS      0.11 seconds
Build - Configure             PASS      8.50 seconds
Build - Make                  PASS      193.28 seconds
Make Check                    PASS      9.69 seconds
Make Dist                     PASS      13.37 seconds
Make Dist - Configure         PASS      5.64 seconds
Make Dist - Make              PASS      81.35 seconds
Build w/ext ELL - Configure   PASS      8.48 seconds
Build w/ext ELL - Make        PASS      186.76 seconds

Details
##############################
Test: CheckPatch - PASS
Desc: Run checkpatch.pl script with rule in .checkpatch.conf

##############################
Test: GitLint - PASS
Desc: Run gitlint with rule in .gitlint

##############################
Test: Prep - Setup ELL - PASS
Desc: Clone, build, and install ELL

##############################
Test: Build - Prep - PASS
Desc: Prepare environment for build

##############################
Test: Build - Configure - PASS
Desc: Configure the BlueZ source tree

##############################
Test: Build - Make - PASS
Desc: Build the BlueZ source tree

##############################
Test: Make Check - PASS
Desc: Run 'make check'

##############################
Test: Make Dist - PASS
Desc: Run 'make dist' and build the distribution tarball

##############################
Test: Make Dist - Configure - PASS
Desc: Configure the source from distribution tarball

##############################
Test: Make Dist - Make - PASS
Desc: Build the source from distribution tarball

##############################
Test: Build w/ext ELL - Configure - PASS
Desc: Configure BlueZ source with '--enable-external-ell' configuration

##############################
Test: Build w/ext ELL - Make - PASS
Desc: Build BlueZ source with '--enable-external-ell' configuration



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [BlueZ PATCH] monitor: Add Intel read supported VS features command
       [not found] <Tedd Ho-Jeong An <tedd.an@intel.com>
                   ` (2 preceding siblings ...)
  2021-04-16  5:56 ` [BlueZ PATCH] monitor: Update manpage Tedd Ho-Jeong An
@ 2021-04-16 20:06 ` Tedd Ho-Jeong An
  2021-04-16 20:39   ` [BlueZ] " bluez.test.bot
  2021-04-17  0:34 ` [BlueZ v2] " Tedd Ho-Jeong An
  4 siblings, 1 reply; 16+ messages in thread
From: Tedd Ho-Jeong An @ 2021-04-16 20:06 UTC (permalink / raw)
  To: linux-bluetooth

From: Tedd Ho-Jeong An <tedd.an@intel.com>

< HCI Command: Intel Read Supported VS Features (0x3f|0x00a6) plen 1
        Page: 0x01
> HCI Event: Command Complete (0x0e) plen 22
      Intel Read Supported VS Features (0x3f|0x00a6) ncmd 1
        Status: Success (0x00)
        Page: 0x01
        Max Pages: 0x02
        Supported Features:
        1f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
---
 monitor/intel.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/monitor/intel.c b/monitor/intel.c
index 18840f3e7..1aee29cc8 100644
--- a/monitor/intel.c
+++ b/monitor/intel.c
@@ -471,6 +471,25 @@ static void memory_write_cmd(const void *data, uint8_t size)
 	packet_hexdump(data + 6, size - 6);
 }
 
+static void read_supported_vs_features_cmd(const void *data, uint8_t size)
+{
+	uint8_t page = get_u8(data);
+	print_field("Page: 0x%2.2x", page);
+}
+
+static void read_supported_vs_features_rsp(const void *data, uint8_t size)
+{
+	uint8_t status = get_u8(data);
+	uint8_t page = get_u8(data + 1);
+	uint8_t max_pages = get_u8(data + 2);
+
+	print_status(status);
+	print_field("Page: 0x%2.2x", page);
+	print_field("Max Pages: 0x%2.2x", max_pages);
+	print_field("Supported Features:");
+	packet_hexdump(data + 3, size - 3);
+}
+
 static const struct vendor_ocf vendor_ocf_table[] = {
 	{ 0x001, "Reset",
 			reset_cmd, 8, true,
@@ -533,6 +552,10 @@ static const struct vendor_ocf vendor_ocf_table[] = {
 	{ 0x08e, "Memory Write",
 			memory_write_cmd, 6, false,
 			status_rsp, 1, true },
+	{ 0x0a6, "Read Supported VS Features",
+			read_supported_vs_features_cmd, 1, true,
+			read_supported_vs_features_rsp, 19, true },
+
 	{ }
 };
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* RE: [BlueZ] monitor: Add Intel read supported VS features command
  2021-04-16 20:06 ` [BlueZ PATCH] monitor: Add Intel read supported VS features command Tedd Ho-Jeong An
@ 2021-04-16 20:39   ` bluez.test.bot
  0 siblings, 0 replies; 16+ messages in thread
From: bluez.test.bot @ 2021-04-16 20:39 UTC (permalink / raw)
  To: linux-bluetooth, hj.tedd.an

[-- Attachment #1: Type: text/plain, Size: 3091 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=468819

---Test result---

Test Summary:
CheckPatch                    FAIL      0.38 seconds
GitLint                       PASS      0.13 seconds
Prep - Setup ELL              PASS      48.88 seconds
Build - Prep                  PASS      0.15 seconds
Build - Configure             PASS      8.45 seconds
Build - Make                  PASS      205.84 seconds
Make Check                    PASS      9.07 seconds
Make Dist                     PASS      11.93 seconds
Make Dist - Configure         PASS      5.23 seconds
Make Dist - Make              PASS      83.00 seconds
Build w/ext ELL - Configure   PASS      8.24 seconds
Build w/ext ELL - Make        PASS      194.16 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script with rule in .checkpatch.conf
Output:
monitor: Add Intel read supported VS features command
WARNING:LINE_SPACING: Missing a blank line after declarations
#27: FILE: monitor/intel.c:477:
+	uint8_t page = get_u8(data);
+	print_field("Page: 0x%2.2x", page);

- total: 0 errors, 1 warnings, 35 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

"[PATCH] monitor: Add Intel read supported VS features command" has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.


##############################
Test: GitLint - PASS
Desc: Run gitlint with rule in .gitlint

##############################
Test: Prep - Setup ELL - PASS
Desc: Clone, build, and install ELL

##############################
Test: Build - Prep - PASS
Desc: Prepare environment for build

##############################
Test: Build - Configure - PASS
Desc: Configure the BlueZ source tree

##############################
Test: Build - Make - PASS
Desc: Build the BlueZ source tree

##############################
Test: Make Check - PASS
Desc: Run 'make check'

##############################
Test: Make Dist - PASS
Desc: Run 'make dist' and build the distribution tarball

##############################
Test: Make Dist - Configure - PASS
Desc: Configure the source from distribution tarball

##############################
Test: Make Dist - Make - PASS
Desc: Build the source from distribution tarball

##############################
Test: Build w/ext ELL - Configure - PASS
Desc: Configure BlueZ source with '--enable-external-ell' configuration

##############################
Test: Build w/ext ELL - Make - PASS
Desc: Build BlueZ source with '--enable-external-ell' configuration



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [BlueZ v2] monitor: Add Intel read supported VS features command
       [not found] <Tedd Ho-Jeong An <tedd.an@intel.com>
                   ` (3 preceding siblings ...)
  2021-04-16 20:06 ` [BlueZ PATCH] monitor: Add Intel read supported VS features command Tedd Ho-Jeong An
@ 2021-04-17  0:34 ` Tedd Ho-Jeong An
  2021-04-17  1:30   ` [BlueZ,v2] " bluez.test.bot
  2021-04-19 13:01   ` [BlueZ v2] " Marcel Holtmann
  4 siblings, 2 replies; 16+ messages in thread
From: Tedd Ho-Jeong An @ 2021-04-17  0:34 UTC (permalink / raw)
  To: linux-bluetooth

From: Tedd Ho-Jeong An <tedd.an@intel.com>

< HCI Command: Intel Read Supported VS Features (0x3f|0x00a6) plen 1
        Page: 0x01
> HCI Event: Command Complete (0x0e) plen 22
      Intel Read Supported VS Features (0x3f|0x00a6) ncmd 1
        Status: Success (0x00)
        Page: 0x01
        Max Pages: 0x02
        Supported Features:
        1f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
---
 monitor/intel.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/monitor/intel.c b/monitor/intel.c
index 18840f3e7..38ce23b99 100644
--- a/monitor/intel.c
+++ b/monitor/intel.c
@@ -471,6 +471,26 @@ static void memory_write_cmd(const void *data, uint8_t size)
 	packet_hexdump(data + 6, size - 6);
 }
 
+static void read_supported_vs_features_cmd(const void *data, uint8_t size)
+{
+	uint8_t page = get_u8(data);
+
+	print_field("Page: 0x%2.2x", page);
+}
+
+static void read_supported_vs_features_rsp(const void *data, uint8_t size)
+{
+	uint8_t status = get_u8(data);
+	uint8_t page = get_u8(data + 1);
+	uint8_t max_pages = get_u8(data + 2);
+
+	print_status(status);
+	print_field("Page: 0x%2.2x", page);
+	print_field("Max Pages: 0x%2.2x", max_pages);
+	print_field("Supported Features:");
+	packet_hexdump(data + 3, size - 3);
+}
+
 static const struct vendor_ocf vendor_ocf_table[] = {
 	{ 0x001, "Reset",
 			reset_cmd, 8, true,
@@ -533,6 +553,10 @@ static const struct vendor_ocf vendor_ocf_table[] = {
 	{ 0x08e, "Memory Write",
 			memory_write_cmd, 6, false,
 			status_rsp, 1, true },
+	{ 0x0a6, "Read Supported VS Features",
+			read_supported_vs_features_cmd, 1, true,
+			read_supported_vs_features_rsp, 19, true },
+
 	{ }
 };
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* RE: [BlueZ,v2] monitor: Add Intel read supported VS features command
  2021-04-17  0:34 ` [BlueZ v2] " Tedd Ho-Jeong An
@ 2021-04-17  1:30   ` bluez.test.bot
  2021-04-19 13:01   ` [BlueZ v2] " Marcel Holtmann
  1 sibling, 0 replies; 16+ messages in thread
From: bluez.test.bot @ 2021-04-17  1:30 UTC (permalink / raw)
  To: linux-bluetooth, hj.tedd.an

[-- Attachment #1: Type: text/plain, Size: 2296 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=468919

---Test result---

Test Summary:
CheckPatch                    PASS      0.37 seconds
GitLint                       PASS      0.12 seconds
Prep - Setup ELL              PASS      51.15 seconds
Build - Prep                  PASS      0.15 seconds
Build - Configure             PASS      8.88 seconds
Build - Make                  PASS      224.08 seconds
Make Check                    PASS      9.67 seconds
Make Dist                     PASS      13.41 seconds
Make Dist - Configure         PASS      5.66 seconds
Make Dist - Make              PASS      91.53 seconds
Build w/ext ELL - Configure   PASS      9.04 seconds
Build w/ext ELL - Make        PASS      208.59 seconds

Details
##############################
Test: CheckPatch - PASS
Desc: Run checkpatch.pl script with rule in .checkpatch.conf

##############################
Test: GitLint - PASS
Desc: Run gitlint with rule in .gitlint

##############################
Test: Prep - Setup ELL - PASS
Desc: Clone, build, and install ELL

##############################
Test: Build - Prep - PASS
Desc: Prepare environment for build

##############################
Test: Build - Configure - PASS
Desc: Configure the BlueZ source tree

##############################
Test: Build - Make - PASS
Desc: Build the BlueZ source tree

##############################
Test: Make Check - PASS
Desc: Run 'make check'

##############################
Test: Make Dist - PASS
Desc: Run 'make dist' and build the distribution tarball

##############################
Test: Make Dist - Configure - PASS
Desc: Configure the source from distribution tarball

##############################
Test: Make Dist - Make - PASS
Desc: Build the source from distribution tarball

##############################
Test: Build w/ext ELL - Configure - PASS
Desc: Configure BlueZ source with '--enable-external-ell' configuration

##############################
Test: Build w/ext ELL - Make - PASS
Desc: Build BlueZ source with '--enable-external-ell' configuration



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [BlueZ v2] monitor: Add Intel read supported VS features command
  2021-04-17  0:34 ` [BlueZ v2] " Tedd Ho-Jeong An
  2021-04-17  1:30   ` [BlueZ,v2] " bluez.test.bot
@ 2021-04-19 13:01   ` Marcel Holtmann
  1 sibling, 0 replies; 16+ messages in thread
From: Marcel Holtmann @ 2021-04-19 13:01 UTC (permalink / raw)
  To: Tedd Ho-Jeong An; +Cc: linux-bluetooth

Hi Tedd,

> < HCI Command: Intel Read Supported VS Features (0x3f|0x00a6) plen 1
>        Page: 0x01
>> HCI Event: Command Complete (0x0e) plen 22
>      Intel Read Supported VS Features (0x3f|0x00a6) ncmd 1
>        Status: Success (0x00)
>        Page: 0x01
>        Max Pages: 0x02
>        Supported Features:
>        1f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................

scrap the VS part of the name. I never used it since we prefix them with “Intel“ anyway.

Regards

Marcel


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-04-19 13:02 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <Tedd Ho-Jeong An <tedd.an@intel.com>
2021-04-14  4:38 ` [BlueZ] monitor: Fix the incorrect vendor name Tedd Ho-Jeong An
2021-04-14  5:07   ` bluez.test.bot
2021-04-14 10:08   ` Marcel Holtmann
2021-04-15  2:25     ` An, Tedd
2021-04-15  3:47       ` Archie Pusaka
2021-04-15  4:34         ` Tedd Ho-Jeong An
2021-04-16  5:23         ` Marcel Holtmann
2021-04-15  1:48 ` [RFC BlueZ v2] " Tedd Ho-Jeong An
2021-04-15  2:35   ` [RFC,BlueZ,v2] " bluez.test.bot
2021-04-16  5:56 ` [BlueZ PATCH] monitor: Update manpage Tedd Ho-Jeong An
2021-04-16  6:43   ` [BlueZ] " bluez.test.bot
2021-04-16 20:06 ` [BlueZ PATCH] monitor: Add Intel read supported VS features command Tedd Ho-Jeong An
2021-04-16 20:39   ` [BlueZ] " bluez.test.bot
2021-04-17  0:34 ` [BlueZ v2] " Tedd Ho-Jeong An
2021-04-17  1:30   ` [BlueZ,v2] " bluez.test.bot
2021-04-19 13:01   ` [BlueZ v2] " Marcel Holtmann

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.