关于CWMP基础(二)----TR069通信流程

article/2025/10/7 20:42:14

1.通信流程图

在这里插入图片描述

  1. 建立TCP连接
  2. SSL初始化,进行加密建立安全机制
  3. 由CPE端发起HTTP请求,发送Inform报文,开始建立CWMP连接。Inform中使用Eventcode字段描述发送Inform请求的原因 如 6 CONNECTION REQUEST ,表示ACS要求建立连接。
  4. 如果ACS通过CPE的请求,则连接建立。
  5. 如果CPE无别的请求则发送一个空报文。满足HTTP报文请求/响应报文交互规则。
  6. ACS查询CPE上设置的ACS URL的值
  7. CPE将所需要获取的值返回给ACS。
  8. ACS发现CPE的ACS URL是本机URL的值,于是发起Set请求,要求将CPE的ACS URL设置为备用ACS的URL的值。
  9. 设置成功,CPE发送响应报文。
  10. ACS无别的请求发送空报文。
  11. CPE发送关闭连接

2.简单的报文实例

POST /acs/grandstream HTTP/1.1
Host: acs.avsystem.com:10301
User-Agent: GRANDSTREAM CPE-0.21.3.31 (3.6.13)
Authorization: Digest username="", realm="ACSRealm", algorithm=MD5, nonce="JVwsZqxc3qEyTday/kL6C0H+BhQLbZCu", uri="/acs/grandstream", qop=auth, nc=0000000a, cnonce="65da02d074fa0db3", response="a4dfe2ee1670802d4f1e12f330724fc7"
Content-Type: text/xml; charset=utf-8
SOAPAction: cwmp:Inform
Content-Length: 2970<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:cwmp="urn:dslforum-org:cwmp-1-0">
<soap:Header><cwmp:ID soap:mustUnderstand="1">haU761yJla</cwmp:ID>
</soap:Header>
<soap:Body>
<cwmp:Inform><DeviceId><Manufacturer>Grandstream</Manufacturer><OUI>C074AD</OUI><ProductClass>XXXX</ProductClass><SerialNumber>XXXXXXX</SerialNumber></DeviceId><Event soap-enc:arrayType="cwmp:EventStruct[1]"><EventStruct><EventCode>6 CONNECTION REQUEST</EventCode><CommandKey></CommandKey></EventStruct></Event><MaxEnvelopes>1</MaxEnvelopes><CurrentTime>2021-04-06T17:05:44</CurrentTime><RetryCount>0</RetryCount><ParameterList soap-enc:arrayType="cwmp:ParameterValueStruct[11]"><ParameterValueStruct><Name>Device.GatewayInfo.ManufacturerOUI</Name><Value xsi:type="xsd:string"></Value></ParameterValueStruct><ParameterValueStruct><Name>Device.GatewayInfo.ProductClass</Name><Value xsi:type="xsd:string"></Value></ParameterValueStruct><ParameterValueStruct><Name>Device.GatewayInfo.SerialNumber</Name><Value xsi:type="xsd:string"></Value></ParameterValueStruct><ParameterValueStruct><Name>Device.DeviceInfo.HardwareVersion</Name><Value xsi:type="xsd:string">1.3A</Value></ParameterValueStruct><ParameterValueStruct><Name>Device.DeviceInfo.SoftwareVersion</Name><Value xsi:type="xsd:string">0.0.0.0</Value></ParameterValueStruct><ParameterValueStruct><Name>Device.DeviceInfo.ProvisioningCode</Name><Value xsi:type="xsd:string"></Value></ParameterValueStruct><ParameterValueStruct><Name>Device.ManagementServer.ConnectionRequestURL</Name><Value xsi:type="xsd:string">http://X.X.X.X:7547/4LUa1m6SgD5GBzaR</Value></ParameterValueStruct><ParameterValueStruct><Name>Device.ManagementServer.ParameterKey</Name><Value xsi:type="xsd:string">n/a</Value></ParameterValueStruct><ParameterValueStruct><Name>Device.LAN.IPAddress</Name><Value xsi:type="xsd:string">192.168.131.X</Value></ParameterValueStruct><ParameterValueStruct><Name>Device.LAN.MACAddress</Name><Value xsi:type="xsd:string">00:00:00:00:00</Value></ParameterValueStruct><ParameterValueStruct><Name>Device.DeviceSummary</Name><Value xsi:type="xsd:string">Device:1.3[](Baseline:1,UDPConnReq:1,GatewayInfo:1,LAN:1,Time:1,IPPing:1,TraceRoute:1,Download:1,Upload:1,MemoryStatus:1),VoiceService:1.0[1](Endpoint:1,SIPEndpoint:1)</Value></ParameterValueStruct></ParameterList>
</cwmp:Inform>
</soap:Body>
</soap:Envelope>
  • 当建立连接后,CPE发送请求,并发送Inform报文通知。(Eventcode表示请求原因 如:connect request)
