2019/03/07

測試Ubuntu上的GenieACS

摘要

本文記錄運行於VMware Workstation Player上的Ubuntu MATE作業系統安裝和測試GenieACS套件的要點。

本文

GenieACS是一個基於Broadband Forum之CWMP標準的網路管理解決方案中的伺服端實作。
隨後將於VMware Workstation 14 Player中的Ubuntu MATE 16.04上安裝GenieACS。
參考這裡可以得知,GenieACS相依於Node.js和MongoDB等套件。
先參考這裡來更新相依套件Node.js至v8版。
再來安裝相依套件MongoDB的2.6版;這裡僅僅下達sudo apt-get updatesudo apt-get install mongodb等指令。
安裝完之相依套件的具體版本如下所示。
接下來參考這裡安裝GenieACS core;過程中出現錯誤可由sudo chmod a+rwx /usr/lib/node_modules/sudo chmod a+rwx /usr/lib/node_modules/npm/、和sudo chown -R $USER:$(id -gn $USER) /home/user/.config來解決,留意,這裡的用戶賬號為user、而密碼為password,這份虛擬機器是從這裡下載的。
安裝完後便可執行genieacs-cwmp,搭配這裡所建構的EasyCwmp客戶端程式的測試結果如下所示。
摘錄GenieACS和EasyCwmp互動的HTTP封包內容如下。
 
HTTP/1.1 100 Continue

POST / HTTP/1.1
Host: 192.168.29.129:7547
User-Agent: easycwmp
Content-Type: text/xml; charset="utf-8"
SOAPAction:
Content-Length: 2799
Expect: 100-continue

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <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-2">
  <soap_env:Header>
   <cwmp:ID soap_env:mustUnderstand="1">1</cwmp:ID>
  </soap_env:Header>
  <soap_env:Body>
   <cwmp:Inform>
    <DeviceId>
     <Manufacturer>easycwmp</Manufacturer>
     <OUI>FFFFFF</OUI>
     <ProductClass>easycwmp</ProductClass>
     <SerialNumber>FFFFFF123456</SerialNumber>
    </DeviceId>
    <Event soap_enc:arrayType="cwmp:EventStruct[2]">
     <EventStruct>
      <EventCode>0 BOOTSTRAP</EventCode>
      <CommandKey />
     </EventStruct>
     <EventStruct>
      <EventCode>1 BOOT</EventCode>
      <CommandKey />
     </EventStruct>
    </Event>
    <MaxEnvelopes>1</MaxEnvelopes>
    <CurrentTime>2019-03-06T10:55:33-05:00</CurrentTime>
    <RetryCount>0</RetryCount>
    <ParameterList soap_enc:arrayType="cwmp:ParameterValueStruct[10]">
     <ParameterValueStruct>
      <Name>Device.DeviceInfo.SpecVersion</Name>
      <Value xsi:type="xsd:string">1.0</Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>Device.DeviceInfo.ProvisioningCode</Name>
      <Value xsi:type="xsd:string"></Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>Device.DeviceInfo.Manufacturer</Name>
      <Value xsi:type="xsd:string">easycwmp</Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>Device.DeviceInfo.ManufacturerOUI</Name>
      <Value xsi:type="xsd:string">FFFFFF</Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>Device.DeviceInfo.ProductClass</Name>
      <Value xsi:type="xsd:string">easycwmp</Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>Device.DeviceInfo.SerialNumber</Name>
      <Value xsi:type="xsd:string">FFFFFF123456</Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>Device.DeviceInfo.HardwareVersion</Name>
      <Value xsi:type="xsd:string">example_hw_version</Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>Device.DeviceInfo.SoftwareVersion</Name>
      <Value xsi:type="xsd:string">example_sw_version</Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>Device.ManagementServer.ConnectionRequestURL</Name>
      <Value xsi:type="xsd:string"></Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>Device.ManagementServer.ParameterKey</Name>
      <Value xsi:type="xsd:string"></Value>
     </ParameterValueStruct>
    </ParameterList>
   </cwmp:Inform>
  </soap_env:Body>
 </soap_env:Envelope>

HTTP/1.1 200 OK
Server: GenieACS/1.1.3
SOAPServer: GenieACS/1.1.3
Content-Type: text/xml; charset="utf-8"
Set-Cookie: session=4fdf4ccca5522abd
Content-Length: 522
Date: Wed, 06 Mar 2019 15:55:33 GMT
Connection: keep-alive

<?xml version="1.0" encoding="UTF-8"?>
<soap-env:Envelope xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap-env="http://schemas.xmlsoap.org/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-2"><soap-env:Header><cwmp:ID soap-env:mustUnderstand="1">1</cwmp:ID></soap-env:Header><soap-env:Body><cwmp:InformResponse><MaxEnvelopes>1</MaxEnvelopes></cwmp:InformResponse></soap-env:Body></soap-env:Envelope>

POST / HTTP/1.1
Host: 192.168.29.129:7547
Cookie: session=4fdf4ccca5522abd
User-Agent: easycwmp
Content-Type: text/xml; charset="utf-8"
Content-Length: 0

HTTP/1.1 204 No Content
Server: GenieACS/1.1.3
SOAPServer: GenieACS/1.1.3
Connection: close
Content-Length: 0
Date: Wed, 06 Mar 2019 15:55:33 GMT





2 則留言:

  1. 請問 您有使用過push file的功能嗎 ?

    回覆刪除
    回覆
    1. 不好意思,我還沒有用過push file耶…。

      刪除