TR069网管流程--设备启动到挂上网管

2024-02-24 14:58

本文主要是介绍TR069网管流程--设备启动到挂上网管,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

以下为设备重启到挂上TR069网管的报文流程解析

 

1、设备起来之后,根据配置的ACS(自动配置服务器)地址发起 inform 请求,该请求中携带一些参数

POST /service.tr069 HTTP/1.1

Host: 183.62.12.23:8012

User-Agent: cwmp

Content-Type: text/xml; charset=utf-8

Connection: keep-alive

Content-Length: 1730

SOAPAction: ""

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cwmp="urn:dslforum-org:cwmp-1-0">

<SOAP-ENV:Header>

<cwmp:ID SOAP-ENV:mustUnderstand="1">946684824</cwmp:ID>

</SOAP-ENV:Header>

<SOAP-ENV:Body>

<cwmp:Inform>//inform方法任何时刻要建立与ACS的连接,都必须调用Inform方法,来初始化一个传输序列,向ACS服务器上报一些事件,具体事件就携带在EventCode

 

--------------------inform参数Deviceid [设备描述信息]--------------------------------------------------------

<DeviceId>

<Manufacturer>star-net</Manufacturer>//设备厂商

<OUI>00D0F8</OUI>//设备制造商的唯一标示

<ProductClass>SVP3000_V5_SIP_CN</ProductClass>//设备类型

<SerialNumber>00100400RJ0100100000001AA9800003</SerialNumber>//设备序列号

</DeviceId>

--------------------inform参数Deviceid [设备描述信息]--------------------------------------------------------

 

-------------------inform参数event[引起此次会话建立的具体事件]---------------------------------------

<Event SOAP-ENC:arrayType="cwmp:EventStruct[1]">

<EventStruct>

<EventCode>1 BOOT</EventCode>//上报BOOT事件,也就是告诉ACS要发起CWMP连接了

<CommandKey></CommandKey>

</EventStruct>

</Event>

说明:1 boot表明发起会话的原因是设备上电(首次启动或者其他原因引起的设备重启)

 

-------------------inform参数event[引起此次会话建立的具体事件]---------------------------------------

 

------------------inform参数MaxEnvelopes[接收响应的允许SOAP信包数目,0表示无限制]---

<MaxEnvelopes>1</MaxEnvelopes>

------------------inform参数MaxEnvelopes[接收响应的允许SOAP信包数目,0表示无限制]---

 

------------------inform参数CurrentTime[cpe当前的时间]---------------------------------------------------

<CurrentTime>2000-01-01T08:00:23</CurrentTime>

------------------inform参数CurrentTime[cpe当前的时间]---------------------------------------------------

 

------------------inform参数RetryCount[完成inform调用前尝试的次数每次加1]-------------------

<RetryCount>0</RetryCount>

------------------inform参数RetryCount[完成inform调用前尝试的次数每次加1]-------------------

 

------------------inform参数ParameterList[CPE设备参数列表]-------------------------------------------

<ParameterList SOAP-ENC:arrayType="cwmp:ParameterValueStruct[6]">

 

<ParameterValueStruct>

<Name>Device.DeviceSummary</Name>//设备描述信息

<Value>Device:1.0[](Baseline:1), VoiceService:1.0[1](Baseline:1)</Value>

</ParameterValueStruct>

 

<ParameterValueStruct>

<Name>Device.DeviceInfo.HardwareVersion</Name>//设备的硬件版本信息

<Value>5.0</Value>

</ParameterValueStruct>

 

<ParameterValueStruct>

<Name>Device.DeviceInfo.SoftwareVersion</Name>//设备的软件版本信息

<Value>AIM1.3.10.8</Value>

</ParameterValueStruct>

 

<ParameterValueStruct>

<Name>Device.ManagementServer.ConnectionRequestURL</Name>//请求URL(设备联系地址)

<Value>http://192.168.99.17:7547/</Value>

</ParameterValueStruct>

 

<ParameterValueStruct>

<Name>Device.ManagementServer.ParameterKey</Name>//对某些方法的调用会导致该值的该改变如Scheduled Informrebootdownloadupload方法,除此以外的调用该值均为空,此消息中设备只调用了 inform方法,故该值应该置为空

<Value></Value>

</ParameterValueStruct>

 

<ParameterValueStruct>

<Name>Device.LAN.IPAddress</Name>//设备ip地址

<Value>192.168.99.17</Value>

</ParameterValueStruct>

</ParameterList>

------------------inform参数ParameterList[CPE设备参数列表]-------------------------------------------

 

</cwmp:Inform>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

 

2ACS服务器接受到设备端(CPE)发出的inform消息之后,会给予一个 informresponse响应机cwmp连接创建成功

HTTP/1.1 200 OK//对设备端inform消息的响应即接受连接请求

Date: Tue, 02 Aug 2011 03:20:53 GMT

Server: Microsoft-IIS/6.0

X-Powered-By: ASP.NET

X-AspNet-Version: 2.0.50727

Set-Cookie: SerialNumber=00100400RJ0100100000001AA9800003; path=/

Cache-Control: private

Content-Type: text/xml;charset=UTF-8

Content-Length: 522

 

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><soap:Header><cwmp:ID soap:mustUnderstand="1">946684824</cwmp:ID><cwmp:HoldRequests soap:mustUnderstand="1">0</cwmp:HoldRequests></soap:Header>

<soap:Body>

 

<cwmp:InformResponse>

<MaxEnvelopes>1</MaxEnvelopes>

</cwmp:InformResponse>//ACS接受设备端(cpe)端的inform请求(即创建cwmp连接的请求)

 

</soap:Body>

</soap:Envelope>

 

3、设备端发送空消息,表示没有后续的请求

POST /service.tr069 HTTP/1.1

Host: 183.62.12.23:8012//ACS(自动配置服务器)地址

User-Agent: cwmp

Content-Type: text/xml; charset=utf-8

Connection: keep-alive

Cookie: SerialNumber=00100400RJ0100100000001AA9800003;path=/ //设置在设备的序列号

Content-Length: 0//消息内容长度为0代表空消息

 

4ACS服务器收到空消息后,根据空消息中携带的序列号对设备进行合法性验证,若验证通过则进行后续操作,若不通过则下发消息提示设备非法。序列号的判断在ACS内部判断,未体现在报文中

 

5ACS验证设备序列号合法,发送消息要求设备端上报网管的账号信息

HTTP/1.1 200 OK //序列号验证合法的响应码

Date: Tue, 02 Aug 2011 03:20:53 GMT

Server: Microsoft-IIS/6.0

X-Powered-By: ASP.NET

X-AspNet-Version: 2.0.50727

Set-Cookie: SerialNumber=00100400RJ0100100000001AA9800003; path=/

Cache-Control: private

Content-Type: text/xml;charset=UTF-8

Content-Length: 658

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><soap:Header><cwmp:ID soap:mustUnderstand="1">1</cwmp:ID><cwmp:HoldRequests soap:mustUnderstand="1">0</cwmp:HoldRequests></soap:Header><soap:Body>

 

<cwmp:GetParameterValues>//请求的方法为GetParameterValues,获取设备端的参数信息

<ParameterNamesSOAP-ENC:arrayType="xsd:string[2]">

<string>Device.ManagementServer.Username</string>//获取设备TR069网管用户名

<string>Device.ManagementServer.Password</string>//获取设备TR069网管密码

</ParameterNames>

</cwmp:GetParameterValues>

 

</soap:Body></soap:Envelope>

 

6、设备端接收该ACS服务器请求上报账号的消息后,将发送设备上配置的账号信息作为请求的响应

HTTP/1.1

Host: 183.62.12.23:8012

User-Agent: cwmp

Content-Type: text/xml; charset=utf-8

Connection: keep-alive

Cookie: SerialNumber=00100400RJ0100100000001AA9800003;path=/

Content-Length: 828

SOAPAction: ""

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cwmp="urn:dslforum-org:cwmp-1-0">

<SOAP-ENV:Header>

<cwmp:ID SOAP-ENV:mustUnderstand="1">1</cwmp:ID>

</SOAP-ENV:Header>

<SOAP-ENV:Body>

 

<cwmp:GetParameterValuesResponse>

<ParameterList xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cwmp:ParameterValueStruct[2]">

 

<ParameterValueStruct>

<Name>Device.ManagementServer.Username</Name>//设置在设备上的网管用户名

<Value>66661160</Value>//用户名的具体值

</ParameterValueStruct>

 

<ParameterValueStruct>

<Name>Device.ManagementServer.Password</Name>//设置在设备上的网管密码

<Value>66661160</Value>//密码的具体值

</ParameterValueStruct>

</ParameterList>

 

</cwmp:GetParameterValuesResponse>//将账号信息作为ACS请求的响应消息

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

 

7ACS服务器收到消息后,根据消息中携带的账号信息进行合法性验证,若验证通过则进行后续操作,若不通过则下发消息提示账号非法。序列号的判断在ACS内部判断,未体现在报文中

 

