After nine months of playing with Thompson ADSL modems I have two projects which I wrote in perl, both of which is, as far as I know, first Open Source GPL implementation of those protocols.
MDAP
MDAP is protocol used by Thompson CPE devices to issue commands to CPEs (called ants) using multicast address 224.0.0.103 and port 3235 registered by IANA.
It's very cool idea, since you can connect as many devices as you have network ports or bandwidth, and allthough they all will boot with same IP address (and this create conflicts on IP network), you can still sand commands to each individual device using multicast.
Originally I developed it to flash multiple modems at once, but since I also added simple rules to change IP addresses and issue commands to devices. This essentially enables you to flash devices to some version of firmware and then change configuration a bit and have you test lab ready in few moments.
This project doesn't have a real project page yet, but you can take a look at source if you are interested...
This project also include (but doesn't use yet) simple perl BOOTP and TFTP servers, so in the end it will probably have perl-only solution for MDAP. If you just use included scripts and documentation for setup, it will use binary bootp and tftp server since this configuration was in use for at least half of the year, and I consider it stable.
CWMP
Perl CWMP server is essentially a low-level support for broken idea to communicate with devices using persistent connection SOAP with invalid XML (name spaces in some responses are just invalid) known as TR-069.
This is work-in-progress, and right now it's stable enough to work with multiple devices at once. In essence, it's protocol-violating SOAP server implementing persistent connection handling as described in TR-069 documentation (empty post, even without headers as first request, ehhh....).
Idea is to enable you, the user, to write perl rules against CPE devices.
It's half-way there: It does have disk-based command queue for each device (which is also NFS save, which is nice if you want to have multiple servers) and persistent storage for each CPE internal data tree implemented using DBM::Deep or YAML. When used with YAML, it great way to understand protocol. However, not all methods are implemented, but I hope to have full implementation by end of January 2008.

Comments (4)
Hi Dobrica,
A couple of nice projects here, I'm looking for a testing TR-069 CWMP client, any change you've come across one of these?
Thanks,
Matt Turner
Posted by Matt Turner
|
November 27, 2010 9:32 AM
Posted on November 27, 2010 09:32
Sure, I recently re-wrote XML parser to make it more agnostic to various quirks in TR-096 implementation, take a look at at http://blog.rot13.org/2010/03/so_you_need_acs_server_which_implements_cwmp_protocol.html
Posted by Dobrica Pavlinušić
|
November 27, 2010 12:54 PM
Posted on November 27, 2010 12:54
Hi Dobrica,
First of all I would like to congratulate you on the great job. I have already tested perl-cwmp with fritz!Box Cable that I have connected in my lab.
Now I just need a bit of a help here. I can setParameter on the CPE via vendor.yml file, but it applys on all of the CPEs (reboot for instance). Also could you point me on how to get a simple getResponse on a specific host (let's say InternetGatewayDevice.LANDevice.1.LANEthernetInterfaceConfig.1.Name).
My goal is to on the first connection of the CPE (in my case fritz!BOX) it would automaticly assign the SIP phone number and maybe some other variables like firmware upgrade.
Once again Great Job!
Thanks,
Janko Bajc
Posted by Janko Bajc
|
January 7, 2011 8:26 PM
Posted on January 7, 2011 20:26
You can implement it in two different ways:
Modifing CWMP::Vendor enables you to write part of perl code which will be executed every time we get request from CPE.
This is good place for sensible defaults (which are currently implemented as yaml file).
On the other hand, if you want to send specific request to specific CPE, there is bin/cpe-queue.pl which includes in source examples how to en-queue requests for CPE.
We could also move this discussion to googlegroup for this project: https://groups.google.com/forum/#!forum/perl-cwmp
Posted by Dobrica Pavlinušić
|
January 10, 2011 6:34 PM
Posted on January 10, 2011 18:34