GA-T1400协议--注册注销

关于1400的协议资源太匮乏,协议文档写的太碎了,没有GB28181那么完整,有说明有示例;一开始没有相应的设备可以测试协议,一路摸索走了很多弯路,猜测加联想。写篇帖子,和大家相互学习。

一、平台注册/注销

1.1 注册/注销流程

注册流程1如图所示

图 1

 

 

 

下级平台主动向上级平台注册;注册鉴权信息(用户名和密码)由上级平台提供;

1.2 报文说明

1.2.1 下级第一次注册

POST /VIID/System/Register HTTP/1.1

Host: 192.168.1.240:10000

Accept: application/json,application/*+json

Content-Type: application/VIID+JSON;charset=UTF-8

Connection: keepalive

User-Identify:34020000001110000001

User-Agent: libghttp/1.0

Content-Length: 64

 

{

."RegisterObject":.{

.."DeviceID":."34020000001110000001"

.}

}

其中192.168.1.240:10000为注册平台的地址

 1.2.2 上级响应未认证

HTTP/1.1 401 Unauthorized

Content-Type: application/json

WWW-Authenticate: Digest realm="firberhome", nonce="8qx43l7i"

1.2.3 下级第二次注册

POST /VIID/System/Register HTTP/1.1

Host: 192.168.1.240:10008

Accept: application/json,application/*+json

Content-Type: application/*+JSON;charset=UTF-8

Connection: keepalive

User-Identify:34020000001110000001

Authorization: Digest username="dbTest", realm="firberhome", nonce="8qx43l7i", uri="/VIID/System/Register", algorithm="MD5", cnonce="wenminchen@126.com", nc=00000001, qop=auth, response="48164a9699ccec9345016d62bc27384e"

User-Agent: libghttp/1.0

Content-Length: 64

 

{

."RegisterObject":.{

.."DeviceID":."34020000001110000001"

.}

}

1.2.4 注册成功上级响应

HTTP/1.1 200 OK

Content-Type: application/json

 

{"ResponseStatus":{"Id":"34020000001110000001","LocalTime":"20200512161231","RequestURL":"/VIID/System/Register","StatusCode":0,"StatusString":"OK"}}

以上为完整的注册流程,注销流程类似

二、Keepalived保活

2.1保活流程

下级向上级上报心跳数据

2.2 报文说明

2.2.1 下级上报保活

POST /VIID/System/Keepalive HTTP/1.1

Host: 192.168.1.240:10000

Accept: application/json,application/*+json

Content-Type: application/VIID+JSON;charset=UTF-8

Connection: keepalive

User-Identify:34020000001110000001

User-Agent: libghttp/1.0

Content-Length: 65

 

{

."KeepaliveObject":.{

.."DeviceID":."34020000001110000001"

.}

}

4.2.2 上级反馈响应

HTTP/1.1 200 OK

Content-Type: application/json

 

{"ResponseStatus":{"Id":"34020000001110000001","LocalTime":"20200512161231","RequestURL":"/VIID/System/Keepalive","StatusCode":0,"StatusString":"OK"}}

后续再增加其他协议的说明

展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客
应支付0元
点击重新获取
扫码支付

支付成功即可阅读