`
itwangxinli
  • 浏览: 143676 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论
阅读更多
  上次说到ACS的建立,其实就是接收AP定时Inform过来的消息。既然服务端建好了,接下来,就要AP访问服务端。也就是对Ap的配置。
    一般说来,AP是支持Telnet的,所有可以通过telnet来访问AP。再次申明本次开发使用的是H3C的AP,别的类型的AP可能会稍有不同。
    1.在windows command 中输入telnet 192.168.1.200 (说明:AP的地址,具体怎么   配置AP的IP请参考AP的说明书)。
    2.授权登陆,直接输入AP的用户名和密码了。
    3.登录成功后,输入system-view
    4.输入cwmp
    5.依次输入以下command:
          1)cwmp acs url http://192.168.1.99:8080/TestWeb/acs
          2)cwmp acs username itms password itms
          3)cwmp cpe username itms password itms
          说明:1)是设置ACS的服务器URL,即servlet部署后的地址。
                 2)访问ACS的用户名跟密码,不需要的话,随便填写好了,但建议不要为    null  ""
               3)设置ACS访问AP的密码,必选选项,而且需要记住,当ACS呼叫AP的时候是需要用到的。
       6.如果让CPE立即给ACS发送消息,那么可以输入以下命令:
       1)undo cwmp enable
       2)cwmp enable
      7.查看cwmp的配置
       1)display cwmp status
       8.登出
         1)quit

以上是配置CWMP.然后去你的tomcat控制台或者MyEclipse的控制台,你就能看到AP给你发送的消息了,如果没有收到,你查看AP配置是否正确。特别是ACS的url。
如果不出意外,你能够收到类似的消息:
<soap:Envelope 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"
                                      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
                                      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
        <soap:Header>
            <cwmp:ID soap:mustUnderstand="1">1</cwmp:ID>
        </soap:Header>
        <soap:Body>
                  <cwmp:Inform>
            <DeviceId>
                <Manufacturer>H3C</Manufacturer>
                <OUI>000FE2</OUI>
                <ProductClass>Gateway</ProductClass>
                <SerialNumber>210235A32MC085003208</SerialNumber>
            </DeviceId>
            <Event soapenc:arrayType="cwmp:EventStruct[1]">
                <EventStruct>
                  <EventCode>0 BOOTSTRAP</EventCode>
                  <CommandKey></CommandKey>
                </EventStruct>
            </Event>
            <MaxEnvelopes>1</MaxEnvelopes>
            <CurrentTime>2000-05-10T09:55:50</CurrentTime>
            <RetryCount>0</RetryCount>
            <ParameterList soapenc:arrayType="cwmp:ParameterValueStruct[8]">
                <ParameterValueStruct>
                    <Name>InternetGatewayDevice.DeviceSummary</Name>
                    <Value soap:type="soap:string">InternetGatewayDevice:1.0[](Baseline:1)</Value>
                </ParameterValueStruct>
                <ParameterValueStruct>
                    <Name>InternetGatewayDevice.DeviceInfo.SpecVersion</Name>
                    <Value soap:type="soap:string">1.0</Value>
                </ParameterValueStruct>
                <ParameterValueStruct>
                    <Name>InternetGatewayDevice.DeviceInfo.HardwareVersion</Name>
                    <Value soap:type="soap:string">Ver.A</Value>
                </ParameterValueStruct>
                <ParameterValueStruct>
                    <Name>InternetGatewayDevice.DeviceInfo.SoftwareVersion</Name>
                    <Value soap:type="soap:string">V100R001B47D011SP01</Value>
                </ParameterValueStruct>
                <ParameterValueStruct>
                    <Name>InternetGatewayDevice.DeviceInfo.ProvisioningCode</Name>
                    <Value soap:type="soap:string">ProvisioningCode</Value>
                </ParameterValueStruct>
                <ParameterValueStruct>
                    <Name>InternetGatewayDevice.ManagementServer.ConnectionRequestURL</Name>
                    <Value soap:type="soap:string">http://192.168.1.200:7547/cpe</Value>
                </ParameterValueStruct>
                <ParameterValueStruct>
                    <Name>InternetGatewayDevice.ManagementServer.ParameterKey</Name>
                    <Value soap:type="soap:string"></Value>
                </ParameterValueStruct>
                <ParameterValueStruct>
                    <Name>InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.ExternalIPAddress</Name>
                    <Value soap:type="soap:string">192.168.1.200</Value>
                </ParameterValueStruct>
            </ParameterList>
          </cwmp:Inform>

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


呵呵,这就是AP给ACS发送的Inform了。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics