dpavlin / perl-cwmp

Perl ACS server implementing CWMP protocol to manage CPE clients
http://blog.rot13.org/perl-cwmp/
56 stars 20 forks source link

Please accept those modifications #7

Closed delian closed 10 years ago

delian commented 10 years ago

I have made 3 modifications to the code to improve it. They work well for my use and I am sure they will be useful to others as well.

The first modification is that I updated (according to the current standard) the SOAP header. Because it was incorrectly set many TR069 devices I have tested (and basically all that worked with the Broadcom TR069 client) was rejecting the request.

The second modification is that all the properties now may have type. Before it was unspecified. The current broadband forum standard requests this strictly and many devices do not accept SetParameter requests from this ACS server.

Because this ACS server does not know the XSD, you have to set it specifically if you need to. This is an example how to do it (unsigned int of 60). If you dont specify it, it keeps the previous default behavior: InternetGatewayDevice.ManagementServer.PeriodicInformInterval: #xsd:unsignedInt#60

The third modification allows the insertion of a value of previously read variable. You can use that value by ${}. Here is an example to set a password to the value of the Serial Number: InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Password: ${InternetGatewayDevice.DeviceInfo.SerialNumber}

Also we can execute external code and evaluate the output. This is an example: InternetGatewayDevice.DeviceInfo.ProvisioningCode: $[ ./blabla.pl ${InternetGatewayDevice.LANDevice.1.LANEthernetInterfaceConfig.1.MACAddress} ${InternetGatewayDevice.DeviceInfo.SerialNumber}; "configured" ]

All this is very valuable for dynamic and automated configurations without the need of modification of the core code, just modifying the configuration file.

delian commented 10 years ago

Thank you very much :) On Oct 10, 2014 12:33 PM, "Dobrica Pavlinušić" notifications@github.com wrote:

Merged #7 https://github.com/dpavlin/perl-cwmp/pull/7.

— Reply to this email directly or view it on GitHub https://github.com/dpavlin/perl-cwmp/pull/7#event-176839547.