Skip to content

sockaddr_hci lacks hci_channel (AF_BLUETOOTH sockets) #70145

Description

@mikeryan
mannequin
BPO 25957
Nosy @vstinner

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2015-12-26.19:35:41.319>
labels = ['extension-modules', 'type-bug', 'library']
title = 'sockaddr_l2 lacks CID, address type (AF_BLUETOOTH sockets)'
updated_at = <Date 2021-06-01.09:20:35.829>
user = 'https://bugs.python.org/mikeryan'

bugs.python.org fields:

activity = <Date 2021-06-01.09:20:35.829>
actor = 'steve.dower'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Extension Modules', 'Library (Lib)']
creation = <Date 2015-12-26.19:35:41.319>
creator = 'mikeryan'
dependencies = []
files = []
hgrepos = []
issue_num = 25957
keywords = []
message_count = 2.0
messages = ['257043', '257120']
nosy_count = 2.0
nosy_names = ['vstinner', 'mikeryan']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue25957'
versions = ['Python 2.7']

Linked PRs

Activity

  1. mikeryan commented on Dec 26, 2015

    mikeryanmannequin
    MannequinAuthor

    The AF_BLUETOOTH socket type lacks support for specifying CID and address type in sockaddr_l2. These structure members have been present since 2009 and 2012 respectively:

    https://git.kernel.org/cgit/bluetooth/bluez.git/commit/?id=3de95535
    https://git.kernel.org/cgit/bluetooth/bluez.git/commit/?id=ba801fcd

    The current version of the full structure can be found here:

    https://git.kernel.org/cgit/bluetooth/bluez.git/tree/lib/l2cap.h?id=1b9e48f4#n40

    The Python code in question can be found here:

    https://github.com/python/cpython/blob/4f9794dbcaa6ee7ddc6ab175a57e7f01ebe64353/Modules/socketmodule.c#L1108

  2. mikeryan commented on Dec 28, 2015

    mikeryanmannequin
    MannequinAuthor

    AF_BLUETOOTH also lacks support for hci_channel in sockaddr_hci for BTPROTO_HCI sockets:

    https://git.kernel.org/cgit/bluetooth/bluez.git/tree/lib/hci.h?h=5.37#n2340

    This feature has been present in BlueZ since 2010:

    https://git.kernel.org/cgit/bluetooth/bluez.git/commit/?id=12d02e7f

    (Note that the latest BlueZ release includes a total of five different channels that should be supported)

  3. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Jan 14, 2016
  4. transferred this issue fromon Apr 10, 2022
  5. encukou commented on Feb 27, 2025

    @encukou
    Member

    CID and address type were added in #129288.

  6. changed the title [-]sockaddr_l2 lacks CID, address type (AF_BLUETOOTH sockets)[/-] [+]sockaddr_hci lacks hci_channel (AF_BLUETOOTH sockets)[/+] on Feb 27, 2025
  7. serhiy-storchaka commented on Apr 1, 2025

    @serhiy-storchaka
    Member

    TODO: add support for hci_channel in sockaddr_hci for BTPROTO_HCI sockets.

    The code will be complicated, because currently only a single bytes/int value is accepted as an address, not a tuple. See also #69232.

  8. serhiy-storchaka commented on Apr 4, 2025

    @serhiy-storchaka
    Member

    Note that there were bugs in support of BTPROTO_HCI sockets.

  9. added 2 commits that reference this issue on Apr 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

extension-modulesC modules in the Modules dirstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions