智能网关


###1. 网关本地页面访问应用商城

b) 网关调用获取绑定设备清单接口,获取该网关所属运营平台地址和应用商城URL

规范要求如下:

方向
网关至平台

网关

智能网关

req.

https get

https://189cube.com/device/getbind?token=ACCESS_TOKEN&deviceType=XXX deviceType目前为0: all

resp.

json

查询ACCESS_TOKEN拥有者绑定的设备清单 成功时: {"List": [{"device_type":"Value","mac":"Value", "Online":0|1 ,"IP":"IPAddr", "model":"型号","fwver":"固件版本号", "hwver":"硬件版本号", "Address":用户地址, "Name":"VALUE","LOID":"Logic ID", "PlatformID":"String", "ServerURL":"该网关所属运营平台url" "DownloadURL":"网关对应的测速url" "ServerURL1":"该网关所属应用商城url" } ]} 失败时:{“Result”:”-2”} Online为设备是否在线,其中0为离线,1为在线 ServerURL1为应用商城地址

  1. 之前平台返回如下:

{
  "DownloadURL": "",
  "IP": "operatetest.189cube.com",
  "LOID": "",
  "Name": "",
  "Online": 1,
  "PlatformID": "OSGI",
  "ServerURL": "operatetest.189cube.com",
  "ServerURL1": "operatetest.189cube.com/userApi",
  "device_type": "0",
  "fwver": "ASB_E140WV1.2S",
  "hwver": "E140WV1B1",
  "mac": "64D95420214B",
  "model": "E-140W-P",
  "username": ""
}

json字符串网关能够识别

  1. 现在平台返回如下:

{
  "List": [
    {
      "DownloadURL": "",
      "IP": "operatetest.189cube.com",
      "LOID": "",
      "Name": "",
      "Online": 1,
      "PlatformID": "OSGI",
      "ServerURL": "operatetest.189cube.com",
      "ServerURL1": "operatetest.189cube.com/userApi",
      "device_type": "0",
      "fwver": "ASB_E140WV1.2S",
      "hwver": "E140WV1B1",
      "mac": "64D95420214B",
      "model": "E-140W-P",
      "username": ""
    }
  ]
}

json数组网关无法识别

Last updated

Was this helpful?