Open baudneo opened 3 months ago
timeout error pcap, btmon
and bluetoothctl
logs ->
plug-connect_timeout.pcapng.txt btctl.timeout.log btmon.timeout.log
write not permitted logs ->
btmon.writenotpermitted.log btctl.writenotpermitted.log write-not-permitted.pcapng.txt
The packet logs for the timeout error also have the write not permitted error, so I'm guessing it is the same problem causing both exceptions.
The write not permitted error is coming from the device you are connecting to when trying to write the Client Characteristic Configuration descriptor for one of the characteristics. So either this needs some sort of authentication or the device is defective. In either case, similar to #972.
bluetoothctl -v
) in case of Linux: 5.66 and 5.72Description
I have tested this on 2 different machines. Each machine has a different bt adapter and different versions of bluez/kernels.
I can connect to other BT devices using bleak, it is just this specififc device. The device is a bluetooth/wifi telink device; Cync by GE smart plug. I can get a connection using
bluetoothctl
but I can not get a connection using bleak. There are a few different errors, I detail 3 of them below in logging.What I Did
The issue is with
BleakClient(mac_addr).connect()
, using a context manager and without. I am assuming this is some sort of bad device implementation? I am trying to get goodbluetoothctl
,btmon
and pcaps for each error.Logs
Here is my script output with
BLEAK_LOGGING=1
. I will detail a few different errors with this device.Timeout
The plug connects, throws some errors and disconnects
Write Not Permitted
Device connects, throws this specififc error and disconnects.
It may have been removed from BlueZ when scanning stopped
Device shows up in scans but is removed when scanning is aborted