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

Why i get error using accept() method in pybluez?

I wanna make a simple connection between raspberry and phone but every time i write .accept() i get [Errno 77] File descriptor in bad state. Here is the code: import bluetooth s = bluetooth.BluetoothSocket(bluetooth.RFCOMM) port = 19 host =…
Mihai
  • 3
  • 1
0
votes
2 answers

Installing PyBluez via pip and troubles with import

I'm have to do something using a Pybluez, I had errors on my code, so I told myself to start with "code example" what is in Pybluez, but I have errors in example too. This is the example: #!/usr/bin/env python3 import bluetooth server_sock =…
0
votes
0 answers

Recording data from ESP32 to Python Script using Pybluez

I am using PyBluez 0.22 to send data from ESP32 to Python via Bluetooth. So far I have been receiving the data but it is not in the form it. Here is my code from bluetooth import * import sys def input_and_send(): print("\nType something\n") …
0
votes
1 answer

Using a custom UUID when connecting an Android phone and a Raspberry Pi through bluetooth

I created a custom app to connect via bluetooth to my Raspberry Pi. All it does is it scans for bluetooth devices and connects to them through an RFCOMM socket. As per this Android documentation I have the following code when creating the socket on…
santiago
  • 93
  • 7
0
votes
2 answers

Pybluez on Nano: SDP can’t be generated

I had an issue like this on my Nano: profiles = [ SERIAL_PORT_PROFILE ], File "/usr/lib/python2.7/site-packages/bluetooth/bluez.py", line 176, in advertise_service raise BluetoothError (str (e)) bluetooth.btcommon.BluetoothError: (2, 'No such…
ucefM
  • 21
  • 2
0
votes
0 answers

Recording audio and sending data in real time through bluetooth on raspberry pi zero

I am trying to record audio on raspberry pi zero and want to transfer the audio data in real time through Bluetooth (Classic or BLE) to an android application . I have created a GATT server referring to Bluez example code but given the amount of…
0
votes
0 answers

Why are there two different socket options (RFCOMM and L2CAP) in BlueZ?

I'm doing bluetooth socket programming, and I have few questions about sockets provided by BlueZ. When we're dealing with TCP/IP socket programming, we can usually choose either TCP or UDP as our transport protocol. As far as I know, these two…
KaiwenJon
  • 1
  • 1
0
votes
1 answer

discover bluetooth devices without devices that already i did paired with those

I want to discover Bluetooth devices without devices that already I have already paired. But my python script shows the Bluetooth device that are ON + the device sthat I have paired with. How I can filter just devices that are ON and ignore the…
0
votes
2 answers

How to get/set Bluetooth MTU value in Linux with command line tool (hciconfig/bluetoothctl)

I'm developing an embedded Linux device as a BLE peripheral to communicate to Android App. I start from the github project python-gatt-server. Now there's some throughput bottleneck and I doubt it's about MTU setting. The output of hciconfig is as…
Qiao
  • 452
  • 5
  • 15
0
votes
1 answer

Issues with IOBluetooth

I have a few questions regarding IOBluetooth framework which are listed below. I currently have one MacBook Pro (13-inch, 2018) running Big Sur v11.1 and when I call inquiries and attempt to find nearby devices it often fails and does not work…
johnnyboy
  • 33
  • 6
0
votes
0 answers

Sending files over bluetooth using PyBluez and PyOBEX

I'm trying to send a file from my laptop(win10) to my mobile(android) over bluetooth. I followed this answer and I'm doing the same with python 3.6 I'm using PyOBEX Python 3 Package and this is what I've tried. import sys from PyOBEX.client import…
mplusr
  • 151
  • 15
0
votes
2 answers

How to discover a device quickly with BlueZero?

I have an Ubuntu PC that I want to connect to an advertising microcontroller (nrf52840) using python. They connect just fine when the PC has already discovered the microcontroller using a command line tool like bluetoothctl. The issue is when the…
Connor L
  • 11
  • 3
0
votes
1 answer

PyBluez for Windows 10?

I'm trying to run a server - client application using PyBluez (0.23) with Python (3.9) but I can't make it work. I've been reading comments from users that mention that PyBluez has no support for windows 10. Is this true? If so, the only alternative…
dmta24
  • 1
  • 1
0
votes
3 answers

Unable to install PyBluez in windows 10 on python 3.8

When I try to install PyBluez on my PC, it displays to an error as shown below. I have installed a C++ compiler. I don't know what the problem is and how to fix it. I even tried to download a zip from their Github and then tried to install I used…
Guneet Singh
  • 11
  • 1
  • 2
0
votes
1 answer

How to recieve data from BT module (HC-05) by using python on Windows 10?

I am trying to receive GPS data from my HC-05 bluetooth module. I can see complete data in any serial plotter program, however I need to use Python executable for my Raspberry PI. I have tried below code that I found from internet; """ A simple…
Ali Ülkü
  • 86
  • 1
  • 9