iotcreators.com web
    • Login
    • Search
    • forum.iotcreators.com
    • docs.iotcreators.com
    • Tags
    • Popular
    • Recent
    • Register

    Message Delivery

    Archive
    6
    14
    5584
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • afzal_m
      afzal_m iotcreators.com team last edited by afzal_m

      Onder de users die al toegang hebben tot ons Early Access Program was er de behoefte om nu ook een bericht vanuit het IoT platform naar een device te kunnen sturen. Iets wat we zelf graag ook willen uiteraard maar ook nog moeten uitvogelen. Hierbij in ieder geval de instructie die we van Huawei hebben ontvangen.

      Challenge: presentje voor degene die dit als eerst aan de praat heeft! Eric gaat nu ook aan onze kant beginnen.

      J 1 Reply Last reply Reply Quote 1
      • R
        rikvdh last edited by rikvdh

        Ik heb de request gestuurd. Nu kijken of we hem op het apparaat krijgen:

        ==== response =====
        HTTP/1.1 200 OK
        Transfer-Encoding: chunked
        Content-Type: application/json;charset=UTF-8
        Date: Wed, 21 Jun 2017 14:40:58 GMT
        M-Trace: [2017-06-21 15:40:59,721] urn:uuid:29594d40-8910-4675-a4af-f4e67e8c230b
        Set-Cookie: JSESSIONID=8E34000941E283585403CC8FE30070F1; Path=/; Secure; HttpOnly
        Set-Cookie: SESSION_COOKIE=; Expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/
        X-Frame-Options: SAMEORIGIN
        X-Server-Process-Time: 0.09
        X-Upstream-Process-Time: 0.09
        
        49
        {"requestId":"1234567890","commandId":"4d6b01e317654d7c9f063924a715aa97"}
        0
        
        1 Reply Last reply Reply Quote 0
        • J
          JanWillem @afzal_m last edited by

          @afzal_m
          Ik volg de handleiding en berichten komen in de queue te staan, maar worden niet afgeleverd!

          Dit is de queue output:

          {
          “totalCount”: 7,
          “pageNo”: 0,
          “pageSize”: 7,
          “list”: [
          {
          “commandId”: “14a76eeacd624e97875f38fe0a55859c”,
          “appId”: “nBUTt9XGZhGef1JdOTPsO2Jhar8a”,
          “deviceId”: “55da01ae-6a27-4896-b618-2708e510e872”,
          “command”: {
          “serviceId”: “RawData”,
          “method”: “Test”,
          “paras”: {
          “paraName1”: “paraValue1”,
          “paraName2”: “paraValue2”
          }
          },
          “callbackUrl”: null,
          “expireTime”: null,
          “result”: {
          “resultCode”: “PENDING”,
          “resultDetail”: null
          },
          “creationTime”: “20170621T143535Z”,
          “executeTime”: null
          },

          etc.

          IK zie niet wat ik verkeerd doe…

          J 1 Reply Last reply Reply Quote 0
          • R
            rikvdh last edited by rikvdh

            Hij doet het!

            POST /iocm/app/cmd/v1.2.0/devices/ec149476-3508-4256-954b-96cd5676d06b/commands HTTP/1.1
            Host: 160.44.201.248:8743
            App_key: xxxx
            Authorization: Bearer xxxxx
            Content-Type: application/json
            
            {"requestId":"1234567890","command":{"serviceId":"RawData","method":"RawData","paras":{"rawData":"SGVsbG8gV29ybGQ="}},"callbackUrl":"https://www.google.com/","expireTime":150}
            ==== response =====
            HTTP/1.1 200 OK
            Transfer-Encoding: chunked
            Content-Type: application/json;charset=UTF-8
            Date: Wed, 21 Jun 2017 14:48:26 GMT
            M-Trace: [2017-06-21 15:48:26,305] urn:uuid:f3242277-2e60-4ddc-a659-8386241c4e1f
            Set-Cookie: JSESSIONID=BA4013E7D7EFE904D5E8690975E68DE1; Path=/; Secure; HttpOnly
            Set-Cookie: SESSION_COOKIE=; Expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/
            X-Frame-Options: SAMEORIGIN
            X-Server-Process-Time: 0.0799
            X-Upstream-Process-Time: 0.0799
            
            49
            {"requestId":"1234567890","commandId":"3ff13ceb94684a7fbf5aaf53ca7f1b2f"}
            0
            

            Gelukt

            @JanWillem Het apparaat moet wel AT+NMGR aanroepen, anders worden er geen messages afgeleverd (of AT+NNMI=1)

            Ik heb een tool om data te versturen onderdeel gemaakt van onze open-source Golang library. Tevens een call om commando’s te sturen is nu onderdeel van de API.

            https://github.com/dualinventive/go-oceanconnect/tree/master/cmd/sendcommand

            1 Reply Last reply Reply Quote 0
            • J
              JanWillem @JanWillem last edited by

              Ik snap er niks van. Ik doe (voor de zekerheid even) exact hetzelfde dus:

              POST /iocm/app/cmd/v1.2.0/devices/55da01ae-6a27-4896-b618-2708e510e872/commands HTTP/1.1
              Host: 160.44.201.248:8743
              app_key: ****
              Authorization: Bearer ******
              Content-Type: application/json
              Cache-Control: no-cache
              Postman-Token: ffc10c9e-29ed-4a5d-44f1-3d459e1660fb

              {
              “command”:{
              “serviceId”:“RawData”,
              “method”:“RawData”,
              “paras”:{
              “rawData”:“SGVsbG8gV29ybGQ=”}},
              “callbackUrl”:“https://www.google.com/”,
              “expireTime”:150}
              }

              Ik krijg dan als response:

              {
              “requestId”: “8ce3f7f6e249445ab54f3126c9b59856”,
              “commandId”: “c0d3665de5da4d20b679dcebb04761bc”
              }

              Ik zie vervolgens in de queue staan:

              {
              “commandId”: “c0d3665de5da4d20b679dcebb04761bc”,
              “appId”: “nBUTt9XGZhGef1JdOTPsO2Jhar8a”,
              “deviceId”: “55da01ae-6a27-4896-b618-2708e510e872”,
              “command”: {
              “serviceId”: “RawData”,
              “method”: “RawData”,
              “paras”: {
              “rawData”: “SGVsbG8gV29ybGQ=”
              }
              },
              “callbackUrl”: “https://www.google.com/”,
              “expireTime”: 150,
              “result”: {
              “resultCode”: “PENDING”,
              “resultDetail”: null
              },
              “creationTime”: “20170621T171155Z”,
              “executeTime”: null
              }

              Maar als ik vervolgens op het device doe:

              AT+NQMGR

              dan krijg ik

              BUFFERED=0,RECEIVED=0,DROPPED=0

              Ook als ik eerst een bericht stuur om zeker te zijn dat het device niet in een sleep state is beland.

              Ligt het aan de uBlox module of firmware versie?
              Ik draai V100R100C10B650SP11

              1 Reply Last reply Reply Quote 0
              • R
                rikvdh last edited by

                @JanWillem Kun je niet AT+NMGR doen nadat je een message verstuurd hebt? Dat zal forceren dat er een message ontvangen wordt.

                Ik weet niet precies hoe het voor de uBlox-en werkt. Ik heb het aan de praat op een Quectel BC95 met V100R100C10B655SP2.

                J 1 Reply Last reply Reply Quote 0
                • J
                  JanWillem @rikvdh last edited by

                  @rikvdh Dat hebben we uitgreid geprobeerd, maar er komt echt niks binnen.
                  We hebben het overigens ook geprobeerd op een uBlox met V100R100C10B655SP2 maar dat maakte geen verschil.

                  Je hebt op Ocean Connect hiervoor niets hoeven te configureren/ in te stellen?

                  1 Reply Last reply Reply Quote 0
                  • R
                    rikvdh last edited by

                    @JanWillem Geen idee, wat voor device-profile gebruik je?

                    1 Reply Last reply Reply Quote 0
                    • ericbarten
                      ericbarten iotcreators.com team last edited by

                      @rikvdh gefeliciteerd Rik alle credits gaan naar jou, ik krijg het nog niet voor elkaar. Ik probeer hetzelfde commando te versturen maar krijg een 404 not found. Waarschijnlijk omdat mijn device nog nooit iets verstuurd heeft. Hebben jullie een ander device profiel in gebruik?

                      1 Reply Last reply Reply Quote 0
                      • J
                        JanWillem last edited by

                        Dit is mijn device:

                        “deviceId”: “55da01ae-6a27-4896-b618-2708e510e872”,
                        “gatewayId”: “55da01ae-6a27-4896-b618-2708e510e872”,
                        “nodeType”: “GATEWAY”,
                        “createTime”: “20170615T083001Z”,
                        “lastModifiedTime”: “20170623T153403Z”,
                        “deviceInfo”: {
                        “nodeId”: null,
                        “name”: “sodaq1”,
                        “description”: null,
                        “manufacturerId”: “Neul”,
                        “manufacturerName”: “Neul”,
                        “mac”: null,
                        “location”: “NL”,
                        “deviceType”: “MultiSensor”,
                        “model”: “1623”,
                        “swVersion”: null,
                        “fwVersion”: null,
                        “hwVersion”: null,
                        “protocolType”: “CoAP”,
                        “bridgeId”: null,
                        “status”: “ONLINE”,
                        “statusDetail”: “NONE”,
                        “mute”: “FALSE”,
                        “supportedSecurity”: null,
                        “isSecurity”: null,
                        “signalStrength”: null,
                        “sigVersion”: null,
                        “serialNumber”: null,
                        “batteryLevel”: null
                        },

                        Wat me opvalt is: “nodeType”: “GATEWAY”,

                        Moet dat niet zijn ENDPOINT? Hoe staat dat bij jou @rikvdh

                        J 1 Reply Last reply Reply Quote 0
                        • J
                          JanWillem @JanWillem last edited by

                          @rikvdh of kan het iets te maken hebben met de deviceCapabilities in OceanConnect.
                          Bij mijn device staan die op:

                          {
                          “deviceCapabilities”: [
                          {
                          “deviceId”: “55da01ae-6a27-4896-b618-2708e510e872”,
                          “serviceCapabilities”: [
                          {
                          “serviceId”: “RawData”,
                          “serviceType”: “RawData”,
                          “option”: “Master”,
                          “description”: “RawData”,
                          “commands”: null,
                          “properties”: [
                          {
                          “propertyName”: “Text”,
                          “dataType”: “string”,
                          “required”: false,
                          “min”: null,
                          “max”: null,
                          “step”: 0,
                          “maxLength”: 0,
                          “method”: null,
                          “unit”: null,
                          “enumList”: null
                          }
                          ]
                          }
                          ]
                          }
                          ]
                          }

                          1 Reply Last reply Reply Quote 0
                          • J
                            JanWillem last edited by

                            Bij ons werkt het intussen. Maar alleen met firmware B656

                            1 Reply Last reply Reply Quote 0
                            • W
                              wijntema last edited by

                              Ik heb dit ook werkend! echter ook alleen bij de B656 firmware.

                              1 Reply Last reply Reply Quote 0
                              • T
                                tolgapaksoy last edited by

                                Hi @JanWillem en @rikvdh . Ik probeer message delivery uit. Ik voer de volgende HTTP request uit:

                                POST /iocm/app/cmd/v1.2.0/devices/0ce440cf-43e7-4fc0-88ef-35f6eac46e72/commands HTTP/1.1
                                Host: 160.44.201.248:8743
                                app_key: ******
                                Authorization: Bearer ******
                                Content-Type: application/json
                                Cache-Control: no-cache
                                Postman-Token: 6b86c0c1-a21e-5cac-5133-b8f548bd2a8c
                                
                                {
                                    "command":{
                                        "serviceId":"RawData",
                                        "method":"RawData",
                                        "paras":{
                                            "rawData":"SGVsbG8gV29ybGQ="
                                        }
                                    },
                                    "callbackUrl":"https://www.google.com/",
                                    "expireTime":300
                                }
                                

                                En krijg de volgende terug:

                                {
                                    "requestId": "bff68759e86f4fbeb3b14d56bd7bbd69",
                                    "commandId": "54c45334fc8a4fabb40c225b1a7c0fe4"
                                }
                                

                                Bij Device command history zie ik ze op PENDING staan.

                                Op mijn device heb ik de volgende AT commando’s al uitgevoerd

                                > AT+NNMI=1
                                OK
                                > AT+NMGR
                                OK
                                > AT+NQMGR
                                BUFFERED=0,RECEIVED=0,DROPPED=0
                                OK
                                

                                En ik zie maar geen verandering hierin. Ik gebruik firmware versie B656. Ik kan wel data versturen, maar ontvangen lukt me niet.

                                1 Reply Last reply Reply Quote 0
                                • 1 / 1
                                • First post
                                  Last post