HTTP/1.1 200 OK
Date: Tue, 06 Apr 2021 09:05:44 GMT
Set-Cookie: AVSSESSIONID=8FbL3sKSb9CFE4BrPp6WmmL_jZb81lXKOmCByV0ja-wILFtvXN_Zgg;Path=/
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/xml; charset="UTF-8"
Content-Length: 459<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Header><cwmp:ID soap:mustUnderstand="1">haU761yJla</cwmp:ID></soap:Header><soap:Body><cwmp:InformResponse><MaxEnvelopes>1</MaxEnvelopes></cwmp:InformResponse></soap:Body></soap:Envelope>POST /acs/grandstream HTTP/1.1
  • ACS收到请求后,发送Inform报文响应。
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Header><cwmp:ID soap:mustUnderstand="1">haU761yJla</cwmp:ID></soap:Header><soap:Body><cwmp:InformResponse><MaxEnvelopes>1</MaxEnvelopes></cwmp:InformResponse></soap:Body></soap:Envelope>POST /acs/grandstream HTTP/1.1
Host: acs.avsystem.com:10301
User-Agent: GRANDSTREAM CPE-0.21.3.31 (3.6.13)
Cookie: AVSSESSIONID=8FbL3sKSb9CFE4BrPp6WmmL_jZb81lXKOmCByV0ja-wILFtvXN_Zgg
Authorization: Digest username="", realm="ACSRealm", algorithm=MD5, nonce="JVwsZqxc3qEyTday/kL6C0H+BhQLbZCu", uri="/acs/grandstream", qop=auth, nc=0000000b, cnonce="65da02d074fa0db3", response="1a89bfd8e8d89377bc9a961769644ef5"
Content-Type: text/xml; charset=utf-8
Content-Length: 0
  • CPE发送空报文无别的请求,满足HTTP报文的请求/响应的交互规则。

HTTP/1.1 200 OK
Date: Tue, 06 Apr 2021 09:05:45 GMT
Content-Type: text/xml; charset="UTF-8"
Content-Length: 406<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Header><cwmp:ID soap:mustUnderstand="1">47ed9304</cwmp:ID></soap:Header><soap:Body><cwmp:GetRPCMethods /></soap:Body></soap:Envelope>POST /acs/grandstream HTTP/1.1
  • ACS响应获取getRPCMethods的请求

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:cwmp="urn:dslforum-org:cwmp-1-0">
<soap:Header><cwmp:ID soap:mustUnderstand="1">47ed9304</cwmp:ID>
</soap:Header>
<soap:Body>
<cwmp:GetRPCMethodsResponse><MethodList soap-enc:arrayType="xsd:string[18]"><string>GetRPCMethods</string><string>GetParameterNames</string><string>GetParameterValues</string><string>SetParameterValues</string><string>SetParameterAttributes</string><string>GetParameterAttributes</string><string>AddObject</string><string>DeleteObject</string><string>Reboot</string><string>FactoryReset</string><string>Download</string><string>Upload</string><string>ScheduleInform</string><string>GetQueuedTransfers</string><string>GetAllQueuedTransfers</string><string>ScheduleDownload</string><string>CancelTransfer</string><string>ChangeDUState</string></MethodList></cwmp:GetRPCMethodsResponse></soap:Body>
</soap:Envelope>
  • CPE请求,发送GetRPCMethods的响应
HTTP/1.1 200 OK
Date: Tue, 06 Apr 2021 09:05:45 GMT
Content-Type: text/xml; charset="UTF-8"
Content-Length: 566<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Header><cwmp:ID soap:mustUnderstand="1">72518d29</cwmp:ID></soap:Header><soap:Body><cwmp:GetParameterValues><ParameterNames soap-enc:arrayType="xsd:string[1]"><string>Device.ManagementServer.PeriodicInformInterval</string></ParameterNames></cwmp:GetParameterValues></soap:Body></soap:Envelope>POST /acs/grandstream HTTP/1.1
Host: acs.avsystem.com:10301
User-Agent: GRANDSTREAM CPE-0.21.3.31 (3.6.13)
Cookie: AVSSESSIONID=8FbL3sKSb9CFE4BrPp6WmmL_jZb81lXKOmCByV0ja-wILFtvXN_Zgg
Authorization: Digest username="", realm="ACSRealm", algorithm=MD5, nonce="JVwsZqxc3qEyTday/kL6C0H+BhQLbZCu", uri="/acs/grandstream", qop=auth, nc=0000000d, cnonce="428822b01d33404d", response="7598a61391e704feb7973476224382ce"
Content-Type: text/xml; charset=utf-8
SOAPAction: 
Content-Length: 737
  • ACS响应,发送getParameterValues的值。
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:cwmp="urn:dslforum-org:cwmp-1-0">
<soap:Header><cwmp:ID soap:mustUnderstand="1">72518d29</cwmp:ID>
</soap:Header>
<soap:Body>
<cwmp:GetParameterValuesResponse><ParameterList soap-enc:arrayType="cwmp:ParameterValueStruct[1]"><ParameterValueStruct><Name>Device.ManagementServer.PeriodicInformInterval</Name><Value xsi:type="xsd:unsignedInt">86400</Value></ParameterValueStruct></ParameterList>
</cwmp:GetParameterValuesResponse></soap:Body>
</soap:Envelope>
  • CPE回复ACS的结果
