* [PATCH BlueZ] doc: iso: add BT_PKT_SEQNUM documentation
@ 2025-09-20 9:20 Pauli Virtanen
2025-09-20 10:42 ` [BlueZ] " bluez.test.bot
2025-09-26 16:20 ` [PATCH BlueZ] " patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Pauli Virtanen @ 2025-09-20 9:20 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Pauli Virtanen
---
doc/iso.rst | 76 ++++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 70 insertions(+), 6 deletions(-)
diff --git a/doc/iso.rst b/doc/iso.rst
index d08b60d20..2ad9c73e4 100644
--- a/doc/iso.rst
+++ b/doc/iso.rst
@@ -250,12 +250,76 @@ received packets. Possible values:
:header: "pkt_status", "Description"
:widths: auto
- **0x0**, Valid data. The complete SDU was received correctly.
- **0x1**, Possibly invalid data. The contents of the ISO_SDU_Fragment
- , may contain errors or part of the SDU may be missing.
- , This is reported as "data with possible errors".
- **0x2**, Part(s) of the SDU were not received correctly.
- , This is reported as "lost data".
+ **0x0**, "Valid data. The complete SDU was received correctly."
+ **0x1**, "Possibly invalid data. The contents of the ISO_SDU_Fragment,
+ may contain errors or part of the SDU may be missing.
+ This is reported as 'data with possible errors'."
+ **0x2**, "Part(s) of the SDU were not received correctly.
+ This is reported as 'lost data'."
+
+BT_PKT_SEQNUM (since Linux 6.17-rc1)
+------------------------------------
+
+Enable reporting packet ISO sequence number via `BT_SCM_PKT_SEQNUM`
+CMSG on received packets. Possible values:
+
+.. csv-table::
+ :header: "Value", "Description"
+ :widths: auto
+
+ **0**, Disable (default)
+ **1**, Enable
+
+
+:BT_SCM_PKT_SEQNUM:
+
+ Level ``SOL_BLUETOOTH`` CMSG with data::
+
+ uint16_t pkt_seqnum;
+
+ The values are equal to the "Packet_Sequence_Number" defined in
+ Core Specification v6.1, 5.4.5. HCI ISO Data packets:
+
+ https://www.bluetooth.com/wp-content/uploads/Files/Specification/HTML/Core-61/out/en/host-controller-interface/host-controller-interface-functional-specification.html#UUID-9b5fb085-278b-5084-ac33-bee2839abe6b
+
+Example (Enable sequence numbers):
+
+.. code-block::
+
+ uint32_t opt = 1;
+ if (setsockopt(fd, SOL_BLUETOOTH, BT_PKT_SEQNUM, &opt, sizeof(opt)) < 0)
+ goto error;
+
+Example (Read packet and its sequence number):
+
+.. code-block::
+
+ char data_buf[256];
+ uint16_t seqnum;
+ union {
+ char buf[CMSG_SPACE(sizeof(uint16_t))];
+ struct cmsghdr align;
+ } control;
+ struct iovec data = {
+ .iov_base = data_buf,
+ .iov_len = sizeof(data_buf),
+ };
+ struct msghdr msg = {
+ .msg_iov = &data,
+ .msg_iovlen = 1,
+ .msg_control = control.buf,
+ .msg_controllen = sizeof(control.buf),
+ };
+ struct scm_timestamping tss;
+
+ res = recvmsg(fd, &msg, 0);
+ if (res < 0)
+ goto error;
+
+ for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
+ if (cmsg->cmsg_level == SOL_BLUETOOTH && cmsg->cmsg_type == BT_PKT_SEQNUM)
+ memcpy(&seqnum, CMSG_DATA(cmsg), sizeof(seqnum));
+ }
SOCKET OPTIONS (SOL_SOCKET)
===========================
--
2.51.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [BlueZ] doc: iso: add BT_PKT_SEQNUM documentation
2025-09-20 9:20 [PATCH BlueZ] doc: iso: add BT_PKT_SEQNUM documentation Pauli Virtanen
@ 2025-09-20 10:42 ` bluez.test.bot
2025-09-26 16:20 ` [PATCH BlueZ] " patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2025-09-20 10:42 UTC (permalink / raw)
To: linux-bluetooth, pav
[-- Attachment #1: Type: text/plain, Size: 1262 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=1004473
---Test result---
Test Summary:
CheckPatch PENDING 0.22 seconds
GitLint PENDING 0.31 seconds
BuildEll PASS 19.96 seconds
BluezMake PASS 2712.96 seconds
MakeCheck PASS 20.40 seconds
MakeDistcheck PASS 185.02 seconds
CheckValgrind PASS 235.21 seconds
CheckSmatch PASS 306.44 seconds
bluezmakeextell PASS 128.20 seconds
IncrementalBuild PENDING 0.21 seconds
ScanBuild PASS 913.65 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH BlueZ] doc: iso: add BT_PKT_SEQNUM documentation
2025-09-20 9:20 [PATCH BlueZ] doc: iso: add BT_PKT_SEQNUM documentation Pauli Virtanen
2025-09-20 10:42 ` [BlueZ] " bluez.test.bot
@ 2025-09-26 16:20 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2025-09-26 16:20 UTC (permalink / raw)
To: Pauli Virtanen; +Cc: linux-bluetooth
Hello:
This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Sat, 20 Sep 2025 12:20:36 +0300 you wrote:
> ---
> doc/iso.rst | 76 ++++++++++++++++++++++++++++++++++++++++++++++++-----
> 1 file changed, 70 insertions(+), 6 deletions(-)
Here is the summary with links:
- [BlueZ] doc: iso: add BT_PKT_SEQNUM documentation
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=04a8966972d0
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-26 16:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-20 9:20 [PATCH BlueZ] doc: iso: add BT_PKT_SEQNUM documentation Pauli Virtanen
2025-09-20 10:42 ` [BlueZ] " bluez.test.bot
2025-09-26 16:20 ` [PATCH BlueZ] " patchwork-bot+bluetooth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox