Comments (15)
请检查认证芯片硬件连接
from mijia_ble_secure.
检查代码和硬件连接后发现是软件上HAVE_MSC定义是0,改成2之后log反馈下述错误:
from mijia_ble_secure.
- 默认工程配置 HAVE_MSC 是 1。(如果缺省宏定义,才会采用 mi_config.h 中默认值)
- IIC 通信不正常,芯片地址发送后无应答
ADDR_NACK
- 显示的错误为 MJSC 长度非法,而 HAVE_MSC 配置为 2 为 MJAC,与所述不符请检查工程配置。
- 请先仔细阅读 米家高安全级接入产品开发 文档再进行开发。
from mijia_ble_secure.
我们硬件加密芯片选用的MJA1,上述故障原因是没有在宏中将数值改为2,修正后上述问题OK。
用小米手机连接设备提示输入配对码,在RTT中输入配对码提示配对码失败。
from mijia_ble_secure.
从 log 看配对码只输入了 5 位,请重新输入后再试
from mijia_ble_secure.
截图有误,上述附图已更正,反复测试还是配对失败
from mijia_ble_secure.
环境描述
SoC SDK 版本:?
mijia ble libs 版本:?
app 正式版 or Beta (绑定流程开始是否提示输入安全码) ?
设备注册流程的完整 log (粘贴字符即可)?
from mijia_ble_secure.
环境描述
SoC SDK 版本:15.30
mijia ble libs 版本:0001
app版本:beta版本 5.5.10
RTT viewer log信息:
0> [I] secure auth: MSC self test: PASS
0> [I] : USER CUSTOM CALLBACK RECV EVT ID 15
0> [W] secure auth: monitor power off
0> <info> app: Connected.
0> [W] mi srv: Connected Peer MAC:
0> E7 07 E5 3D AF 48 |...=.H
0> [I] mi srv: default interval min: 45 ms, max: 45 ms
0> [I] mi srv: update interval max: 30 ms, min: 30 ms
0> [I] mi srv: update interval max: 7 ms, min: 7 ms
0> [I] mi srv: update interval max: 30 ms, min: 30 ms
0> [W] secure auth: START 0x00000110
0>
0> [I] MSC: Initiate CMD 0x3B @ schd_ticks 7
0> [I] MSC: Waiting... @ schd_ticks 7
0> [I] MSC: Ready now. @ schd_ticks 10
0> [I] MSC: Finish CMD 0x3B @ schd_ticks 10
0>
0> [I] MSC: Initiate CMD 0x01 @ schd_ticks 10
0> [I] MSC: Waiting... @ schd_ticks 10
0> [I] MSC: Ready now. @ schd_ticks 11
0> [I] MSC: Finish CMD 0x01 @ schd_ticks 11
0>
0> [I] MSC: Initiate CMD 0x2B @ schd_ticks 11
0> [I] MSC: Waiting... @ schd_ticks 11
0> [I] MSC: Ready now. @ schd_ticks 12
0> [I] MSC: Finish CMD 0x2B @ schd_ticks 12
0>
0> [I] MSC: Initiate CMD 0x2A @ schd_ticks 12
0> [I] MSC: Waiting... @ schd_ticks 12
0> [I] MSC: Ready now. @ schd_ticks 13
0> [I] MSC: Finish CMD 0x2A @ schd_ticks 13
0>
0> [I] MSC: Initiate CMD 0x20 @ schd_ticks 13
0> [I] MSC: Waiting... @ schd_ticks 13
0> [I] MSC: Ready now. @ schd_ticks 17
0> [I] MSC: Finish CMD 0x20 @ schd_ticks 17
0>
0> [I] MSC: Initiate CMD 0x21 @ schd_ticks 17
0> [I] MSC: Waiting... @ schd_ticks 17
0> [I] MSC: Ready now. @ schd_ticks 22
0> [I] MSC: Finish CMD 0x21 @ schd_ticks 22
0>
0> [I] secure auth: app_pub Received @ schd_ticks 45
0> [I] MSC: Initiate CMD 0x14 @ schd_ticks 46
0> [I] MSC: Waiting... @ schd_ticks 46
0> [I] MSC: Ready now. @ schd_ticks 51
0> [I] MSC: Finish CMD 0x14 @ schd_ticks 51
0>
0> [I] MSC: Initiate CMD 0x10 @ schd_ticks 51
0> [I] MSC: Waiting... @ schd_ticks 51
0> [I] MSC: Ready now. @ schd_ticks 55
0> [I] MSC: Finish CMD 0x10 @ schd_ticks 55
0>
0> [I] MSC: Initiate CMD 0x03 @ schd_ticks 55
0> [I] MSC: Waiting... @ schd_ticks 55
0> [I] MSC: Ready now. @ schd_ticks 55
0> [I] MSC: Finish CMD 0x03 @ schd_ticks 55
0>
0> [I] secure auth: dev_info, dev_pub sent @ schd_ticks 83
0> [I] secure auth: dev_cert sent @ schd_ticks 140
0> [I] secure auth: manu_cert sent @ schd_ticks 194
0> [I] secure auth: dev_sign sent @ schd_ticks 227
0> [I] : USER CUSTOM CALLBACK RECV EVT ID 14
0> [I] : App selected IO cap is 0x0001
0> [I] : Please input your pair code ( MUST be 6 digits ) :
< 30 37 36 33 36 36
0> [I] secure auth: dev_confirmation sent @ schd_ticks 1576
0> [I] secure auth: app_confirmation received @ schd_ticks 1601
0> [I] secure auth: dev_random sent @ schd_ticks 1621
0> [W] mi srv: NON-START OPCODE 0x00000014
0> [I] secure auth: app_random received @ schd_ticks 1649
0> [E] secure auth: Confirmation failed.
0> [I] : USER CUSTOM CALLBACK RECV EVT ID 2
0> [W] secure auth: monitor power off
0> <info> app: Disconnected.
0> [W] mi srv: Disconnect reason 13.
0> [I] : Tue Jun 25 03:58:47 2019
from mijia_ble_secure.
这个 libs 版本格式不对,正确格式应该是 X.X.X_XXXX
系统上电后,会自动打印以下信息,比如
mijia libs: 2.1.11_0001
have msc: 2
product ID: 463
你把这个完整 log 发出来吧
from mijia_ble_secure.
完整log信息如下:
0> [I] : Compiled Jun 25 2019 11:57:47
0> [I] : advertising init...
0> 02 01 06 11 16 95 FE 30|.......0
0> 54 12 01 01 6F DB AB 12|T...o...
0> 27 C6 2D 01 00 |'.-..
0> [D] : adv len 21, scan len 0
0> [D] mi srv: mijia libs : 2.1.11_0001
0> [D] mi srv: have msc : 2
0> [D] mi srv: product ID : 274
0> [D] mi srv: mi service init ... srv 32, char 48
0> [I] mi srv: mi service init succ.
0> [I] mi srv: chars value handle list
0> version : 16
0> ctrl point : 18
0> secure auth : 21
0> ota ctrl point : 24
0> ota data : 27
0> <info> app: MI PSM INIT SUCCESS
0>
0> [W] secure auth: START 0x000000A2
0>
0> [D] lock: lock service init ... srv 32, char 48
0> [I] lock: lock service init succ.
0> [I] lock: char value handle list
0> operation : 31
0> state : 33
0> logs : 36
0> [D] stdio: stdio service init ... srv 32, char 48
0> [I] stdio: stdio service init succ.
0> [I] stdio: char value handle list
0> rx : 40
0> tx : 42
0> [I] MSC: Initiate CMD 0x2B @ schd_ticks 7
0> [I] MSC: Waiting... @ schd_ticks 7
0> [I] MSC: Ready now. @ schd_ticks 8
0> [I] MSC: Finish CMD 0x2B @ schd_ticks 8
0>
0> [I] MSC: Initiate CMD 0x2A @ schd_ticks 8
0> [I] MSC: Waiting... @ schd_ticks 8
0> [I] MSC: Ready now. @ schd_ticks 9
0> [I] MSC: Finish CMD 0x2A @ schd_ticks 9
0>
0> [I] MSC: Initiate CMD 0x29 @ schd_ticks 9
0> [I] MSC: Waiting... @ schd_ticks 9
0> [I] MSC: Ready now. @ schd_ticks 10
0> [I] MSC: Finish CMD 0x29 @ schd_ticks 10
0>
0> [I] MSC: Initiate CMD 0x22 @ schd_ticks 10
0> [I] MSC: Waiting... @ schd_ticks 10
0> [I] MSC: Ready now. @ schd_ticks 14
0> [I] MSC: Finish CMD 0x22 @ schd_ticks 14
0>
0> [I] MSC: Initiate CMD 0x21 @ schd_ticks 14
0> [I] MSC: Waiting... @ schd_ticks 14
0> [I] MSC: Ready now. @ schd_ticks 18
0> [I] MSC: Finish CMD 0x21 @ schd_ticks 18
0>
0> <info> app: Connected.
0> [W] mi srv: Connected Peer MAC:
0> 5A 71 DE 32 C5 5A |Zq.2.Z
0> [I] mi srv: default interval min: 45 ms, max: 45 ms
0> [I] mi srv: update interval max: 30 ms, min: 30 ms
0> [I] mi srv: update interval max: 7 ms, min: 7 ms
0> [I] mi srv: update interval max: 30 ms, min: 30 ms
0> [W] secure auth: START 0x00000110
0>
0> [I] MSC: Initiate CMD 0x3B @ schd_ticks 7
0> [I] MSC: Waiting... @ schd_ticks 7
0> [I] MSC: Ready now. @ schd_ticks 10
0> [I] MSC: Finish CMD 0x3B @ schd_ticks 10
0>
0> [I] MSC: Initiate CMD 0x01 @ schd_ticks 10
0> [I] MSC: Waiting... @ schd_ticks 10
0> [I] MSC: Ready now. @ schd_ticks 11
0> [I] MSC: Finish CMD 0x01 @ schd_ticks 11
0>
0> [I] MSC: Initiate CMD 0x2B @ schd_ticks 11
0> [I] MSC: Waiting... @ schd_ticks 11
0> [I] MSC: Ready now. @ schd_ticks 12
0> [I] MSC: Finish CMD 0x2B @ schd_ticks 12
0>
0> [I] MSC: Initiate CMD 0x2A @ schd_ticks 12
0> [I] MSC: Waiting... @ schd_ticks 12
0> [I] MSC: Ready now. @ schd_ticks 13
0> [I] MSC: Finish CMD 0x2A @ schd_ticks 13
0>
0> [I] MSC: Initiate CMD 0x20 @ schd_ticks 13
0> [I] MSC: Waiting... @ schd_ticks 13
0> [I] MSC: Ready now. @ schd_ticks 17
0> [I] MSC: Finish CMD 0x20 @ schd_ticks 17
0>
0> [I] MSC: Initiate CMD 0x21 @ schd_ticks 17
0> [I] MSC: Waiting... @ schd_ticks 17
0> [I] MSC: Ready now. @ schd_ticks 22
0> [I] MSC: Finish CMD 0x21 @ schd_ticks 22
0>
0> [I] secure auth: app_pub Received @ schd_ticks 36
0> [I] MSC: Initiate CMD 0x14 @ schd_ticks 37
0> [I] MSC: Waiting... @ schd_ticks 37
0> [I] MSC: Ready now. @ schd_ticks 42
0> [I] MSC: Finish CMD 0x14 @ schd_ticks 42
0>
0> [I] MSC: Initiate CMD 0x10 @ schd_ticks 42
0> [I] MSC: Waiting... @ schd_ticks 42
0> [I] MSC: Ready now. @ schd_ticks 46
0> [I] MSC: Finish CMD 0x10 @ schd_ticks 46
0>
0> [I] MSC: Initiate CMD 0x03 @ schd_ticks 46
0> [I] MSC: Waiting... @ schd_ticks 46
0> [I] MSC: Ready now. @ schd_ticks 46
0> [I] MSC: Finish CMD 0x03 @ schd_ticks 46
0>
0> [I] secure auth: dev_info, dev_pub sent @ schd_ticks 77
0> [I] secure auth: dev_cert sent @ schd_ticks 140
0> [I] secure auth: manu_cert sent @ schd_ticks 194
0> [I] secure auth: dev_sign sent @ schd_ticks 224
0> [I] : USER CUSTOM CALLBACK RECV EVT ID 14
0> [I] : App selected IO cap is 0x0001
0> [I] : Please input your pair code ( MUST be 6 digits ) :
< 30 32 36 38 38 31
0> [I] secure auth: dev_confirmation sent @ schd_ticks 1456
0> [I] secure auth: app_confirmation received @ schd_ticks 1484
0> [I] secure auth: dev_random sent @ schd_ticks 1516
0> [W] mi srv: NON-START OPCODE 0x00000014
0> [I] secure auth: app_random received @ schd_ticks 1541
0> [E] secure auth: Confirmation failed.
0> [I] : USER CUSTOM CALLBACK RECV EVT ID 2
0> [W] secure auth: monitor power off
0> <info> app: Disconnected.
0> [W] mi srv: Disconnect reason 13.
from mijia_ble_secure.
你确定你们的 PID 是 274 ?
from mijia_ble_secure.
原本米家平台分发的PID是1201,但是按此ID写入后(已更换新的MJA1),直接报-27
log信息如下:
0> [I] : Compiled Jun 25 2019 14:09:44
0> [I] : advertising init...
0> 02 01 06 11 16 95 FE 30|.......0
0> 54 01 12 01 6F DB AB 12|T...o...
0> 27 C6 2D 01 00 |'.-..
0> [D] : adv len 21, scan len 0
0> [D] mi srv: mijia libs : 2.1.11_0001
0> [D] mi srv: have msc : 2
0> [D] mi srv: product ID : 4609
0> [D] mi srv: mi service init ... srv 32, char 48
0> [I] mi srv: mi service init succ.
0> [I] mi srv: chars value handle list
0> version : 16
0> ctrl point : 18
0> secure auth : 21
0> ota ctrl point : 24
0> ota data : 27
0> app: MI PSM INIT SUCCESS
0>
0> [W] secure auth: START 0x000000A2
0>
0> [D] lock: lock service init ... srv 32, char 48
0> [I] lock: lock service init succ.
0> [I] lock: char value handle list
0> operation : 31
0> state : 33
0> logs : 36
0> [D] stdio: stdio service init ... srv 32, char 48
0> [I] stdio: stdio service init succ.
0> [I] stdio: char value handle list
0> rx : 40
0> tx : 42
0> [I] MSC: Initiate CMD 0x2B @ schd_ticks 7
0> [I] MSC: Waiting... @ schd_ticks 7
0> [I] MSC: Ready now. @ schd_ticks 8
0> [I] MSC: Finish CMD 0x2B @ schd_ticks 8
0>
0> [I] MSC: Initiate CMD 0x2A @ schd_ticks 8
0> [I] MSC: Waiting... @ schd_ticks 8
0> [I] MSC: Ready now. @ schd_ticks 9
0> [I] MSC: Finish CMD 0x2A @ schd_ticks 9
0>
0> [I] MSC: Initiate CMD 0x29 @ schd_ticks 9
0> [I] MSC: Waiting... @ schd_ticks 9
0> [I] MSC: Ready now. @ schd_ticks 10
0> [I] MSC: Finish CMD 0x29 @ schd_ticks 10
0>
0> [I] MSC: Initiate CMD 0x22 @ schd_ticks 10
0> [I] MSC: Waiting... @ schd_ticks 10
0> [I] MSC: Ready now. @ schd_ticks 14
0> [I] MSC: Finish CMD 0x22 @ schd_ticks 14
0>
0> [I] MSC: Initiate CMD 0x21 @ schd_ticks 14
0> [I] MSC: Waiting... @ schd_ticks 14
0> [I] MSC: Ready now. @ schd_ticks 18
0> [I] MSC: Finish CMD 0x21 @ schd_ticks 18
0>
0> app: Connected.
0> [W] mi srv: Connected Peer MAC:
0> 6A 92 FF A3 4C 4D |j...LM
0> [I] mi srv: default interval min: 45 ms, max: 45 ms
0> [I] mi srv: update interval max: 30 ms, min: 30 ms
0> [I] mi srv: update interval max: 7 ms, min: 7 ms
0> [I] mi srv: update interval max: 30 ms, min: 30 ms
0> [W] mi srv: NON-START OPCODE 0xDE85CA90
0> app: Disconnected.
0> [W] mi srv: Disconnect reason 13.
0> [I] : Tue Jun 25 06:10:44 2019
0> [I] : Tue Jun 25 06:11:44 2019
0> [I] : Tue Jun 25 06:12:44 2019
0> app: Connected.
0> [W] mi srv: Connected Peer MAC:
0> 6A 92 FF A3 4C 4D |j...LM
0> [I] mi srv: default interval min: 45 ms, max: 45 ms
0> [I] : Tue Jun 25 06:13:44 2019
0> [I] mi srv: update interval max: 30 ms, min: 30 ms
0> [I] mi srv: update interval max: 7 ms, min: 7 ms
0> [I] mi srv: update interval max: 30 ms, min: 30 ms
0> [W] mi srv: NON-START OPCODE 0xDE85CA90
0> app: Disconnected.
0> [W] mi srv: Disconnect reason 13.
from mijia_ble_secure.
- 所有数值默认是十进制,若为十六进制则会以 0xXX 的格式表示。
- 产品注册生成的 PID 是 1201,log 中显示 PID 为 4609;这明显有问题啊
(猜测你是把 PID 填写成了 0x1201 = 4609,导致 PID 和后台对不上)
这种低级错误其实你自己检查就可以发现,以后能不能先思考一下再来提问?
from mijia_ble_secure.
感谢指正,问题已修复,关闭问题
from mijia_ble_secure.
所有数值默认是十进制,若为十六进制则会以 0xXX 的格式表示。
产品注册生成的 PID 是 1201,log 中显示 PID 为 4609;这明显有问题啊
(猜测你是把 PID 填写成了 0x1201 = 4609,导致 PID 和后台对不上)
这种低级错误其实你自己检查就可以发现,以后能不能先思考一下再来提问?
from mijia_ble_secure.
Related Issues (20)
- 开发蓝牙加密门锁遇到异常,米家APP无法发现设备 HOT 2
- 门锁调试apk连接高安全门锁时连接失败,安全认证失败,错误代码-28 HOT 5
- 新产品绑定时提示安全验证失败-26 HOT 4
- 设备恢复出厂设置,APP提示未找到门锁 HOT 1
- GATT协议里的lock service的UUID固定吗?characteristic能增加自定义项吗? HOT 1
- 检测不到蓝牙设备 HOT 3
- 米家服务stdio无法通讯报error HOT 8
- 无法检测到设备 HOT 12
- 目前ble模块只能发送和接收小于等于14个字节的数据,请问下这个限制可以改吗?怎么改? HOT 1
- 确定加密芯片引脚
- 加密芯片自检不通过
- 加密芯片自检无法通过
- 新产品注册绑定时提示安全验证失败-28 HOT 1
- 蓝牙锁安全验证 HOT 2
- 蓝牙锁一次性密码获取 HOT 2
- OTA疑问 HOT 2
- MHCB03P 蓝牙模组是否支持安全芯片 HOT 1
- 事件消息接收异常 HOT 1
- IOS绑定失败无错误码 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mijia_ble_secure.