- 积分
- 835
- 金钱
- 811
- 威望
- 0
- 贡献
- 0
- HASS币
- 0
高级会员
- 积分
- 835
- 金钱
- 811
- HASS币
- 0
|
发表于 2022-7-10 00:39:00
|
显示全部楼层
本帖最后由 qings 于 2022-7-10 00:40 编辑
:
Connection in progress...
Successful connection!
Authentication in progress...
Traceback (most recent call last):
File "/root/esp/get_beacon_key.py", line 159, in <module>
main(sys.argv)
File "/root/esp/get_beacon_key.py", line 155, in main
get_beacon_key(mac, product_id)
File "/root/esp/get_beacon_key.py", line 113, in get_beacon_key
peripheral.writeCharacteristic(HANDLE_AUTH_INIT, MI_KEY1, "true")
File "/usr/local/lib/python3.10/dist-packages/bluepy/btle.py", line 543, in writeCharacteristic
return self._getResp('wr')
File "/usr/local/lib/python3.10/dist-packages/bluepy/btle.py", line 407, in _getResp
resp = self._waitResp(wantType + ['ntfy', 'ind'], timeout)
File "/usr/local/lib/python3.10/dist-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)
! Press the "Pair" button at the dimmer...
Connecting... done
Authenticating...Traceback (most recent call last):
File "/root/esp/yeelight-dimmer-python/demo.py", line 93, in <module>
main()
File "/root/esp/yeelight-dimmer-python/demo.py", line 82, in main
if not dimmer.auth():
File "/root/esp/yeelight-dimmer-python/YeelightDimmer.py", line 124, in auth
self.peripheral.writeCharacteristic(self.HANDLE_AUTH_INIT, self.XIAOMI_KEY1, True)
File "/usr/local/lib/python3.10/dist-packages/bluepy/btle.py", line 543, in writeCharacteristic
return self._getResp('wr')
File "/usr/local/lib/python3.10/dist-packages/bluepy/btle.py", line 407, in _getResp
resp = self._waitResp(wantType + ['ntfy', 'ind'], timeout)
File "/usr/local/lib/python3.10/dist-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)
了解下无法获取密钥无头绪
|
|