User Tools

Site Tools

This wiki is read only and for archival purposes only. >>>>>>>>>> Please use the new OpenWrt wiki at <<<<<<<<<<

This is an old revision of the document!

Table of Contents

EasyCwmp (CPE WAN Management Protocol daemon)

EasyCwmp project is a client implementation of TR-069 for OpenWrt. Code is licensed under GPL 2 and can be accessed at

EasyCwmp is developed by PIVA Software.The aim of this project is to be fully compliant with the TR069 CWMP standard.


In TR-069 it's CPE role to initiate connection (session) with ACS (Auto Configuration Server) and this is what ucwmpd is responsible for. It's a daemon that reads config from cwmp UCI section (so it's usually located in /etc/config/cwmp) and starts sessions with ACS when needed.

ucwmpd daemons knows almost nothing about TR-069 protocol, all it understands are events. It needs to be aware of them as it knows exactly the reason for starting a session (this could be 0 BOOTSTRAP, 2 PERIODIC, 6 CONNECTION REQUEST, etc.).

It registers in ubus a cwmp object with following methods:

Method Argments Description
server_info_get { } Dump current config (info about ACS, periodic config, etc.)
server_info_set ? Update config
connection_request { "username": "username", "realm": "realm", "nonce": "nonce", "uri": "uri", "response": "response", "cnonce": "cnonce", "nc": "nc" } Request for initializing connection (session) with an ACS
event_sent ? ?
event_add ? ?
session_completed ? ?

When session is supposed to be started, ucwmpd executes external binary called cwmp-session with the following arguments:

-d <level>	Debugging level
-e <json>	List of events as JSON
-I <path>	Path to JSON with device info (Manufacturer, ModelName, SerialNumber, etc.)
-m <path>	Path to JSONs definint data model (eg. TR-098)




Since ACS is a server and CPE is a client, there isn't a stadard way for ACS to initiate a connection. TR-069 however specifies a way to workaround this limitation. ACS can request CPE to initiate session by accessing a special HTTP URL. This way ACS may inform CPE that configuration was updated and ask it to reconfigure without waiting for a periodical request.

In ucwmp project this is handled by CGI compatible connreq binary. It simply requires configuring uhttpd (or some different HTTP server) to handle some specific URL with a connreq CGI.

When connreq is called, it verifies ACS request using CGI environment variables (HTTP_AUTHORIZATION and REQUEST_URI) and calls connection_request ubus method. As the result ucwmpd will start a session if the authorization succeeded.

doc/techref/ucwmp.1475486147.txt.bz2 · Last modified: 2016/10/03 11:15 by mohamed.kallel