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
1
vote
1 answer

how to check ping for a bluetooth device in python

i have connected a bluetooth controller to control a rover. i am able to ping the controller using sudo l2ping 84:30:95:06:C6:6C on the terminal. basically i want to execute certain code when ping is not available. i.e., when controller is…
siddharth
  • 57
  • 7
1
vote
1 answer

Is it possible to change bluetooth profile on RPi4?

I have a camera connected to a RPi4 and I want to stream its feed via bluetooth. BLE max speed is 2 Mbps, which is a little too slow. I'd like to switch to bluetooth classic, to reach 24 Mbps. Is it possible?
Jack Lilhammers
  • 1,207
  • 7
  • 19
1
vote
1 answer

can't connect multiple HC-08 to raspberry pi using bluepy and Bluez

I'm trying to connect two Arduino device to the raspberry pi using the csr 4.0 dongle. I've tried python3 and bluepy, but always one of them failed to connect! I've also tried to connect to them using bluetoothctl at the same time, but I got…
kiarash_kiani
  • 27
  • 1
  • 10
1
vote
2 answers

Python: How to get connected bluetooth devices? (Linux)

I need all connected bluetooth devices to my computer. I found library, but i can't get connected devices Simple inquiry example: import bluetooth nearby_devices = bluetooth.discover_devices(lookup_names=True) print("Found {}…
1
vote
1 answer

How to create for Dbus Mainloop for two separate Dbus Python programs

I have a python processes that monitor and interact with a Dbus service (NetworkManager) Currently this runs in it's own thread from the main program import dbus.mainloop.glib import NetworkManager PYTHON3 = sys.version_info >= (3, 0) if PYTHON3: …
Martin Joseph
  • 31
  • 1
  • 4
1
vote
1 answer

ModuleNotFoundError though Python module PyBluez is installed

I am using python3 with the Thonny IDE. My programs are running on a Raspberry Pi 4B. I tried to install PyBluez on different ways, with pip and with the built-in package installer of Thonny. Every time the installation seemed to work. When I then…
Ericsonn
  • 13
  • 4
1
vote
1 answer

some error for pybluez. I can't import bluetooth

I have problem about pybluez This is my code import bluetooth then it's showing error like this Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.7/site-packages/bluetooth/__init__.py", line 47,…
hurriken
  • 11
  • 3
1
vote
0 answers

Multi Advertisement of different Bluetooth protocols (pybluez)

I'm trying to write PyBluez scripts that serve both as a HID keyboard and GATT server. I have both scripts working separately, but I am not sure how to merge them together, both advertisements need to run in parallel without affecting each…
Moshe Hoori
  • 11
  • 1
  • 3
1
vote
0 answers

PyBluez not finding tracking tag device

bluetoothctl sees ITAG device, but python and pybluez doesn't on Raspberry Pi Zero W This is what I get via bluetoothctl: pi@rpitouch:~ $ sudo bluetoothctl [NEW] Controller B8:27:EB:6A:C0:8F rpitouch [default] [bluetooth]# scan on Discovery…
1
vote
0 answers

BluePy AttributeError: 'module' object has no attribute 'btle'

I'm trying to run python source code to connect and get data from TI Sensortag CC2650. sudo python sensortagcollector.py Traceback (most recent call last): File "sensortagcollector.py", line 223, in class…
inp.kez
  • 31
  • 2
1
vote
1 answer

Python3.4.4 Bluetooth pybluez sock.recv

I am working on bluetooth server application using pybluez lib in python. I have 2 version of python installed on my windows 7 PC (python2.7.15 and python 3.4.4) and both already have pybluez modules installed. The program work great in python…
zky cloudz
  • 23
  • 3
1
vote
0 answers

Unstable behaviour of Pybluez on different devices - Python

I have 3 devices -> 2*PC and 1 Raspberry Pi. 2 PCs are only for the sake of testing. 2PC = 2 Laptops with Windows 10. On raspberry pi I have Bluetooth service(Py 2.7 but 3.5 should also work if print()): import bluetooth try: …
Martin
  • 3,333
  • 2
  • 18
  • 39
1
vote
1 answer

How to build Android Bluetooth server app handling data sent from Raspberry Pi using pybluez

I was wondering how to build Android app handling data sent from Raspberry pi. I installed pybluez module on Raspberry Pi and send data using following python script. import bluetooth port = 1 sock=bluetooth.BluetoothSocket( bluetooth.RFCOMM…
1
vote
1 answer

Using Pybluez to connect to already paired bluetooth device?

I am writing a python program that involves using a bluetooth device.Right now I'm able to connect to the bluetooth device from the python program but everytime I quit the python program I have to bring my device pack to pairing mode (by pulling a…
Geeve George
  • 21
  • 1
  • 4
1
vote
1 answer

Reading Thermometer Data with Bluez Bluetooth Low Energy

I was wondering if there anyone willing to guide me a bit. I am trying to read the temperature of a Bluetooth thermometer using gatttool, but I don't know how to work with the indicate property. I am able to connect to the device, get the device…
Daniel Santos
  • 881
  • 2
  • 9
  • 17