Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluetooth command failed (code: 3, error: Attribute can't be written) #11

Open
carbolymer opened this issue Mar 23, 2021 · 0 comments
Open

Comments

@carbolymer
Copy link

I'm getting similar error to drndos/mikettle-ha#3 (comment) in my HA. So I went further and I'm trying to troubleshoot the root cause.

I'm trying to run demo.py but I'm getting the following error:

$ python demo.py connect AB:CD:EF:12:34:56 275
DEBUG:mikettle.mikettle:Init Mikettle with mac AB:CD:EF:12:34:56 and pid 275
Authenticating
Getting data from mi Kettle
Traceback (most recent call last):
  File "/tmp/mikettle/mikettle/demo.py", line 78, in <module>
    main()
  File "/tmp/mikettle/mikettle/demo.py", line 74, in main
    args.func(args)
  File "/tmp/mikettle/mikettle/demo.py", line 46, in connect
    print("FW: {}".format(kettle.firmware_version()))
  File "/tmp/mikettle/mikettle/mikettle/mikettle.py", line 99, in firmware_version
    self.auth()
  File "/tmp/mikettle/mikettle/mikettle/mikettle.py", line 181, in auth
    self._p.writeCharacteristic(_HANDLE_AUTH_INIT, _KEY1, "true")
  File "/tmp/mikettle/venv/lib/python3.9/site-packages/bluepy/btle.py", line 543, in writeCharacteristic
    return self._getResp('wr')
  File "/tmp/mikettle/venv/lib/python3.9/site-packages/bluepy/btle.py", line 407, in _getResp
    resp = self._waitResp(wantType + ['ntfy', 'ind'], timeout)
  File "/tmp/mikettle/venv/lib/python3.9/site-packages/bluepy/btle.py", line 368, in _waitResp
    raise BTLEGattError("Bluetooth command failed", resp)
bluepy.btle.BTLEGattError: Bluetooth command failed (code: 3, error: Attribute can't be written)

@djmalin, how did you fix your your issue?
Any ideas what might be wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant