我已经通过movesense DFU机制安装了1.9.4 Movesense-hello_world_app.zip,更新成功。向 hello world 发出 GET 请求正常工作并得到以下响应。
[SDS RESPONSE] type: GET status: OK
header: {"TaskId": 46, "Content-Type": "application/json", "Uri": "suunto://184730000240/Sample/HelloWorld", "Content-Length": 41, "Reason": "OK", "Status": 200}
body: {"Content": {"Greeting": "Hello World!"}}
但是,订阅返回 404 错误。(以下是日志片段)
2019-11-17 17:25:42.719 18495-18538/com.project19.movesensor I/Komposti: [SDS REQUEST] type: POST uri: suunto://MDS/EventListener contract: {"Uri": "184730000240//Sample/HelloWorld/"}
2019-11-17 17:25:42.719 18495-18495/com.project19.movesensor D/StartTracking: success to access Hello world app
2019-11-17 17:25:42.719 18495-18542/com.project19.movesensor I/Komposti: Adding EventListener for path: 184730000240//Sample/HelloWorld/
2019-11-17 17:25:42.720 18495-18566/com.project19.movesensor D/BleManager: sendCb(10000001), 30 bytes
2019-11-17 17:25:42.737 18495-20297/com.project19.movesensor D/BleManager: Send complete
2019-11-17 17:25:42.806 18495-18610/com.project19.movesensor D/BleManager: Received data: WB_DATAMSG_CLIENT_ON_GET_RESOURCE_RESULT, type: 2, direct msg, msgLen: 8, reqId: 11776, size: 14
2019-11-17 17:25:42.806 18495-18542/com.project19.movesensor E/Komposti: [SDS RESPONSE] type: POST status: NOT_FOUND header: {"TaskId": 47, "Uri": "suunto://MDS/EventListener", "Content-Length": 0, "Reason": "NOT_FOUND", "Status": 404}
可能是什么原因 ?任何路径都是错误的。应用代码似乎支持订阅和通知。