redphx / poc-tuya-ble-fingerbot

[Proof of Concept] Control Fingerbot with Tuya BLE
35 stars 9 forks source link

pygatt.exceptions.NotConnectedError #9

Open exclusives opened 1 year ago

exclusives commented 1 year ago

extract.py worked successfully, but then problems started.. Do I need to remove the device from the cloud and reset it to factory settings?
I'm trying to run this script from under raspberry3

python3 finger_me.py
Can't get device info: No such device
Traceback (most recent call last):
  File "/home/zq1user/.local/lib/python3.9/site-packages/pygatt/backends/gatttool/gatttool.py", line 415, in connect
    self.sendline(cmd)
  File "/usr/lib/python3.9/contextlib.py", line 124, in __exit__
    next(self.gen)
  File "/home/zq1user/.local/lib/python3.9/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/home/zq1user/.local/lib/python3.9/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/zq1user/tuya/finger_me.py", line 32, in <module>
    fingerbot.connect()
  File "/home/zq1user/tuya/pyfingerbot/__init__.py", line 288, in connect
    self.device = self.adapter.connect(self.mac, address_type=pygatt.BLEAddressType.public)
  File "/home/zq1user/.local/lib/python3.9/site-packages/pygatt/backends/gatttool/gatttool.py", line 421, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to DC:23:4F:74:17:62 after 5.0 seconds.
goodman3654 commented 8 months ago

Same problem here, any update?

goodman3654 commented 8 months ago

I tried run the same code on another computer and it worked! It seems to be a Bluetooth compatibility issue.