我试图将应用程序与Mi Band2连接并进行身份验证,但在最后一步(发送加密密钥并接收成功的身份验证响应)上,我会收到错误响应。第一步、第二步和第三步是成功的,没有例外。这是所有认证代码。
这里控制台中的所有调试消息:
Connected to MI Band 2
Level 1 started
Level 1 success
Received characteristic value: 16
Received SendKey: 1
Received Status: 1
Level 2 started
Level 2 success
Received characteristic value: 16
Received SendKey: 2
Received Status: 1
Level 3 started
Level 3 success
Received characteristic value: 16
Received SendKey: 3
Received Status: 4发布于 2018-04-25 15:12:17
当我在加密()中更改字符串时,问题得到了解决
byte[] secretKey = new byte[] { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45 };
IBuffer key = secretKey.AsBuffer();我想我的问题是密码不对。
https://stackoverflow.com/questions/50004193
复制相似问题