I have build system image for RaspberryPi 2 using `make raspberrypi2_defconfig` with some customization. For eg. I have enabled bluez-tools, bluez-utils 5.x, rpi-bt-firmware and of course python3. When I try to create bluetooth socket, I get an error: Python 3.6.3 (default, Jul 16 2018, 20:00:50) [GCC 7.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> s = socket.socket(socket.AF_BLUETOOTH, socket.SOCK_STREAM, socket.BTPROTO_RFCOMM) Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: module 'socket' has no attribute 'AF_BLUETOOTH' Bluetooth sockets works correctly in python3 on Raspbian.
Created attachment 7666 [details] Support for socket.AF_BLUETOOTH Ok, I found a solution, but unfortunately my patch makes a circular dependencies, so I must disable libmount Python bindings.
Fixed by https://git.buildroot.org/buildroot/commit/package/bluez5_utils-headers?id=9edd1760edcfb8bd5cc49043e79893c60e19c0e0 and https://git.buildroot.org/buildroot/commit/package/python3?id=cd30ed51b46edff512d84cc5ae038a55c7129860. Thanks!