movesense - Movesense HelloWorld 订阅
问题描述
我已经通过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}
可能是什么原因 ?任何路径都是错误的。应用代码似乎支持订阅和通知。
解决方案
开头的路径中似乎有额外的斜杠(在下面的序列号之后):
184730000240//Sample/HelloWorld/
它的形式应该是
184730000240/Sample/HelloWorld/
让我们知道这是否有帮助。
推荐阅读
- javascript - 如何根据复选框计算总价
- reactjs - 如何处理 React.js 中表格中的数据?
- calibre - 未能在 Calibre 中无损压缩图像
- wordpress - 我们可以重定向除页面网址之外的所有帖子网址吗?
- apache - 使用 VirtualHost 时 Apache 2.4 反向代理不重定向
- c++ - C++ | 如何删除位于 (C:\Program Files (x86)) 的文件夹中的文件
- visual-studio-code - Visual Studio Code 插件创建指南
- php - 将数据从oracle数据库插入mysql数据库
- python - pandas.read_stata() 错误:解包需要 4 个字节的缓冲区
- c++ - 字符串的拆分