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
2
votes
0 answers

pip install PyBluez, error in installation

I want to use the Library bluetooth, for that I want to install PyBluez. But the following error occured: Running setup.py clean for PyBluez Failed to build PyBluez Installing collected packages: PyBluez Running setup.py install for PyBluez ...…
2
votes
0 answers

Python bluetooth advertising

I am looking for a way to send data over Bluetooth using python from 1 computer to another (windows is what I use but if it works with other computers that's great). I have looked into sockets but I would like to be more similar to a broadcast and…
Python 123
  • 59
  • 1
  • 13
2
votes
0 answers

Connect to Bluetooth HSP/HFP service from android

I'm trying to build an application which allows me to answer incoming phone calls from my PC, so far, i was able to advertise a service using Pybluez in Python. Now, How can i connect to that service from android?
Hossam
  • 21
  • 1
2
votes
0 answers

OSError in Pybluez library python

I would like to make a bluetooth communication using python3 (pyBluez0.23 module) I found on internet some tutorials which use the Pybluez library but this doesn't work for me. Find below the code for the server part : import bluetooth def…
siya
  • 43
  • 8
2
votes
1 answer

Installing pybluez through pip errors out

So I was trying to install a Bluetooth package for python through pip. I see that while downloading and installing, the gattlib package the installation errors out. Posting the log below. Any sort of help is appreciated. Pip version: pip 20.0.2 from…
Maneesh N
  • 43
  • 6
2
votes
2 answers

Getting error when i try to import bluetooth on python2.7

I got python2.7 installed on a raspeberry pi 4 with a script which use the bluethooth library(pybluez) but the script was crashing when importing the library. Si i simply try to import the bluetooth library on a python2.7 shell and i have the same…
Mat
  • 31
  • 1
  • 3
2
votes
0 answers

How to fix OSError: >;CG5= in python pybluez socket?

I have the code: import bluetooth, socket addr = '70:4E:ED:20:E0:9C' port = 1 s = bluetooth.BluetoothSocket( bluetooth.RFCOMM ) s.connect( (addr, port) ) and I get OSError: Traceback (most recent call last): File "example.py", line 5, in
pinkcat
  • 327
  • 4
  • 17
2
votes
0 answers

After accepting a connection, my STREAM socket gives the error 103 after just 30 seconds

I am trying the develop a program (in python 3) in which it is possible to transfer a certain amount of data from a computer to another with bluetooth (using pybluez). After a client connects to the device, for some reason, the server side of the…
David Martins
  • 63
  • 2
  • 7
2
votes
1 answer

Setting up GATT server using bluetoothctl tool

I'm able to set up GATT services and characteristics with the latest bluetoothctl tool using the following commands: register-service, register-characteristic, register-application I was just wondering if there is a way to define GATT-based…
2
votes
1 answer

How can I use rfcomm to connect to multiple android smartphones to my Raspberry Pi 3?

I am trying to connect my Raspberry Pi 3 to three android phones through Bluetooth. I want to use the input of the phones in a python code, but before I start coding I have to make sure I can connect all three phones to the Raspberry Pi 3. The…
Rishaal
  • 158
  • 13
2
votes
2 answers

Can't install gattlib on Raspberry Pi: error: stray ‘\xxx’ in program on usr/include/boost/... hpp files

I read all the other Q&A about the stray error, but I couldn't find anything similar to my issue... So: I need to add BLE support to pybluez on Raspberry Pi 3 Model B (running on Raspbian Jessie Lite kernel v.4.4) and, when it comes to build…
lbrutti
  • 1,181
  • 13
  • 19
2
votes
1 answer

How to resolve conflicts between bluez5 & pybluez

I have a Yocto-based Linux image for a Gumstix board. The image includes the Bluez5 Bluetooth stack. local.conf: ... DISTRO_FEATURES_append = " bluetooth bluez5" ... This successfully builds an image where I can use the Bluetooth module from the…
RadioRaheem
  • 198
  • 1
  • 14
2
votes
0 answers

Python - importing module with Glib mainloop

I'm using pygattlib to interface with Bluetooth device in Python. It works just fine, but the problem occurs when I try to use DBus in my code. If I import gattlib and GLib.MainLoop().run(), the program freezes when calling run(). I found that…
Blagus
  • 65
  • 1
  • 8
2
votes
1 answer

PyBluez pairing bluetooth device

How do I initiate pairing of a bluetooth device with PyBluez in Python? I see ways to discover, but not pair.
MatBee
  • 284
  • 6
  • 16
2
votes
0 answers

PyBluez examples yells OsError on Windows

I've just installed PyBluez on my windows 8 laptop, and I've tried to launch the module examples to test if it works properly. When I run the examples/simple/inquiry.py file I get the following…
MartinPJorge
  • 121
  • 3
1 2
3
10 11