【问题标题】:Movesense HelloWorld subscriptionMovesense HelloWorld 订阅
【发布时间】:2020-03-13 08:56:01
【问题描述】:

我已经通过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错误。(下面是sn-p的日志)

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}

可能是什么原因?任何路径都是错误的。应用代码似乎支持订阅和通知。

【问题讨论】:

    标签: movesense


    【解决方案1】:

    您的路径开头似乎有多余的斜杠(在下面的序列号之后):

    184730000240//Sample/HelloWorld/
    

    格式应该是

    184730000240/Sample/HelloWorld/
    

    如果有帮助,请告诉我们。

    【讨论】:

    • 啊,我注意到您已经在 Bitbucket 问题中得到解答。很高兴它有帮助。您想在此处或在 Bitbucket 中进行跟踪吗?
    猜你喜欢
    • 2020-10-17
    • 1970-01-01
    • 2019-12-29
    • 2019-01-03
    • 2020-03-29
    • 2020-10-11
    • 1970-01-01
    • 1970-01-01
    • 2015-08-24
    相关资源
    最近更新 更多