8ACS验证账号合法,发送消息要求设备从特定URL上下载配置文件

HTTP/1.1 200 OK //对先前一个消息的确认

Date: Tue, 02 Aug 2011 03:21:04 GMT

Server: Microsoft-IIS/6.0

X-Powered-By: ASP.NET

X-AspNet-Version: 2.0.50727

Set-Cookie: SerialNumber=00100400RJ0100100000001AA9800003; path=/

Cache-Control: private

Content-Type: text/xml;charset=UTF-8

Content-Length: 856

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><soap:Header><cwmp:ID soap:mustUnderstand="1">1</cwmp:ID><cwmp:HoldRequests soap:mustUnderstand="1">0</cwmp:HoldRequests></soap:Header><soap:Body><cwmp:Download><CommandKey>M Download</CommandKey>

 

<FileType> //文件类型

3 Vendor Configuration File //配置文件

</FileType>

<URL>http://183.62.12.23:8012/Config.aspx?ID=00100400RJ0100100000001AA9800003</URL//配置文件的URL地址,设备端从该地址获取配置文件并自动载入设备

 

<Description></Description><Username></Username><Password></Password><FileSize>0</FileSize><TargetFileName>ConfigFile.xml</TargetFileName><DelaySeconds>0</DelaySeconds><SuccessURL></SuccessURL><FailureURL></FailureURL></cwmp:Download></soap:Body></soap:Envelope>

 

9、设备接收到该消息之后,并根据消息中的URL地址下载配置文件并自动配置,同时给ACS服务器一个下载成功的响应消息

Host: 183.62.12.23:8012 //ACS服务器地址

User-Agent: cwmp

Content-Type: text/xml; charset=utf-8

Connection: keep-alive

Cookie: SerialNumber=00100400RJ0100100000001AA9800003;path=/

Content-Length: 484

SOAPAction: ""

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cwmp="urn:dslforum-org:cwmp-1-0">

<SOAP-ENV:Header>

<cwmp:ID SOAP-ENV:mustUnderstand="1">1</cwmp:ID>

</SOAP-ENV:Header>

<SOAP-ENV:Body>

<cwmp:DownloadResponse>//通过该消息告知ACS服务器设备成功获取配置文件

<Status>1</Status>//成功下载的状态码

</cwmp:DownloadResponse>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

 

10ACS服务器发送消息,要求设备从特定的URL下载升级文件(是否升级可由用户自行决定)

HTTP/1.1 200 OK//对先前一个消息的确认

Date: Tue, 02 Aug 2011 03:21:04 GMT

Server: Microsoft-IIS/6.0

X-Powered-By: ASP.NET

X-AspNet-Version: 2.0.50727

Set-Cookie: SerialNumber=00100400RJ0100100000001AA9800003; path=/

Cache-Control: private

Content-Type: text/xml;charset=UTF-8

Content-Length: 889

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><soap:Header><cwmp:ID soap:mustUnderstand="1">1</cwmp:ID><cwmp:HoldRequests soap:mustUnderstand="1">0</cwmp:HoldRequests></soap:Header><soap:Body><cwmp:Download><CommandKey>M Download</CommandKey>

 

<FileType>1 Firmware Upgrade Image</FileType> //文件类型升级文件

<URL>http://183.62.12.23:8010/DeviceSoftWareVersion/20110714/svp3000.update</URL//升级文件的URL地址,设备端从该地址获取配置文件并自动载入设备

 

<Description></Description><Username></Username><Password></Password><FileSize>3493888</FileSize><TargetFileName>/DeviceSoftWareVersion/20110714/svp3000.update</TargetFileName><DelaySeconds>0</DelaySeconds><SuccessURL></SuccessURL><FailureURL></FailureURL></cwmp:Download></soap:Body></soap:Envelope>

 

11、设备接收到该消息之后,并根据消息中的URL地址获取升级文件,同时给予ACS服务器一个响应

POST /service.tr069 HTTP/1.1

Host: 183.62.12.23:8012

User-Agent: cwmp

Content-Type: text/xml; charset=utf-8

Connection: keep-alive

Cookie: SerialNumber=00100400RJ0100100000001AA9800003;path=/

Content-Length: 484

SOAPAction: ""

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cwmp="urn:dslforum-org:cwmp-1-0">

<SOAP-ENV:Header>

<cwmp:ID SOAP-ENV:mustUnderstand="1">1</cwmp:ID>

</SOAP-ENV:Header>

<SOAP-ENV:Body>

 

<cwmp:DownloadResponse>//通过该消息告知ACS服务器设备成功获取配置文件

<Status>1</Status>//成功下载的状态码

</cwmp:DownloadResponse>

 

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

12ACS服务器发送空消息结束流程

HTTP/1.1 200 OK //对上一个流程的确认

Date: Tue, 02 Aug 2011 03:21:05 GMT

Server: Microsoft-IIS/6.0

X-Powered-By: ASP.NET

X-AspNet-Version: 2.0.50727

Set-Cookie: SerialNumber=00100400RJ0100100000001AA9800003; path=/

Cache-Control: private

Content-Length: 0 //消息内容长度为0代表空消息

 

这篇关于TR069网管流程--设备启动到挂上网管的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/742470

相关文章

SpringBoot整合Flowable实现工作流的详细流程

《SpringBoot整合Flowable实现工作流的详细流程》Flowable是一个使用Java编写的轻量级业务流程引擎,Flowable流程引擎可用于部署BPMN2.0流程定义,创建这些流程定义的... 目录1、流程引擎介绍2、创建项目3、画流程图4、开发接口4.1 Java 类梳理4.2 查看流程图4

Nexus安装和启动的实现教程

《Nexus安装和启动的实现教程》:本文主要介绍Nexus安装和启动的实现教程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录一、Nexus下载二、Nexus安装和启动三、关闭Nexus总结一、Nexus下载官方下载链接:DownloadWindows系统根

java Long 与long之间的转换流程

《javaLong与long之间的转换流程》Long类提供了一些方法,用于在long和其他数据类型(如String)之间进行转换,本文将详细介绍如何在Java中实现Long和long之间的转换,感... 目录概述流程步骤1:将long转换为Long对象步骤2:将Longhttp://www.cppcns.c

Java中实现线程的创建和启动的方法

《Java中实现线程的创建和启动的方法》在Java中,实现线程的创建和启动是两个不同但紧密相关的概念,理解为什么要启动线程(调用start()方法)而非直接调用run()方法,是掌握多线程编程的关键,... 目录1. 线程的生命周期2. start() vs run() 的本质区别3. 为什么必须通过 st

Oracle修改端口号之后无法启动的解决方案

《Oracle修改端口号之后无法启动的解决方案》Oracle数据库更改端口后出现监听器无法启动的问题确实较为常见,但并非必然发生,这一问题通常源于​​配置错误或环境冲突​​,而非端口修改本身,以下是系... 目录一、问题根源分析​​​二、保姆级解决方案​​​​步骤1:修正监听器配置文件 (listener.

MySQL版本问题导致项目无法启动问题的解决方案

《MySQL版本问题导致项目无法启动问题的解决方案》本文记录了一次因MySQL版本不一致导致项目启动失败的经历,详细解析了连接错误的原因,并提供了两种解决方案:调整连接字符串禁用SSL或统一MySQL... 目录本地项目启动报错报错原因:解决方案第一个:第二种:容器启动mysql的坑两种修改时区的方法:本地

MySQL启动报错:InnoDB表空间丢失问题及解决方法

《MySQL启动报错:InnoDB表空间丢失问题及解决方法》在启动MySQL时,遇到了InnoDB:Tablespace5975wasnotfound,该错误表明MySQL在启动过程中无法找到指定的s... 目录mysql 启动报错:InnoDB 表空间丢失问题及解决方法错误分析解决方案1. 启用 inno

spring-gateway filters添加自定义过滤器实现流程分析(可插拔)

《spring-gatewayfilters添加自定义过滤器实现流程分析(可插拔)》:本文主要介绍spring-gatewayfilters添加自定义过滤器实现流程分析(可插拔),本文通过实例图... 目录需求背景需求拆解设计流程及作用域逻辑处理代码逻辑需求背景公司要求,通过公司网络代理访问的请求需要做请

使用JavaConfig配置Spring的流程步骤

《使用JavaConfig配置Spring的流程步骤》JavaConfig是Spring框架提供的一种基于Java的配置方式,它通过使用@Configuration注解标记的类来替代传统的XML配置文... 目录一、什么是 JavaConfig?1. 核心注解2. 与 XML 配置的对比二、JavaConf

无法启动此程序因为计算机丢失api-ms-win-core-path-l1-1-0.dll修复方案

《无法启动此程序因为计算机丢失api-ms-win-core-path-l1-1-0.dll修复方案》:本文主要介绍了无法启动此程序,详细内容请阅读本文,希望能对你有所帮助... 在计算机使用过程中,我们经常会遇到一些错误提示,其中之一就是"api-ms-win-core-path-l1-1-0.dll丢失