Re: [PATCH BlueZ v3 3/4] doc/hci-protocol: Add BT_RECV_VENDOR_PKT socket option for HCI_CHANNEL_USER
From: Luiz Augusto von Dentz
Date: Thu Sep 03 2026 - 12:31:11 EST
Hi Zijun,
On Thu, Sep 3, 2026 at 10:47 AM Zijun Hu <zijun.hu@xxxxxxxxxxxxxxxx> wrote:
>
> BT_RECV_VENDOR_PKT controls receiving vendor packets over HCI_CHANNEL_USER.
>
> Disabled by default to avoid regressions for existing applications.
> ---
> doc/hci-protocol.rst | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/doc/hci-protocol.rst b/doc/hci-protocol.rst
> index db10b35df736..53734a0037a9 100644
> --- a/doc/hci-protocol.rst
> +++ b/doc/hci-protocol.rst
> @@ -131,16 +131,34 @@ Example:
>
> uint16_t mtu;
> socklen_t len;
> int err;
>
> len = sizeof(mtu);
> err = getsockopt(sock, SOL_BLUETOOTH, BT_RCVMTU, &mtu, &len);
>
> +BT_RECV_VENDOR_PKT (since Linux 7.3)
> +------------------------------------
> +
> +Control receiving vendor packets, requires hci_channel to be set to
> +HCI_CHANNEL_USER.
> +
> +Default is disabled.
> +
> +Example:
> +
> +.. code-block::
> +
> + uint32_t enable = 1;
> + int err;
> +
> + err = setsockopt(fd, SOL_BLUETOOTH, BT_RECV_VENDOR_PKT, &enable,
> + sizeof(enable));
I don't think we ever applied this socket option to the kernel,
though. Anyway, I think we are better off adding another channel,
e.g., HCI_CHANNEL_VENDOR which can then allow packet type rather than
just the known ones.
> RESOURCES
> =========
>
> http://www.bluez.org
>
> REPORTING BUGS
> ==============
>
>
> --
> 2.34.1
>
--
Luiz Augusto von Dentz