2023-07-29 00:54:03

by Łukasz Rymanowski

[permalink] [raw]
Subject: [PATCH BlueZ 0/5] Couple of improvements to btmon


Szymon Czapracki (1):
monitor/ll: Add support for connection parameter command.

Łukasz Rymanowski (4):
monitor: Fix decoding Command Complete for Remove ISO Data path
monitor: Update le event mask with bits 20-23
monitor: Add support to decode le read ISO link quality
monitor: Add parsing Service Data of UUID 128

monitor/bt.h | 51 +++++++++++++++++++++++++++++++++++++++
monitor/ll.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++--
monitor/packet.c | 58 +++++++++++++++++++++++++++++++++++++++++++-
3 files changed, 168 insertions(+), 3 deletions(-)

--
2.34.1



2023-07-29 00:54:21

by Łukasz Rymanowski

[permalink] [raw]
Subject: [PATCH BlueZ 1/5] monitor: Fix decoding Command Complete for Remove ISO Data path

Before

< HCI Command: LE Remove Isochronous Data Path (0x08|0x006f) plen 3 #1061 139.246292
Connection Handle: 96
Data Path Direction: Output (Controller to Host) (0x01)
> HCI Event: Command Complete (0x0e) plen 6 #1062 139.246954
LE Remove Isochronous Data Path (0x08|0x006f) ncmd 1
invalid packet size
00 60 00

After patch

< HCI Command: LE Remove Isochronous Data Path (0x08|0x006f) plen 3 #1061 139.246292
Connection Handle: 96
Data Path Direction: 0x01
Input (Host to Controller)
> HCI Event: Command Complete (0x0e) plen 6 #1062 139.246954
LE Remove Isochronous Data Path (0x08|0x006f) ncmd 1
Status: Success (0x00)
Connection handle: 96
---
monitor/bt.h | 5 +++++
monitor/packet.c | 4 +++-
2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/monitor/bt.h b/monitor/bt.h
index b60263fa0..fcc5478bf 100644
--- a/monitor/bt.h
+++ b/monitor/bt.h
@@ -2862,6 +2862,11 @@ struct bt_hci_cmd_le_remove_iso_path {
uint8_t direction;
} __attribute__ ((packed));

+struct bt_hci_rsp_le_remove_iso_path {
+ uint8_t status;
+ uint16_t handle;
+} __attribute__ ((packed));
+
#define BT_HCI_CMD_LE_ISO_TX_TEST 0x2070
#define BT_HCI_BIT_LE_ISO_TX_TEST BT_HCI_CMD_BIT(43, 5)

diff --git a/monitor/packet.c b/monitor/packet.c
index f581a8e72..c7c0308db 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -9871,7 +9871,9 @@ static const struct opcode_data opcode_table[] = {
"LE Remove Isochronous Data Path",
le_remove_iso_path_cmd,
sizeof(struct bt_hci_cmd_le_remove_iso_path),
- true, status_rsp, 1, true },
+ true, status_handle_rsp,
+ sizeof(struct bt_hci_rsp_le_remove_iso_path),
+ true },
{ BT_HCI_CMD_LE_ISO_TX_TEST, BT_HCI_BIT_LE_ISO_TX_TEST,
"LE Isochronous Transmit Test", NULL, 0,
false },
--
2.34.1


2023-07-29 00:56:14

by Łukasz Rymanowski

[permalink] [raw]
Subject: [PATCH BlueZ 2/5] monitor: Update le event mask with bits 20-23

---
monitor/packet.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/monitor/packet.c b/monitor/packet.c
index c7c0308db..fd8df7a8b 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -3087,6 +3087,10 @@ static const struct bitfield_data events_le_table[] = {
{ 17, "LE Extended Advertising Set Terminated" },
{ 18, "LE Scan Request Received" },
{ 19, "LE Channel Selection Algorithm" },
+ { 20, "LE Connectionless IQ Report" },
+ { 21, "LE Connection IQ Report" },
+ { 22, "LE CTE Request Failed" },
+ { 23, "LE Periodic Advertising Sync Transfer Rvc"},
{ 24, "LE CIS Established" },
{ 25, "LE CIS Request" },
{ 26, "LE Create BIG Complete" },
--
2.34.1


2023-07-29 01:17:20

by Łukasz Rymanowski

[permalink] [raw]
Subject: [PATCH BlueZ 4/5] monitor: Add support to decode le read ISO link quality

btmon: Add parsing LE Read ISO link quality

> HCI Event: Command Complete (0x0e) plen 34 #14 24.982811
LE Read ISO link quality (0x08|0x0075) ncmd 1
Status: Success (0x00)
Handle: 98
TX unacked packets 0
TX flushed packets 257602
TX last subevent packets 0
TX retrnansmitted packets 0
TX crc error packets 2594
RX unreceived packets 0
Duplicated packets 0
---
monitor/bt.h | 18 ++++++++++++++++++
monitor/packet.c | 38 ++++++++++++++++++++++++++++++++++++++
2 files changed, 56 insertions(+)

diff --git a/monitor/bt.h b/monitor/bt.h
index 4482e6e2c..dca2dc8b8 100644
--- a/monitor/bt.h
+++ b/monitor/bt.h
@@ -2914,6 +2914,24 @@ struct bt_hci_cmd_le_set_host_feature {
uint8_t bit_value;
} __attribute__ ((packed));

+#define BT_HCI_CMD_LE_READ_ISO_LINK_QUALITY 0x2075
+#define BT_HCI_BIT_LE_READ_ISO_LINK_QUALITY BT_HCI_CMD_BIT(45, 1)
+struct bt_hci_cmd_le_read_iso_link_quality {
+ uint16_t handle;
+} __attribute__ ((packed));
+
+struct bt_hci_rsp_le_read_iso_link_quality {
+ uint8_t status;
+ uint16_t handle;
+ uint32_t tx_unacked_packets;
+ uint32_t tx_flushed_packets;
+ uint32_t tx_last_subevent_packets;
+ uint32_t retransmitted_packets;
+ uint32_t crc_error_packets;
+ uint32_t rx_unreceived_packets;
+ uint32_t duplicated_packets;
+} __attribute__ ((packed));
+
#define BT_HCI_EVT_INQUIRY_COMPLETE 0x01
struct bt_hci_evt_inquiry_complete {
uint8_t status;
diff --git a/monitor/packet.c b/monitor/packet.c
index fd8df7a8b..3031b028f 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -8946,6 +8946,34 @@ static void le_set_host_feature_cmd(uint16_t index, const void *data,
print_field("Bit Value: %u", cmd->bit_value);
}

+static void le_read_iso_link_quality_cmd(uint16_t index, const void *data, uint8_t size)
+{
+ const struct bt_hci_cmd_le_read_iso_link_quality *cmd = data;
+
+ print_field("Handle: %d", le16_to_cpu(cmd->handle));
+}
+
+static void status_le_read_iso_link_quality_rsp(uint16_t index, const void *data, uint8_t size)
+{
+ const struct bt_hci_rsp_le_read_iso_link_quality *rsp = data;
+
+ print_status(rsp->status);
+
+ if (size == 1)
+ return;
+
+ print_field("Handle: %d", le16_to_cpu(rsp->handle));
+ print_field("TX unacked packets %d", rsp->tx_unacked_packets);
+ print_field("TX flushed packets %d", rsp->tx_flushed_packets);
+ print_field("TX last subevent packets %d",
+ rsp->tx_last_subevent_packets);
+ print_field("TX retransmitted packets %d",
+ rsp->retransmitted_packets);
+ print_field("TX crc error packets %d", rsp->crc_error_packets);
+ print_field("RX unreceived packets %d", rsp->rx_unreceived_packets);
+ print_field("Duplicated packets %d", rsp->duplicated_packets);
+}
+
struct opcode_data {
uint16_t opcode;
int bit;
@@ -9895,6 +9923,16 @@ static const struct opcode_data opcode_table[] = {
"LE Set Host Feature", le_set_host_feature_cmd,
sizeof(struct bt_hci_cmd_le_set_host_feature),
true, status_rsp, 1, true },
+ { BT_HCI_CMD_LE_READ_ISO_LINK_QUALITY,
+ BT_HCI_BIT_LE_READ_ISO_LINK_QUALITY,
+ "LE Read ISO link quality",
+ le_read_iso_link_quality_cmd,
+ sizeof(
+ struct bt_hci_cmd_le_read_iso_link_quality),
+ true, status_le_read_iso_link_quality_rsp,
+ sizeof(
+ struct bt_hci_rsp_le_read_iso_link_quality),
+ true },
{ }
};

--
2.34.1


2023-07-29 01:17:52

by Łukasz Rymanowski

[permalink] [raw]
Subject: [PATCH BlueZ 3/5] monitor/ll: Add support for connection parameter command.

From: Szymon Czapracki <[email protected]>

LL_CONNECTION_PARAM_REQ (0x0f)
Interval min: 7.50 msec (0x0006)
Interval max: 7.50 msec (0x0006)
Latency: 0 (0x0000)
Timeout: 5000 msec (0x01f4)
Preffered periodicity: 0.00 (0x00)
Reference connection event count: 4 (0x04)
Offset 0: 0.00 msec (0x00)
Offset 1: 0.00 msec (0x00)
Offset 2: 1.25 msec (0x01)
Offset 3: 0.00 msec (0x00)
Offset 4: 2.50 msec (0x02)
Offset 5: 0.00 msec (0x00)

LL_CONNECTION_PARAM_RSP (0x10)
Interval min: 7.50 msec (0x0006)
Interval max: 7.50 msec (0x0006)
Latency: 0 (0x0000)
Timeout: 5000 msec (0x01f4)
Preffered periodicity: 0.00 (0x00)
Reference connection event count: 4 (0x04)
Offset 0: 318.75 msec (0xff)
Offset 1: 318.75 msec (0xff)
Offset 2: 318.75 msec (0xff)
Offset 3: 318.75 msec (0xff)
Offset 4: 318.75 msec (0xff)
Offset 5: 318.75 msec (0xff)
---
monitor/bt.h | 28 ++++++++++++++++++++++++
monitor/ll.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++--
2 files changed, 88 insertions(+), 2 deletions(-)

diff --git a/monitor/bt.h b/monitor/bt.h
index fcc5478bf..4482e6e2c 100644
--- a/monitor/bt.h
+++ b/monitor/bt.h
@@ -95,8 +95,36 @@ struct bt_ll_peripheral_feature_req {
} __attribute__ ((packed));

#define BT_LL_CONN_PARAM_REQ 0x0f
+struct bt_ll_conn_param_req {
+ uint16_t interval_min;
+ uint16_t interval_max;
+ uint16_t latency;
+ uint16_t timeout;
+ uint8_t pref_period;
+ uint16_t pref_conn_evt_count;
+ uint8_t offset_0;
+ uint8_t offset_1;
+ uint8_t offset_2;
+ uint8_t offset_3;
+ uint8_t offset_4;
+ uint8_t offset_5;
+} __attribute__ ((packed));

#define BT_LL_CONN_PARAM_RSP 0x10
+struct bt_ll_conn_param_rsp {
+ uint16_t interval_min;
+ uint16_t interval_max;
+ uint16_t latency;
+ uint16_t timeout;
+ uint8_t pref_period;
+ uint16_t pref_conn_evt_count;
+ uint8_t offset_0;
+ uint8_t offset_1;
+ uint8_t offset_2;
+ uint8_t offset_3;
+ uint8_t offset_4;
+ uint8_t offset_5;
+} __attribute__ ((packed));

#define BT_LL_REJECT_IND_EXT 0x11
struct bt_ll_reject_ind_ext {
diff --git a/monitor/ll.c b/monitor/ll.c
index f588d5e99..feeb13e92 100644
--- a/monitor/ll.c
+++ b/monitor/ll.c
@@ -458,6 +458,64 @@ static void peripheral_feature_req(const void *data, uint8_t size)
packet_print_features_ll(pdu->features);
}

+static void conn_param_req(const void *data, uint8_t size)
+{
+ const struct bt_ll_conn_param_req *pdu = data;
+
+ print_field("Interval min: %.2f msec (0x%4.4x)",
+ pdu->interval_min * 1.25, pdu->interval_min);
+ print_field("Interval max: %.2f msec (0x%4.4x)",
+ pdu->interval_max * 1.25, pdu->interval_max);
+ print_field("Latency: %d (0x%4.4x)", pdu->latency, pdu->latency);
+ print_field("Timeout: %d msec (0x%4.4x)", pdu->timeout * 10,
+ pdu->timeout);
+ print_field("Preffered periodicity: %.2f (0x%2.2x)",
+ pdu->pref_period * 1.25, pdu->pref_period);
+ print_field("Reference connection event count: %d (0x%2.2x)",
+ pdu->pref_conn_evt_count, pdu->pref_conn_evt_count);
+ print_field("Offset 0: %.2f msec (0x%2.2x)", pdu->offset_0 * 1.25,
+ pdu->offset_0);
+ print_field("Offset 1: %.2f msec (0x%2.2x)", pdu->offset_1 * 1.25,
+ pdu->offset_1);
+ print_field("Offset 2: %.2f msec (0x%2.2x)", pdu->offset_2 * 1.25,
+ pdu->offset_2);
+ print_field("Offset 3: %.2f msec (0x%2.2x)", pdu->offset_3 * 1.25,
+ pdu->offset_3);
+ print_field("Offset 4: %.2f msec (0x%2.2x)", pdu->offset_4 * 1.25,
+ pdu->offset_4);
+ print_field("Offset 5: %.2f msec (0x%2.2x)", pdu->offset_5 * 1.25,
+ pdu->offset_5);
+}
+
+static void conn_param_rsp(const void *data, uint8_t size)
+{
+ const struct bt_ll_conn_param_rsp *pdu = data;
+
+ print_field("Interval min: %.2f msec (0x%4.4x)",
+ pdu->interval_min * 1.25, pdu->interval_min);
+ print_field("Interval max: %.2f msec (0x%4.4x)",
+ pdu->interval_max * 1.25, pdu->interval_max);
+ print_field("Latency: %d (0x%4.4x)", pdu->latency, pdu->latency);
+ print_field("Timeout: %d msec (0x%4.4x)", pdu->timeout * 10,
+ pdu->timeout);
+ print_field("Preffered periodicity: %.2f (0x%2.2x)",
+ pdu->pref_period * 1.25, pdu->pref_period);
+ print_field("Reference connection event count: %d (0x%2.2x)",
+ pdu->pref_conn_evt_count, pdu->pref_conn_evt_count);
+ print_field("Offset 0: %.2f msec (0x%2.2x)", pdu->offset_0 * 1.25,
+ pdu->offset_0);
+ print_field("Offset 1: %.2f msec (0x%2.2x)", pdu->offset_1 * 1.25,
+ pdu->offset_1);
+ print_field("Offset 2: %.2f msec (0x%2.2x)", pdu->offset_2 * 1.25,
+ pdu->offset_2);
+ print_field("Offset 3: %.2f msec (0x%2.2x)", pdu->offset_3 * 1.25,
+ pdu->offset_3);
+ print_field("Offset 4: %.2f msec (0x%2.2x)", pdu->offset_4 * 1.25,
+ pdu->offset_4);
+ print_field("Offset 5: %.2f msec (0x%2.2x)", pdu->offset_5 * 1.25,
+ pdu->offset_5);
+}
+
static void reject_ind_ext(const void *data, uint8_t size)
{
const struct bt_ll_reject_ind_ext *pdu = data;
@@ -707,8 +765,8 @@ static const struct llcp_data llcp_table[] = {
{ 0x0c, "LL_VERSION_IND", version_ind, 5, true },
{ 0x0d, "LL_REJECT_IND", reject_ind, 1, true },
{ 0x0e, "LL_PERIPHERAL_FEATURE_REQ", peripheral_feature_req, 8, true },
- { 0x0f, "LL_CONNECTION_PARAM_REQ", NULL, 23, true },
- { 0x10, "LL_CONNECTION_PARAM_RSP", NULL, 23, true },
+ { 0x0f, "LL_CONNECTION_PARAM_REQ", conn_param_req, 23, true },
+ { 0x10, "LL_CONNECTION_PARAM_RSP", conn_param_rsp, 23, true },
{ 0x11, "LL_REJECT_IND_EXT", reject_ind_ext, 2, true },
{ 0x12, "LL_PING_REQ", null_pdu, 0, true },
{ 0x13, "LL_PING_RSP", null_pdu, 0, true },
--
2.34.1


2023-07-29 01:17:52

by Łukasz Rymanowski

[permalink] [raw]
Subject: [PATCH BlueZ 5/5] monitor: Add parsing Service Data of UUID 128

In the advertising report, instead of deciding EIR 0x21 into this:

Unknown EIR field 0x21: 3a048f2ba97ea6ae1b49c619e973a4a701480d130d

We can do bit better

Service Data UUID 128: Vendor specific
Data: 01480d130d
---
monitor/packet.c | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/monitor/packet.c b/monitor/packet.c
index 3031b028f..21e08ccef 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -3997,6 +3997,18 @@ static void print_eir(const uint8_t *eir, uint8_t eir_len, bool le)
print_service_data(data, data_len);
break;

+ case BT_EIR_SERVICE_DATA128:
+ if (data_len <= 16)
+ break;
+
+ print_field("Service Data UUID 128: %s ",
+ bt_uuid128_to_str(&data[0]));
+
+ if (data_len > 16)
+ print_hex_field(" Data", &data[16],
+ data_len - 16);
+
+ break;
case BT_EIR_RANDOM_ADDRESS:
if (data_len < 6)
break;
--
2.34.1


2023-07-29 06:16:13

by Paul Menzel

[permalink] [raw]
Subject: Re: [PATCH BlueZ 5/5] monitor: Add parsing Service Data of UUID 128

Dear Łukasz,


Thank you for your patch.

Am 29.07.23 um 02:45 schrieb Łukasz Rymanowski:
> In the advertising report, instead of deciding EIR 0x21 into this:

Do you mean deciphering?

>
> Unknown EIR field 0x21: 3a048f2ba97ea6ae1b49c619e973a4a701480d130d
>
> We can do bit better
>
> Service Data UUID 128: Vendor specific
> Data: 01480d130d
> ---
> monitor/packet.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/monitor/packet.c b/monitor/packet.c
> index 3031b028f..21e08ccef 100644
> --- a/monitor/packet.c
> +++ b/monitor/packet.c
> @@ -3997,6 +3997,18 @@ static void print_eir(const uint8_t *eir, uint8_t eir_len, bool le)
> print_service_data(data, data_len);
> break;
>
> + case BT_EIR_SERVICE_DATA128:
> + if (data_len <= 16)
> + break;
> +
> + print_field("Service Data UUID 128: %s ",
> + bt_uuid128_to_str(&data[0]));
> +
> + if (data_len > 16)
> + print_hex_field(" Data", &data[16],
> + data_len - 16);
> +
> + break;
> case BT_EIR_RANDOM_ADDRESS:
> if (data_len < 6)
> break;

Reviewed-by: Paul Menzel <[email protected]>


Kind regards,

Paul

2023-07-29 07:30:14

by bluez.test.bot

[permalink] [raw]
Subject: RE: Couple of improvements to btmon

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=770766

---Test result---

Test Summary:
CheckPatch FAIL 2.82 seconds
GitLint FAIL 1.85 seconds
BuildEll PASS 34.16 seconds
BluezMake PASS 1217.85 seconds
MakeCheck PASS 13.10 seconds
MakeDistcheck PASS 199.29 seconds
CheckValgrind PASS 313.32 seconds
CheckSmatch WARNING 452.23 seconds
bluezmakeextell PASS 133.58 seconds
IncrementalBuild PASS 5272.12 seconds
ScanBuild WARNING 1463.29 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[BlueZ,1/5] monitor: Fix decoding Command Complete for Remove ISO Data path
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#88:
< HCI Command: LE Remove Isochronous Data Path (0x08|0x006f) plen 3 #1061 139.246292

WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed))
#122: FILE: monitor/bt.h:2868:
+} __attribute__ ((packed));

/github/workspace/src/src/13332856.patch total: 0 errors, 2 warnings, 21 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.

/github/workspace/src/src/13332856.patch has style problems, please review.

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

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


[BlueZ,3/5] monitor/ll: Add support for connection parameter command.
WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed))
#141: FILE: monitor/bt.h:111:
+} __attribute__ ((packed));

WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed))
#157: FILE: monitor/bt.h:127:
+} __attribute__ ((packed));

/github/workspace/src/src/13332857.patch total: 0 errors, 2 warnings, 110 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.

/github/workspace/src/src/13332857.patch has style problems, please review.

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

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


[BlueZ,4/5] monitor: Add support to decode le read ISO link quality
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#88:
> HCI Event: Command Complete (0x0e) plen 34 #14 24.982811

WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed))
#116: FILE: monitor/bt.h:2921:
+} __attribute__ ((packed));

WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed))
#128: FILE: monitor/bt.h:2933:
+} __attribute__ ((packed));

WARNING:LONG_LINE: line length of 88 exceeds 80 columns
#141: FILE: monitor/packet.c:8949:
+static void le_read_iso_link_quality_cmd(uint16_t index, const void *data, uint8_t size)

WARNING:LONG_LINE: line length of 96 exceeds 80 columns
#148: FILE: monitor/packet.c:8956:
+static void status_le_read_iso_link_quality_rsp(uint16_t index, const void *data, uint8_t size)

/github/workspace/src/src/13332858.patch total: 0 errors, 5 warnings, 74 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.

/github/workspace/src/src/13332858.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG 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 - FAIL
Desc: Run gitlint
Output:
[BlueZ,1/5] monitor: Fix decoding Command Complete for Remove ISO Data path

WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
5: B1 Line exceeds max length (139>80): "< HCI Command: LE Remove Isochronous Data Path (0x08|0x006f) plen 3 #1061 139.246292"
8: B1 Line exceeds max length (139>80): "> HCI Event: Command Complete (0x0e) plen 6 #1062 139.246954"
15: B1 Line exceeds max length (139>80): "< HCI Command: LE Remove Isochronous Data Path (0x08|0x006f) plen 3 #1061 139.246292"
19: B1 Line exceeds max length (139>80): "> HCI Event: Command Complete (0x0e) plen 6 #1062 139.246954"
[BlueZ,3/5] monitor/ll: Add support for connection parameter command.

WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
1: T3 Title has trailing punctuation (.): "[BlueZ,3/5] monitor/ll: Add support for connection parameter command."
[BlueZ,4/5] monitor: Add support to decode le read ISO link quality

WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
5: B1 Line exceeds max length (139>80): " > HCI Event: Command Complete (0x0e) plen 34 #14 24.982811"
[BlueZ,5/5] monitor: Add parsing Service Data of UUID 128

WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
5: B3 Line contains hard tab characters (\t): " Unknown EIR field 0x21: 3a048f2ba97ea6ae1b49c619e973a4a701480d130d"
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
monitor/packet.c: note: in included file:monitor/display.h:82:26: warning: Variable length array is used.monitor/packet.c:1832:26: warning: Variable length array is used.monitor/packet.c: note: in included file:monitor/bt.h:3602:52: warning: array of flexible structuresmonitor/bt.h:3590:40: warning: array of flexible structuresmonitor/packet.c: note: in included file:monitor/display.h:82:26: warning: Variable length array is used.monitor/packet.c:1832:26: warning: Variable length array is used.monitor/packet.c: note: in included file:monitor/bt.h:3602:52: warning: array of flexible structuresmonitor/bt.h:3590:40: warning: array of flexible structuresmonitor/packet.c: note: in included file:monitor/display.h:82:26: warning: Variable length array is used.monitor/packet.c:1832:26: warning: Variable length array is used.monitor/packet.c: note: in included file:monitor/bt.h:3602:52: warning: array of flexible structuresmonitor/bt.h:3590:40: warning: array of flexible structuresmonitor/pac
ket.c: note: in included file:monitor/display.h:82:26: warning: Variable length array is used.monitor/packet.c:1832:26: warning: Variable length array is used.monitor/packet.c: note: in included file:monitor/bt.h:3602:52: warning: array of flexible structuresmonitor/bt.h:3590:40: warning: array of flexible structures
##############################
Test: ScanBuild - WARNING
Desc: Run Scan Build
Output:
monitor/packet.c:12426:2: warning: Null pointer passed to 2nd parameter expecting 'nonnull'
memcpy(tx, tv, sizeof(*tv));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.



