26 questions
0
votes
0
answers
61
views
There is a double scan happening with my python Bluetooth scanner and I don't know why
I will provide my code. The primary purpose of this is vehicle identification. My only hypothesis is my laptop having multiple Bluetooth signals but it seems to happen for other devices as well. This ...
2
votes
1
answer
90
views
"Could not read characteristic handle 90: Protocol Error 0x0F: Insufficient Encryption", while reading the raw data from UUID characteristics
My aim is to develop a python script on Windows PC.
It should connect to a BLE gateway server (linux), read data, write data, via BLE. On Windows, Python bleak library currently has limited support ...
1
vote
1
answer
202
views
How can I hook a BT05 Bluetooth LE device to Python bleak on a raspberry PI
I want to send serial data with a BT05 serial Bluetooth LE device from a microcontroller to a Raspberry Pi 5 with Linux 6.6.51+rpt-rpi-2712. On the raspi I use the latest newest Python bleak version ...
0
votes
0
answers
96
views
Python Bluetooth unable to connect
I am facing a problem using pybluez2 for searching via bluetooth my device. So I used bleak and find it automatically, but I am not able to connect. Why?
I try to find my device and connect using only ...
0
votes
0
answers
61
views
WinRT pairing fails with error 19 the first time an attempt is made by a script
I'm using bleak and winRT to write a python application.
In this application the device should be paired and connected to a Windows Pc automatically after providing mac address and PIN.
The connection ...
0
votes
0
answers
48
views
Unable to set BLE Services and Characterstics
Hardware: ESP32 S3 XIAO Sense.
I am establishing a BLE server on ESP device. However, whatever UUIDs I may define for my services and characteristics for some reason they don't reflect and a constant ...
0
votes
0
answers
81
views
Bluetooth connectivity issues when connecting multiple Muse IMU devices with Python/Bleak
I'm currently am using python with bleak and I'm finding it difficult to connect and maintain a stable connection to multiple Bluetooth enabled imu devices (muse), especially when trying to connect ...
0
votes
0
answers
43
views
Running async function in FUSION Script File
I am creating a script file for to be used in fusion 360, when I try executing an async function some or other kinds of errors are sure to follow.
Following is a simpler version of one of my problems:
...
1
vote
1
answer
562
views
When using pygrabber and bleak together, the error "Thread is configured for Windows GUI but callbacks are not working." occurs
In the following Python code, whether or not the line from pygrabber.dshow_graph import FilterGraph is included determines whether an error occurs. If I do not include it, no error appears, but if I ...
0
votes
1
answer
135
views
Movesense Sensor Not Sending Data via Python Script but Works with Mobile App
I am working with a Movesense sensor and attempting to collect data using the Python script provided in the documentation. The path and commands I am using have been verified as correct according to ...
0
votes
2
answers
81
views
Await inside ctypes callback with loop already running
I need to perform a series of read/write tasks inside a ctypes callback function, but still inside an async task that is responsible for giving such read/write tasks:
async def main(ble_address):
...
0
votes
0
answers
66
views
Can't read weight measurement characteristic
I have a BLE enabled weight machine beurer BF950. I am unable to read weight data from it. From the company, an excel sheet is provided with mentioned UUIds. In the following code, it doesn't enter ...
1
vote
2
answers
899
views
ModuleNotFoundError: No module named 'winrt.windows.foundation.collections'
I have a Tkinter program that uses several libraries (matplotlib, numpy, pygame, …) as well as the bleak BLE library. I create an exe on windows using PyInstaller and most of the program works ...
1
vote
0
answers
39
views
android api call failed, not waiting for ('onCharacteristicRead', 42) using bleak in kivymd
I am making a kivymd app that uses bleak I send and read some characteristics everything works fine in pc but when I export the apk to android and test it on my phone I get this error : Exception ...
1
vote
1
answer
270
views
Bluetooth Low Energy filter devices based on services
I am a beginner with BLE/Bluetooth. I am trying to communicate with a BLE enabled device, which is using a CH9141K BLE-to-serial bridge. I've got my host application successfully talking to the device ...
0
votes
1
answer
158
views
BleakScanner timeout with asyncio.wait_for when function has returned
bleak version: 0.22.2
Python version: 3.8.18
Operating System: Linux
BlueZ version (bluetoothctl -v) in case of Linux: 5.64
Description
I have a BleakScanner with a timeout. The timeout still occured ...
0
votes
0
answers
64
views
Python Bleak Unittest: Try to connect to device once; run multiple tests
I have a BLE device. I want to connect to it, run all my tests then deconnect.
Here is what versions I'm using:
bleak: "0.22.2";
bleak-winrt: "1.2.0";
python_full_version: "3....
1
vote
0
answers
48
views
Set Target Inclination of Hometrainer with BLE
I'm currently trying to include the incline angle over BLE with the Fitness Machine Control Point characteristic with Python Bleak. I'm pretty sure that the correct characteristic is "00002ad9-...
0
votes
1
answer
979
views
Pair Bluetooth devices using Bleak
How can I pair a bluetooth device using bleak
I have developed a code for scanning of bluetooth devices nearby how can I pair devices.
This is a code written to scan bluetooth devices
from bleak ...
0
votes
0
answers
233
views
Using Bleak with threading in a PyQt/PySide application
I have a PyQt/PySide application where I use threads to process commands from a queue. In one thread, I need to use Bleak to work with BLE devices. Bleak is based on asyncio, and I am having trouble ...
0
votes
0
answers
147
views
Bluetooth BTLE: how to connect reliably to device
Problem: Connecting to a BTLE device succeeds about 1 out of 10 times. How can I improve this and reliably connect to the device?
I have a Sensirion SHT41x that I want to access via Bluetooth from my ...
0
votes
1
answer
235
views
Python Bleak Notifications With a BLE Rubik's Cube
I am using python 3.12 with bleak to try and communicate with a BLE rubik's cube. Currently all I can do is pull the model id with this code:
import asyncio
from bleak import BleakClient
address = &...
2
votes
0
answers
589
views
How to get device Bluetooth addresses in Python Bleak
I’m new to Bluetooth in Python so I’m not sure how to best phrase my question. The task I need to achieve, is I want to know whether a certain phone is in my vicinity through Bluetooth. I read Bleak’s ...
0
votes
0
answers
42
views
Converting Python byteArray to List of Integers for Writing to Bluetooth Characteristic in Flutter?
I'm using Python with the Bleak library to write a bytearray to a Bluetooth device characteristic. The bytearray I'm sending is
bytearray(b'3\x01\x00-\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\...
1
vote
1
answer
2k
views
Python with Bleak - Pair with a device that requires a pin
I'm attempting to read some characteristics from a Bluetooth device. The device requires a Pin to pair but I can't find any resources on how to enter a pin with python-bleak.
My code is below. It will ...
0
votes
1
answer
1k
views
BleakClient suggests "async with", but how can I get a handle that lasts beyond my code block?
I wrote a Python script using the bleak Bluetooth Low Energy client that works from a command line. I want to split the script into REST endpoints.
To that end, I want to replace async with ...