Repository navigation
Improve/fix FreeBSD Bluetooth socket support #85302
Description
Activity
- BTPROTO_HCI addresses only expect string identifiers on NetBSD and DragonFly:
cpython/Modules/socketmodule.c
Line 1931 in 2e0a920
#if defined(__NetBSD__) || defined(__DragonFly__)
But of course this is true on FreeBSD too. (DragonFly inherited the BT stack from FreeBSD!)
For example this is how hccontrol creates an address:
https://github.com/freebsd/freebsd/blob/6bb9221a9b865ee432269099f341e4230a6cbcd4/usr.sbin/bluetooth/hccontrol/hccontrol.c#L115-L129So currently it is not possible to bind an HCI socket (without using FFI to directly use the libc bind function) :(
- BTPROTO_SCO is excluded on FreeBSD:
cpython/Modules/socketmodule.c
Line 1953 in 2e0a920
#if !defined(__FreeBSD__)
But SCO has been supported since 2008: freebsd/freebsd-src@bb4c6de
- BTPROTO_HCI addresses only expect string identifiers on NetBSD and DragonFly:
- added3.7 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of life3.9 (EOL)end of lifeend of life3.10 (EOL)end of lifeend of lifetype-featureA feature request or enhancementA feature request or enhancement
on Jun 26, 2020 - addedextension-modulesC modules in the Modules dirC modules in the Modules dir
on Dec 1, 2023 (1) was fixed by #131668.
- added a commit that references this issue
on Apr 1, 2025 😍
Actually, we did not test this on live FreeBSD machine, and were unable to test it on a VM, so the support is rather theoretical. I will be grateful if someone can test it on machine where the Bluetooth socket tests are not skipped.
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:
bugs.python.org fields:
Linked PRs