HTTP/1.1 204 No Content
Date: Tue, 06 Apr 2021 09:05:45 GMT
  • CPE请求关闭连接

http://chatgpt.dhexx.cn/article/Jcy39sBx.shtml

相关文章

网络协议篇之CWMP协议(三)—— RPC方法

一、CWMP方法 ACS对CPE的管理和监控是通过一系列的操作来实现的&#xff0c;这些操作在CWMP协议里称为RPC方法。主要方法的描述如下&#xff1a; Get&#xff1a;ACS使用该方法可以获取CPE上参数的值。 Set&#xff1a;ACS使用该方法可以设置CPE上参数的值。 Inform&#xf…

OpenWrt开发必备软件模块——网络管理(CWMP、SSH、QoS、SMTP、NTP、uHTTPd)

一、CWMP简介 CWMP&#xff08;CPE WAN Management Protocol&#xff09;是一个面向终端设备的网管技术规范。这个技术规范提供了对下一代网络中家庭网络设备进行管理配置的通用框架、消息规范、管理方法和数据模型。它由宽带&#xff08;Broadband&#xff09;论坛管理和发布…

CWMP(TR069)协议标准学习

协议栈分层 网关和ACS管理平台之间终端管理相关的管理接口协议栈层次如下图&#xff1a; 其中RPC层定义了网关远程管理中的远程调用方法集。 SOAP协议层定义了用来编译RPC方法的标准XML句法&#xff0c;其要求如下&#xff1a; 应支持SOAP 1.1。XML Schema文件头、SOAP信包头…

Openwrt常用软件模块之CWMP

Openwrt常用软件模块之CWMP CWMP概述 CWMP&#xff08;CPE WAN Management Protocol&#xff09;是一个面向终端设备的网管技术规范。这个技术规范提供了对下一代网络中家庭网络设备进行管理配置的通用框架、消息规范、管理方法和数据模型 。 它由宽带&#xff08;Broadband&a…

MPC

文章目录 前言1. 背景 Background1.1 滚动时域控制 Receding Horizon Control1.2 线性模型预测控制 Linear Model Predictive Control1.3 非线性模型预测控制 Nonlinear Model Predictive Control1.4 线性鲁棒模型预测控制 Linear Robust Model Predictive Control1.4.1 反馈预…

基于CWMP(TR069)协议ACS服务器的搭建

Linux上安装openacs Openacs的安装分为四大步&#xff1a; 1.安装jdk 2.安装jboss 3.安装mysql 4.部署openacs JDK简介 Java DevelopmentKit(JDK)是由Sun公司发布的针对Java开发人员发布的免费软件开发工具包(SDK, Software development kit)。自Java推出以来&#xff0c;JDK已…

CWMP\TR069协议学习随笔1——入门基础知识及环境搭建

什么是CWMP&#xff08;TR069&#xff09; CWMP是由数字用户线路DSL——Digital Subscriber’s Line论坛&#xff08;之后更名为broadband-forum&#xff09;发起开发的技术规范之一&#xff0c;编号为TR-069&#xff0c;所以又被称为TR-069协议 CWMP协议基础概念 CWMP的全称…

网络协议篇之CWMP协议(一)—— CWMP(TR-069)基础

一、CWMP&#xff08;TR-069&#xff09;概述 CWMP&#xff08;CPE WAN Management Protocol&#xff0c;CPE广域网管理协议&#xff09;是由DSL&#xff08;Digital Subscribers Line&#xff0c;数字用户线路&#xff09;论坛发起开发的技术规范之一&#xff0c;编号为TR-069…

CWMP

http://blog.163.com/yuan_zhch/blog/static/1937900462012111113320220/ TR-069简介 转 2012-12-01 23:33:20| 分类&#xff1a; CWMP相关 |字号 订阅 http://hi.baidu.com/huiweics 相关缩略语 ACS&#xff1a;Auto-Configuration Server &#xff08;自动配置服务器&a…