---
Regards,
Linux Bluetooth

2023-07-29 20:04:39

by Łukasz Rymanowski

[permalink] [raw]
Subject: Re: [PATCH BlueZ 5/5] monitor: Add parsing Service Data of UUID 128

Hi Paul


On Sat, 29 Jul 2023 at 06:42, Paul Menzel <[email protected]> wrote:
>
> Dear Łukasz,
>
>
> Thank you for your patch.
>
> Am 29.07.23 um 02:45 schrieb Łukasz Rymanowski:
> > In the advertising report, instead of deciding EIR 0x21 into this:
>
> Do you mean deciphering?

Thanks for pointing it out. Just sent v2 for this patch.

>
> >
> > Unknown EIR field 0x21: 3a048f2ba97ea6ae1b49c619e973a4a701480d130d
> >
> > We can do bit better
> >
> > Service Data UUID 128: Vendor specific
> > Data: 01480d130d
> > ---
> > monitor/packet.c | 12 ++++++++++++
> > 1 file changed, 12 insertions(+)
> >
> > diff --git a/monitor/packet.c b/monitor/packet.c
> > index 3031b028f..21e08ccef 100644
> > --- a/monitor/packet.c
> > +++ b/monitor/packet.c
> > @@ -3997,6 +3997,18 @@ static void print_eir(const uint8_t *eir, uint8_t eir_len, bool le)
> > print_service_data(data, data_len);
> > break;
> >
> > + case BT_EIR_SERVICE_DATA128:
> > + if (data_len <= 16)
> > + break;
> > +
> > + print_field("Service Data UUID 128: %s ",
> > + bt_uuid128_to_str(&data[0]));
> > +
> > + if (data_len > 16)
> > + print_hex_field(" Data", &data[16],
> > + data_len - 16);
> > +
> > + break;
> > case BT_EIR_RANDOM_ADDRESS:
> > if (data_len < 6)
> > break;
>
> Reviewed-by: Paul Menzel <[email protected]>
>
>
> Kind regards,
>
> Paul

Best
Łukasz

2023-07-31 18:30:37

by patchwork-bot+bluetooth

[permalink] [raw]
Subject: Re: [PATCH BlueZ 0/5] Couple of improvements to btmon

Hello:

This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <[email protected]>:

On Sat, 29 Jul 2023 02:45:47 +0200 you wrote:
> Szymon Czapracki (1):
> monitor/ll: Add support for connection parameter command.
>
> Łukasz Rymanowski (4):
> monitor: Fix decoding Command Complete for Remove ISO Data path
> monitor: Update le event mask with bits 20-23
> monitor: Add support to decode le read ISO link quality
> monitor: Add parsing Service Data of UUID 128
>
> [...]

Here is the summary with links:
- [BlueZ,1/5] monitor: Fix decoding Command Complete for Remove ISO Data path
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=86a4015659e3
- [BlueZ,2/5] monitor: Update le event mask with bits 20-23
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=7c6e030ac976
- [BlueZ,3/5] monitor/ll: Add support for connection parameter command.
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=af3549724b0a
- [BlueZ,4/5] monitor: Add support to decode le read ISO link quality
(no matching commit)
- [BlueZ,5/5] monitor: Add parsing Service Data of UUID 128
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=8d60b555e8e1

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html