Questions tagged [pybluez]

PyBluez is a Python extension module allowing access to system Bluetooth resources on Windows, Linux, and OS X(unstable).

PyBluez is a Python module that works on both Python 2 and 3 on Windows and Linux. It has support for both L2CAP and RFCOMM, however L2CAP is unsupported in Python 2. It also has experimental BLE(Bluetooth Low Energy) functions in Linux versions. Mac OS X versions are currently unstable. https://github.com/karulis/pybluez

162 questions
0
votes
0 answers

Transform the output to DataFrame

I do some codes regarding bluetooth devices and I already get the 'Device Name', 'Device MAC Address' and 'Device RSSI'. Here are my current codes: import bluetooth import select class MyDiscoverer(bluetooth.DeviceDiscoverer): def…
amnashraf
  • 1
  • 1
0
votes
0 answers

OSError: [WinError 10051] A socket operation was attempted to an unreachable network

I tried to connect my headphone with using Bluetooth. I used the pybluez2 module, and I got this error: OSError: [WinError 10051] A socket operation was attempted to an unreachable network Here is my connect_to_device function: if target_address…
0
votes
0 answers

library pybluez is not installed

Installed all dependencies but still not working. OS Windows C:\Users\User1\Documents\pybluez-master>python setup.py install running install …
0
votes
0 answers

"use_2to3 is invalid" when installing pybluez package

I got this error: error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [1 lines of output] error in PyBluez setup command: use_2to3 is invalid. [end of output] note: This…
xyz
  • 9
  • 1
0
votes
1 answer

I found the way to install PyBluez on Ubuntu 22.04

After many attempts figuring out how to install PyBluez on Ubuntu using pip3 I've seen many people with the same problem. fortunatelly I found the way to do it without pip3: downloaded the program from https://pybluez.readthedocs.io/en/latest/ then…
Edgardo
  • 1
  • 1
0
votes
0 answers

Issue while setting up Bluez on Ubuntu NUC: tools/mesh-cfgtest.c:132:10:10: error: Initializer element is not constant

I am trying to setup BLE-Mesh Provisioner on my Ubuntu NUC. Since kernel is already build in NUC Ubuntu with version 4.15.0-76 generic. Now I am trying to compile Bluez from source. I have performed following steps on my system: Compiling…
0
votes
1 answer

pip install pybluez2: package directory 'bluetooth/macos' does not exist

→ pip3 install pybluez2 Collecting pybluez2 Using cached pybluez2-0.46.tar.gz (50 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─>…
Rhyez
  • 49
  • 4
0
votes
0 answers

Break for loop using data received from bluetooth

I am making an android app that is connected to raspbeery pi using bluetooth to count from 0 to 100, when the user press start on the app, it send data to raspberry pi to start counting using for loop and then the raspberry pi send back the data. I…
0
votes
1 answer

I want to use Python to test the device's Bluetooth rssi value, but there is a problem when installing it in Ubuntu

After I use sudo apt-get install bluetooth libbluetooth-dev (libbluetooth-dev and bluetooth are the latest version) ,I type sudo python3 -m pip install pybluez, but it shows: Collecting pybluez Using cached PyBluez-0.23.tar.gz (97 kB) Preparing…
cloud
  • 17
  • 2
0
votes
0 answers

How to get raw bluetooth data with python?

I have been looking all over the internet, and I haven't been able to figure out how to read incoming bluetooth data. I have a mouse I would like to get signals from currently, and I am planning on sending data between two computers at some point,…
Finn E
  • 309
  • 2
  • 12
0
votes
0 answers

bluetooth module not discovering new devices raspberrypi

Below is the modified code from the internet i'm executing on raspberrypi 4 to discover bluetooth devices import bluetooth print("Discovering bluetooth enabled devices ...") nearby_devices = bluetooth.discover_devices(lookup_names =…
msang
  • 1
  • 1
0
votes
0 answers

PyBluez connection inexplicably fails after a while

I am trying to do a server-client socketing program using PyBluez, where data are transferred between server and clients via Bluetooth connection. For this, I used 2 RPi 4s as clients, and a mini PC running Ubuntu 22.04 acting as server. I ran the…
0
votes
1 answer

bluetooth.btcommon.BluetoothError: [Errno 2] No such file or directory

I'm trying to connect to a bluetooth device through a Python script using pybluez on a Khadas board (kind of like a Raspberry Pi, aarch64). I have manually updated PyBluez to 5.65 as it contains a fix I need. Both bluetoothctl --version and…
0
votes
1 answer

cannot install pybluez package on windows cmd prompt

I'm trying to install pybluez on windows cmd with pip install pybluez but I keep on getting the same error. Please help me fix this error. (I'm on windows 11) C:\WINDOWS\system32>pip install pybluez Collecting pybluez Using cached…
0
votes
2 answers

Error creating an executable python script with PyInstaller due to PyBluez error

I have created a functional python (Python 3.10.4) script that uses Pybluez (version 0.30) to connect to an ESP32. Now I want to use PyInstaller to create a standalone executable application from said script, but I keep running into the following…
Finn
  • 7
  • 2