网络协议篇之CWMP协议(二)—— CWMP(TR-069)业务流程

一、 CWMP&#xff08;TR-069&#xff09;业务流程 软件架构以及协议的具体解析过程 二、 CWMP&#xff08;TR-069&#xff09;通信过程 我们来看一个tr069协议完整的通信过程. (1) 建立TCP连接。 (2) SSL初始化&#xff0c;建立安全机制。 (3) CPE发送Inform报文&#xff0…

关于CWMP基础(一)----(TR069)

CWMP&#xff08;TR069&#xff09; 概述TR069协议族主要功能网络架构关于RPC协议基础RPC协议的处理流程回路&#xff1a;SOAP协议基础CWMP基本功能 概述 1.为什么需要TR069? 随着VoIP、IPTV等越来越多IP终端设备的普及&#xff08;尤其在家庭中的普及&#xff09;&#xff…

CWMP (TR-069)技术介绍

CWMP (TR-069)技术介绍-新华三集团-H3C 目 录 CWMP (TR-069) CWMP&#xff08;TR-069&#xff09;概述 CWMP网络框架 CWMP基本功能 CWMP实现机制 CWMP (TR-069) CWMP&#xff08;TR-069&#xff09;概述 CWMP&#xff08;CPE WAN Management Protocol&#xff0c;CPE广域网管理…

CWMP协议简介

CWMP协议 1、概念2、网络架构3、协议栈结构协议各层概要 4、基本功能①ACS和CPE自动连接&#xff0c;CPE可以通过发送Inform报文自动连接ACS②支持ACS对CPE的自动配置③支持对CPE系统镜像文件和配置文件的上传/下载管理④支持ACS对CPE状态和性能的监控 5、TR-069主要方法①CPE …

神经网络算法详解 01:人工神经网络基础

本文介绍了人工智能的发展历史&#xff0c;基本概念&#xff0c;应用领域&#xff1b;神经元模型&#xff0c;神经元的学习规则以及神经网络工作原理。本系列文章来自阿里云大学人工智能学习路线中的《神经网络概览及神经网络算法详解》课程。 系列文章&#xff1a; 【神经网络…

神经网络算法总结

文章目录 前馈神经网络1. 单层前馈神经网络&#xff08;单层感知器&#xff09;2. 多层感知器 反馈神经网络径向基函数网络&#xff08;RBF网络&#xff09;1. 径向基函数2. 径向基函数网络的结构3. 径向基函数网络原理 Hopfield网络1. Hopfield网络结构2. Hopfield神经网络的两…

卷积神经网络有哪些算法,卷积神经网络算法实现

卷积神经网络通俗理解 。 卷积神经网络&#xff08;ConvolutionalNeuralNetworks,CNN&#xff09;是一类包含卷积计算且具有深度结构的前馈神经网络&#xff08;FeedforwardNeuralNetworks&#xff09;&#xff0c;是深度学习&#xff08;deeplearning&#xff09;的代表算法…

神经网络算法---手写数字体识别

文章目录 神经网络的背景多层向前神经网络设计神经网络结构交叉验方法 Backpropagation 算法激活函数手写数字例子 神经网络的背景 1&#xff0c;1980年backpropagation是神经网络算法最著名的算法&#xff0c;以人脑中的神经网络为启发。 多层向前神经网络 backpropagation…

遗传算法和神经网络算法区别与联系

1、关于遗传算法&#xff0c;模糊数学&#xff0c;神经网络三种数学的区别和联系 遗传算法是一种智能计算方法&#xff0c;针对不同的实际问题可以设计不同的计算程序。它主要有复制&#xff0c;交叉&#xff0c;变异三部分完成&#xff0c;是仿照生物进化过程来进行计算方法的…

卷积神经网络算法三大类,卷积神经网络算法实现

卷积神经网络算法是什么&#xff1f; 一维构筑、二维构筑、全卷积构筑。 卷积神经网络&#xff08;ConvolutionalNeuralNetworks,CNN&#xff09;是一类包含卷积计算且具有深度结构的前馈神经网络&#xff08;FeedforwardNeuralNetworks&#xff09;&#xff0c;是深度学习&a…

神经网络的基本原理,神经网络算法三大类

1、神经网络是什么&#xff1f; 生物神经网络主要是指人脑的神经网络&#xff0c;它是人工神经网络的技术原型。 人脑是人类思维的物质基础&#xff0c;思维的功能定位在大脑皮层&#xff0c;后者含有大约10^11个神经元&#xff0c;每个神经元又通过神经突触与大约103个其它神…