获取设备信息
设备信息模型说明
- IDOGetDeviceInfoBluetoothModel
参数 | 说明 | 备注 |
---|---|---|
mode | 设备模式 | int |
battStatus | 电量状态 | 0x0:正常,0x01:正在充电,0x02:充满,0x03:电量低 |
battLevel | 电量级别 | 0~100 |
rebootFlag | 是否重启 | int |
bindTimeStr | 绑定时间戳 | str |
bindState | 绑定状态 | int |
bindType | 绑定类型 | 0x00默认(注意以前ID号定制),超时时间无效, 0x01(单击[按键在下面]), 0x02(为长按[按键在下面]), 0x03(屏幕点击 横向确认和取消,确认在左边), 0x04(屏幕点击 横向确认和取消,确认在右边), 0x05(屏幕点击 竖向确认和取消,确认在上边), 0x06(屏幕点击 竖向确认和取消,确认在下边), 0x07点击(右边一个按键) |
bindTimeout | 绑定超时 | 最长为15秒,0表示不超时 |
platform | 手环的平台 | 0:nordic,10:realtek 8762x,20:cypress psoc6,30:Apollo3
40:汇顶,50:nordic+泰凌微,60:泰凌微+5340+no nand flash,70:汇顶+富瑞坤;80:5340 |
isSyncConfig | 是否同步过配置 | bool |
authCodeError | 绑定加密授权码错误 | bool |
deviceShapeType | 设备形状类型 | 0:无效;1:圆形;2:方形的; 3:椭圆 |
deviceType | 设备类型 | 0:无效;1:手表;2:手环 |
dialMainVersion | 自定义表盘主版本 | 从1开始 0:不支持 |
showBindChoiceUi | 固件绑定时候显示勾ui界面 | 0:不需要 1:需要 |
masterDevice | 主账号设备 | 主账号设备 : 1 子账号设备 : 2 |
deviceBtName | 设备bt名字 | str |
命令代码
Objc:
[IDOFoundationCommand getDeviceInfoCommand:^(int errorCode, IDOGetDeviceInfoBluetoothModel * _Nullable data) {
if (errorCode == 0) {
//获取成功
}else if (errorCode == 6) {
//设备不支持
}else {
//获取失败
}
}];
Swift:
IDOFoundationCommand.getDeviceInfoCommand { (errorCode, model) in
if errorCode == 0 {
//获取成功
}else if errorCode == 6 {
//设备不支持
}else {
//获取失败.
}
};