Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/187.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android MiBand身份验证-颤振_Android_Flutter_Bluetooth Lowenergy_Android Bluetooth_Android Ble - Fatal编程技术网

Android MiBand身份验证-颤振

Android MiBand身份验证-颤振,android,flutter,bluetooth-lowenergy,android-bluetooth,android-ble,Android,Flutter,Bluetooth Lowenergy,Android Bluetooth,Android Ble,我正在尝试对MIB5进行身份验证以向其发送请求。我关注这篇文章 但我就是做不好 在我发送[0x01,0x08,SECRET_KEY]作为响应之后,我得到的是[16,1,129],而不是[16,1,1] 然后,如果我尝试发送[0x02,0x08],我会得到我应该得到的[16,2,1] 在我发送[0x03,0x08,加密的随机数]之后,我得到了[16,3,7]或[16,3,8],而我本应该得到[16,3,1] 这篇文章是专门讨论MiBand2的,所以在新版本中可能会有什么变化 List<i

我正在尝试对MIB5进行身份验证以向其发送请求。我关注这篇文章

但我就是做不好

在我发送[0x01,0x08,SECRET_KEY]作为响应之后,我得到的是[16,1,129],而不是[16,1,1]

然后,如果我尝试发送[0x02,0x08],我会得到我应该得到的[16,2,1]

在我发送[0x03,0x08,加密的随机数]之后,我得到了[16,3,7]或[16,3,8],而我本应该得到[16,3,1]

这篇文章是专门讨论MiBand2的,所以在新版本中可能会有什么变化

  List<int> _key = [
    0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x40,0x41,0x42,0x43,0x44,0x45];

  List<int> sendKey = [
    0x01,0x08,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x40,0x41,0x42,0x43,0x44,0x45
  ];

  await char.write(sendKey, withoutResponse: true);
  await char.write([0x02, 0x08], withoutResponse: true);
List\u key=[
0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x40,0x41,0x42,0x43,0x44,0x45];
列表发送键=[
0x01,0x08,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x40,0x41,0x42,0x43,0x44,0x45
];
wait char.write(sendKey,withoutResponse:true);
等待字符写入([0x02,0x08],无响应:true);