TR-069 Protocol Support

This page is a reference for the TR-069/CWMP protocol features the emulator implements: the CWMP RPC methods an ACS can call, the events the CPE raises, the Connection Request transports, and the supported diagnostics, software-module and bulk-data profiles.

Most of these features are exercised by the ACS against a running emulated device (they are part of the TR-069 data model), rather than from the Web UI. Use Single Emulator Mode (or the /apiV2 API) to start a device and watch the resulting sessions in the live log.

Supported CWMP RPC Methods

When the ACS calls GetRPCMethods, the emulated CPE advertises the following methods (defined in cpe_methods.txt). The emulator processes each of them in an ACS-initiated session:

RPC Method Direction Description

GetRPCMethods

ACS → CPE

Return the list of RPC methods the CPE supports

GetParameterValues

ACS → CPE

Read one or more parameter values from the data model

SetParameterValues

ACS → CPE

Write parameter values atomically, all or none, with one fault per bad parameter — see SetParameterValues and CWMP Faults (triggers diagnostics when a DiagnosticsState is set)

GetParameterNames

ACS → CPE

Enumerate parameter/object names under a path (honours NextLevel). The list is the device’s tree plus the instances it added minus the ones it deleted, each with its Writable flag; an unknown path (or one below a deleted instance) is fault 9005, and NextLevel=true on a full parameter name is fault 9003

GetParameterAttributes

ACS → CPE

Read notification/access-list attributes

SetParameterAttributes

ACS → CPE

Set the notification level (active/passive/off) on parameters

AddObject

ACS → CPE

Create a new object instance (e.g. a WiFi SSID or a PortMapping). The target must be a multi-instance object, else fault 9005. A table the data model knows gets its template; any other table is recognised from the device’s own tree (a copy of its lowest instance with the values reset, or just the instance object when the tree has only the …​NumberOfEntries). A read-only table is accepted (no fault 9001). The table’s …​NumberOfEntries is recounted for this device only

DeleteObject

ACS → CPE

Remove an object instance and everything under it. An unknown instance, or a name that is not one instance of a multi-instance object, is fault 9005; the table’s …​NumberOfEntries is recounted

Download

ACS → CPE

Firmware / config file download (HTTP or FTP) — see File Transfers (Download / Upload)

Upload

ACS → CPE

File upload (HTTP or FTP) — see File Transfers (Download / Upload)

Reboot

ACS → CPE

Reboot the device (the next Inform carries 1 BOOT and M Reboot; M Reboot carries the CommandKey of the Reboot call — see TR-069 Event Codes)

FactoryReset

ACS → CPE

Drop every change the ACS made and go back to what the device was started with: a device started on its own keeps its parameter tree, ACS URL and ACS credentials, a Load Test device gets the global settings; ManagementServer.HTTPConnectionRequestEnable is back to its factory value: the tree’s own, or, for a parameter that only the start flag added, removed with the device enabled (raises a 0 BOOTSTRAP event)

ChangeDUState

ACS → CPE

Install / Update / Uninstall a Deployment Unit — see Software Modules (Deployment Units, TR-157)

The CPE also issues Inform at the start of every session and TransferComplete after a Download/Upload completes. The events that open a session are listed in TR-069 Event Codes.

SetParameterValues and CWMP Faults

SetParameterValues is atomic (TR-069 A.3.2.1): the emulator checks every parameter of the request first and applies them only when all of them are valid. If any parameter is in error, no value is changed (and ManagementServer.ParameterKey keeps its old value) and the CPE answers with fault 9003 Invalid arguments that carries one SetParameterValuesFault per parameter in error, in request order. The checks, in this order, for each parameter:

Fault Raised when

9005 Invalid Parameter name

The name is unknown, is an object path (empty or ending in .), or the object instance was deleted

9008 Attempt to set a non-writable Parameter

The parameter’s Writable is 0 in the parameter tree

9006 Invalid Parameter type

The request’s xsi:type is not a TR-069 type, or is of another non-string kind than the parameter’s tree type (for example boolean for an int, dateTime for a boolean, hexBinary for a base64). The integer types (int, long, integer, short, byte, unsignedInt, unsignedShort, unsignedByte, unsignedLong, …​) are one kind. xsd:string, a missing xsi:type and anySimpleType are accepted for every parameter, and a string parameter accepts every known type: the CPE is lenient, the ACS labels the value. The value is then checked against the tree type (9007) and the tree type is what GetParameterValues reports

9007 Invalid Parameter value

The value is outside the parameter type’s lexical space or range: unsignedInt 0..4294967295, int -2147483648..2147483647, long, unsignedLong, boolean (0, 1, true, false), dateTime (xsd:dateTime, e.g. 2026-10-21T08:30:00Z), base64, hexBinary, and the maximum length of a string(N) type

The parameter tree carries no enumerations or ranges beyond the type, so none are checked. A parameter whose tree type is null or unknown is checked against the request’s xsi:type only. A parameter named twice in one request is 9003 without a SetParameterValuesFault (no single parameter is to blame). The values are written before the response is sent, so SetParameterValuesResponse carries Status 0 (changes applied, TR-069 A.3.2.1). A failing side effect (diagnostics start, auto-channel) is logged and does not fault the request.

On success the new values are applied together and the ParameterKey of the request is stored. A forced COMPLETED task result (taskResultSetParameterValues) also stores the ParameterKey, but changes no value. A SetParameterValues raises no 4 VALUE CHANGE event, and changing XMPP connection-request parameters still triggers the XMPP check at the end of the session.

A request that lacks a required argument (for example ParameterList, a parameter’s Name or Value, or the URL / DelaySeconds of a Download or Upload) or carries a non-numeric number field (DelaySeconds) is answered with 9003 Invalid arguments. Any other unexpected internal error is 9002 Internal error.

The CPE fault codes and their SOAP faultcode (TR-069 A.5.1, Table 87; Client or Server) are:

Code Fault string SOAP faultcode

9000

Method not supported

Server

9001

Request denied

Server

9002

Internal error

Server

9003

Invalid arguments

Client

9004

Resources exceeded

Server

9005

Invalid Parameter name

Client

9006

Invalid Parameter type

Client

9007

Invalid Parameter value

Client

9008

Attempt to set a non-writable Parameter

Client

9009

Notification request rejected

Server

9010-9019

File transfer failures (9010 File transfer failure, 9011 Upload failure, 9012 server authentication failure, 9013 unsupported protocol, 9014 unable to join multicast group, 9015 unable to contact file server, 9016 unable to access file, 9017 unable to complete download, 9018 file corrupted or otherwise unusable, 9019 file authentication failure)

Server

9020

File transfer failure: unable to complete download within specified time windows

Client

9021

Cancelation of file transfer not permitted in current transfer state

Client

9022

Invalid UUID Format

Server

9023

Unknown Execution Environment

Server

9024

Disabled Execution Environment

Server

9025

Deployment Unit to Execution Environment Mismatch

Server

9026

Duplicate Deployment Unit

Server

9027

System Resources Exceeded

Server

9028

Unknown Deployment Unit

Server

9029

Invalid Deployment Unit State

Server

9030

Invalid Deployment Unit Update - Downgrade not permitted

Server

9031

Invalid Deployment Unit Update - Version not specified

Server

9032

Invalid Deployment Unit Update - Version already exists

Server

TR-069 Event Codes

The emulator can raise the following CWMP events. They open a session with the ACS and appear in the device log as <code> <NAME>.

Event Name Code Meaning

BootStrap

0

Initial setup, factory reset, or a change of the ACS URL

Boot

1

Device power-up or reboot. The first Inform after a power-up, a factory reset, a stop and start, or a Load Test device creation carries 0 BOOTSTRAP and 1 BOOT together; a change of the ACS URL raises 0 BOOTSTRAP alone

Periodic

2

Scheduled inform (see Periodic Inform and UpTime)

ValueChange

4

A parameter with active notification changed

ConnectionRequest

6

ACS-initiated connection request (see Connection Request Transports)

TransferComplete

7

Download/upload completed

Diagnostics

8

Diagnostics complete (see Diagnostics)

DUStateChangeComplete

11

Deployment-unit state change complete (see Software Modules (Deployment Units, TR-157))

MReboot

M Reboot

The device rebooted on a Reboot RPC; sent with 1 BOOT

MDownload

M Download

A Download finished; sent with 7 TRANSFER COMPLETE

MUpload

M Upload

An Upload finished; sent with 7 TRANSFER COMPLETE

MChangeDUState

M ChangeDUState

A ChangeDUState finished; sent with 11 DU STATE CHANGE COMPLETE

The M …​ events (TR-069 3.7.1.5, Table 8) are raised by the RPC they are named after, never by hand, and have no numeric code. M ScheduleInform and M ScheduleDownload are not generated: the emulator does not implement those RPCs.

  • CommandKey. Per Table 40 each M …​ event carries the CommandKey of the originating Reboot, Download, Upload or ChangeDUState call (empty when the call had none). Every other event, 7 TRANSFER COMPLETE and 11 DU STATE CHANGE COMPLETE included, has an empty CommandKey; the TransferComplete and DUStateChangeComplete RPCs keep their own CommandKey argument.

  • Retry. A failed session redelivers its undelivered events, 0 BOOTSTRAP and 1 BOOT as a pair, but not 6 CONNECTION REQUEST (Table 8: "MUST NOT retry delivery"). A retried power-up Inform keeps the 0 BOOTSTRAP / 1 BOOT pair.

  • Multiple. Two completed transfers whose TransferComplete the ACS has not yet answered give two M Download entries, each with its own key. The plain events are Single: they appear once.

  • Delivery. An M …​ event is kept, across failed or interrupted sessions, until the ACS gave the response Table 8 names: InformResponse for M Reboot, TransferCompleteResponse for M Download and M Upload, DUStateChangeCompleteResponse for M ChangeDUState. The TransferComplete RPCs of several pending transfers go out one after the other in a session. The undelivered events live in the emulator’s memory only.

  • Discard. 0 BOOTSTRAP (a factory reset or a change of the ACS URL) discard the undelivered M …​ events, as do a single-device Stop, a FactoryReset and a stop-all with clear. A stop-all without clear keeps them (Table 8 discards only on BOOTSTRAP).

Events can be triggered manually for a Single Mode device through POST /apiV2/invoke (field eventName, using the exact names above; the M …​ events, 7 TRANSFER COMPLETE and 11 DU STATE CHANGE COMPLETE are rejected with 400, only their RPC raises them; so is an unknown or missing eventName).

The Single Mode Invoke Event dropdown exposes codes 0, 1, 2, 4, 6, 8. TransferComplete (7) and DUStateChangeComplete (11) are not in the dropdown, and /apiV2/invoke rejects both with 400: only their RPC raises them.

Connection Request Transports

A Connection Request is the mechanism an ACS uses to ask a device to start a session immediately, rather than waiting for the next periodic inform. The emulator supports all three TR-069 transports:

Transport Enabled by Notes

HTTP (default)

connectionRequestEnabled (Load Test) / Enable HTTP Connection Request (Single Mode)

A listener on port 9999 accepts an authenticated GET /{serial} from the ACS (HTTP Digest, see Connection Request authentication) and opens a 6 CONNECTION REQUEST session. This is the common path and the only one with a UI toggle. See Connection Request Host. The mechanism follows the TR-181 parameter Device.ManagementServer.HTTPConnectionRequestEnable (TR-069 3.2.2.2): the ACS sets it to false with SetParameterValues (or a Single start with the flag unticked sets it) and the device’s ConnectionRequestURL becomes empty and a request for its serial is dropped without an HTTP response, the connection being closed (reset). The ACS’s own write starts no session, and the next Inform carries 4 VALUE CHANGE with the changed ConnectionRequestURL (TR-069 A.3.3.1). The listener port stays open, since it is shared by all devices; that is the closest it can come to closing the port for one device. Setting the parameter back to true restores the URL and the 200 answer. TR-098 has no such parameter. A factory reset puts a tree-defined parameter back to its own value and removes one that only the flag added (the device is then enabled).

XMPP (CWMP Annex K)

Data-model objects (ManagementServer…​XMPP)

When the device’s parameter tree contains an enabled XMPP connection-request profile, the emulator connects to the XMPP server and listens for connection-request IQ stanzas. The server is the enabled Server. entry of the connection, or, with ServerConnectAlgorithm DNS-SRV, the Domain itself on port 5222 (no SRV lookup). UseTLS true connects with TLS or not at all; false starts TLS only when the server requires it (STARTTLS with <required/>), as TR-181 says; TLSEstablished reports which it was. While the connection’s Enable is false, its Status is Disabled, as TR-181 says (a missing username, password or domain gives Error_Misconfigured). It makes up to ServerConnectAttempts attempts with the TR-181 reconnection wait between two of them: before reconnect n a random time from 0 to ServerRetryInitialInterval × (ServerRetryIntervalMultiplier / 1000)n-1 seconds, at most ServerRetryMaxInterval seconds (with the defaults up to 1, 2, 4 … 512 minutes). Each failed attempt is one log line. Templates: xmpp_connection_obj.xml, xmpp_server_obj.xml.

UDP / STUN

ManagementServer.STUNEnable + ManagementServer.UDPConnectionRequestAddress

When STUNEnable is true, the emulator runs a STUN client to discover its NAT-mapped address, publishes it in UDPConnectionRequestAddress, and accepts UDP connection requests. The STUN open (DNS lookup and connect) runs in the background after the session has ended, as a CPE’s STUN client runs independently of its CWMP session, and is tried again at every session end while it is not connected (CWMP Annex G.2.1.1: while STUNEnable is true the CPE must send Binding Requests to the STUN server). A STUN server that does not resolve, or that resolves but cannot be reached, is warned about once per server address and port while the same failure repeats (again when it changes) and logged once at INFO when it works again (its Binding Request is answered). A session end that arrives while the open is running is not lost: the open is run once more when it ended unconnected. The CWMP session is unaffected.

HTTP Connection Request is the only transport with a Web UI / REST toggle. XMPP and UDP/STUN are driven entirely by the device data model — include (and enable) the relevant ManagementServer objects in the parameter-tree XML you load.

Connection Request authentication

The device authenticates every Connection Request with its own ManagementServer.ConnectionRequestUsername and ConnectionRequestPassword, read from the device’s tree at request time. A request that does not authenticate opens no session, on any transport.

Transport Rule

HTTP and HTTPS

HTTP Digest (TR-069 3.2.2.2, RFC 7616), MD5 with qop=auth. A GET /{serial} without valid credentials gets 401 with a WWW-Authenticate: Digest realm="TR-069 CPE", qop="auth", algorithm=MD5, nonce="…​" challenge; the answer must carry the device’s username and the matching response, a uri equal to the request target, and a nonce issued for this device. The nonce is bound to the serial, so a nonce of one device fails on another. Per nonce the highest nc accepted is kept: a repeated or lower nc gets 401 with a fresh nonce, a higher one is accepted (what an HTTP client sends on a retry). A nonce older than 60 seconds with a correct answer gets 401 with stale=true, so the client answers the new nonce without asking for the password again. username*, userhash and SHA-256 are not offered or accepted.

UDP

CWMP Annex G.2.1.4 and G.2.2.3. The datagram must be an HTTP 1.1 GET request line with exactly one each of ts, id, un, cn and sig. un must be the device’s username, sig the hex HMAC-SHA1 (any case), keyed with the password, of ts, id, un and cn concatenated. ts must be greater than, and id different from, the last request accepted for the device (kept until the device stops). Any other datagram is ignored without an answer and logged at INFO with the reason (UDP Connection Request ignored), never with a value. A valid request is logged at INFO after the device decided on it: accepted, or dropped with the reason when a session runs and its follow-up is already queued. The values are checked as sent, then percent-decoded. Only the request line is read: a datagram without a Host header (what FT ACS sends) is accepted, a deliberate leniency against "a valid HTTP 1.1 GET".

XMPP

CWMP Annex K.2.3.3. The username and password of the connection-request IQ must match the device’s. The sender must be listed in ConnReqAllowedJabberIDs when that list is not empty: a bare entry (acs@example.com) matches that JID with any resource, a full entry (acs@example.com/acs) only itself; no substring match. A wrong credential, or a device without a username, is answered with a not-authorized error IQ, a sender not listed with service-unavailable. The error IQ never echoes the credentials. The start parameter below does not change XMPP.

One session per window. While a device runs a session and a follow-up Connection Request is already queued, a further request gets 503 with an empty body (HTTP and HTTPS), a service-unavailable error IQ (XMPP) or is dropped (UDP), as TR-069 3.2.2.2 asks for requests the device does not accept. The log line names the reason: follow-up-session-queued, or follow-up-thread-not-started when the emulator could not start the thread for the follow-up (out of threads or memory). A full nonce ledger (see Limits) also answers 503 on HTTP and HTTPS. Otherwise a request that arrives while an earlier one has not yet led to its Inform joins it: 200, no second session. Both kinds count in coalesced of /apiV2/invoke/decisions.

Start parameter. connectionRequestAuthEnabled (variable EMULATOR_CONNECTION_REQUEST_AUTH_ENABLED, chart value fleet.connectionRequestAuth) is true by default. false restores the old behaviour for a client that cannot authenticate: HTTP and HTTPS accept a request without Digest, UDP checks only that the keys are present. The emulator then logs one WARN, when its shared services start (once per run, also with connectionRequestEnabled=false and whether or not the HTTP listener binds), that cites TR-069 3.2.2.2 and G.2.1.4. Only true, false, 1 and 0 are read. In the parameter file and through the REST API or the web UI any other value logs an ERROR and keeps authentication on; in EMULATOR_CONNECTION_REQUEST_AUTH_ENABLED it stops the startup. There is no command-line argument for this parameter.

Limits.

  • A device without a ConnectionRequestUsername refuses every Connection Request: 401 on HTTP, ignored on UDP, not-authorized on XMPP.

  • Credential values are read trimmed: a username or password with leading or trailing white space is compared without it (the tree file wraps values across lines).

  • The default tree of the image (cpe_params.xml) carries the username ftacs and an empty password. A device left on them authenticates anyone who knows ftacs. Set your own credentials, by the tree or by SetParameterValues, for a device an untrusted network can reach.

  • The nonce ledger keeps up to 65 536 entries per JVM. When it is full, a request gets 503 until expired entries are removed. Only a request that authenticated writes to the ledger, so it fills only for someone who knows the device’s credentials (the public default ones, on a device left on them). Without a full ledger expired entries are removed once a second at most; a full ledger removes them on each new nonce.

HTTPS Connection Request

The HTTP listener can also serve HTTPS. Start the JVM with an https:// Connection Request address and the emulator opens an additional TLS listener. It serves the operator PEM pair from -Dconnection.request.cert (X.509 certificate) / -Dconnection.request.key (PKCS#8 private key); when absent, unreadable or expired it generates a self-signed CN=localhost certificate at startup (new key every start, never expires) and logs one WARN with its notAfter:

java -Dconnection.request.address=https://<host>:<port> \
  -Dconnection.request.cert=/path/cr-cert.pem \
  -Dconnection.request.key=/path/cr-key.pem \
  -jar target/FTCpeEmulator.jar --web-mode

The -D options must precede -jar: anything after the JAR name is passed to the application as an argument and does not set a system property. Omit the cert/key pair to use the generated certificate. If no certificate can be built at all, the TLS listener does not start and the reason is logged at ERROR; the HTTP listener still serves.

The FT ACS validates the Connection Request TLS certificate against its own JVM truststore, so for HTTPS Connection Requests from it supply a certificate the ACS trusts (the generated one changes on every start). The generated certificate names only localhost, so a client that verifies the host name (curl or openssl without -k) accepts it only on localhost; for any other host supply the operator pair.

HTTPS deviates from TR-069 3.2.2.2, which says the CPE MUST use HTTP, not HTTPS, for the Connection Request. The emulator logs one WARN with that clause when the TLS listener starts. Digest authentication applies to it as to HTTP (Connection Request authentication).

The listener port can be overridden with -Dconnection.request.port (default 9999). See Environment Variables for the Docker mapping of CONNECTION_REQUEST_HOST.

Diagnostics

The emulator implements the standard TR-069 diagnostic state machine: the ACS sets the diagnostic object’s DiagnosticsState to Requested (via SetParameterValues), the emulator runs the test, writes the result parameters and raises an 8 DIAGNOSTICS COMPLETE event.

Diagnostic Trigger object (parameter prefix)

IP Ping

IPPingDiagnostics. / …​IPPing.

TraceRoute

TraceRouteDiagnostics. / …​TraceRoute.

Download Diagnostics

DownloadDiagnostics.

Upload Diagnostics

UploadDiagnostics.

UDP Echo (config + send)

UDPEchoConfig. / UDPEcho…​

Neighboring WiFi Diagnostic

NeighboringWiFiDiagnostic.

IP Layer Capacity Metrics

IPLayerCapacityMetrics.

Vendor WiFi (X_ATP_WiFi)

X_ATP_WiFi.

Download and Upload diagnostics never use HTTP authentication, as TR-181 DownloadURL / UploadURL require ("When using HTTP transport the HTTP Authentication MUST NOT be used"): a 401 from the file server sends no Authorization header and ends the test with Error_LoginFailed. The Download and Upload RPCs (File Transfers (Download / Upload)) do answer the challenge with their Username / Password.

IP Ping and TraceRoute execute the host OS ping / traceroute (tracert on Windows) commands, so their results reflect the machine running the emulator. The other diagnostics are simulated against the configured target host/port.

DiagnosticsState values. The success value is taken from the loaded data model (TR-181 2.18 DiagnosticsState enumerations; Completed was deprecated in 2.13 and deleted in 2.17):

  • Complete for the IGD IPPingDiagnostics and TraceRouteDiagnostics, Device.IP.Diagnostics IPPing, TraceRoute, DownloadDiagnostics and UploadDiagnostics, and Device.WiFi.NeighboringWiFiDiagnostic (and the IGD LANDevice NeighboringWiFi fallback).

  • Completed stays for the IGD DownloadDiagnostics and UploadDiagnostics (TR-143). UDPEcho, NSLookup and IPLayerCapacity are unchanged (Complete).

  • A failed Upload transfer ends with Error_NoTransferComplete (the value is in every Upload enumeration); Download is unchanged.

  • A diagnostic that fails before it has a result writes the object’s error value (Error_Internal; IGD TraceRoute Error_CannotResolveHostName; IGD Download and Upload Error_InitConnectionFailed; NeighboringWiFi Error) instead of leaving None. The 8 DIAGNOSTICS COMPLETE event is still sent (TR-069 Table 8).

Set the environment variable EMULATOR_LEGACY_DIAGNOSTICS_COMPLETED_STATE=true (Helm value legacy.diagnosticsCompletedState) to restore the old Completed value on the objects that wrote it before: IPPing, TraceRoute, Download, Upload and NeighboringWiFi. UDPEcho, NSLookup and IPLayerCapacity stay Complete.

File Transfers (Download / Upload)

The Download and Upload RPCs are handled over HTTP and FTP (with Basic authentication). On completion the emulator sends a 7 TRANSFER COMPLETE event together with M Download (or M Upload) carrying the CommandKey of the call, followed by a TransferComplete RPC (see TR-069 Event Codes).

  • DelaySeconds. The DownloadResponse / UploadResponse goes out at once with Status 1. A non-zero DelaySeconds never lets the transfer occur in the session that carried the request (TR-069 Download and Upload arguments): the transfer starts at the later of "request time plus DelaySeconds`" and "end of that session" (a session that fails counts as ended). An emulated transfer follows the same rule, and its duration runs from that start. `DelaySeconds 0 is not held back. The StartTime and CompleteTime of DownloadResponse, UploadResponse and TransferComplete are written in UTC (+00:00); the Inform CurrentTime keeps the device’s local offset.

  • Stop and FactoryReset cancel the transfers of the device, those still waiting for their DelaySeconds and those already running (emulated ones included): a cancelled transfer reports no TransferComplete and no M Download / M Upload.

  • In Load Test Mode, enable Transfer Emul (transferEmulation) and set a Transfer Delay to simulate realistic transfer timing across the batch — see Emulator Configuration.

  • Transfer faults are reported with standard CWMP fault codes (e.g. 9012 login failed, 9015 could not connect, 9016 transfer failed).

Software Modules (Deployment Units, TR-157)

The emulator supports the TR-157 software-modules object model and the ChangeDUState RPC. The ACS can request three operation types:

  • Install — download a Deployment Unit (DU) from a URL, parse its metadata and create DeploymentUnit / ExecutionUnit instances.

  • Update — replace an installed DU with a new version.

  • Uninstall — remove a DU and its execution units.

Each operation result is returned via a DUStateChangeComplete (event 11, sent with M ChangeDUState carrying the CommandKey of the ChangeDUState call) session, including per-operation fault structures where applicable. The relevant data-model objects are …​SoftwareModules.DeploymentUnit.{i}. and …​SoftwareModules.ExecutionUnit.{i}..

Bulk Data Collection (TR-157)

The emulator supports TR-157 Bulk Data Collection profiles. Each enabled profile periodically collects the parameters referenced by its collection tasks (wildcards across multi-instance tables are supported) and HTTP/HTTPS POSTs the report to the profile’s ServerURL.

Profiles are configured through the data model under …​BulkData.Profile.{i}. (Enable, ReportingInterval, CollectionTask.{j}.ParameterName, ServerURL). Collection is scheduled automatically from each profile’s ReportingInterval.

The parameterstree/707GR1_BulkData.xml tree is a ready-made example with Bulk Data profiles already defined — load it from the Parameter Tree selector to see bulk reporting in action.

Session Behaviour

How the CPE conducts a CWMP session against the ACS (TR-069 Amendment 6, sections 3.2.1.1, 3.4.2 and 3.7.1).

HTTP redirects

The CPE follows an HTTP redirect from the ACS at any point of a session, including the answer to the Inform.

  • Codes: 302 and 307 (required by the spec) and 301. Any other 3xx ends the session as a failure.

  • What is re-sent: the same POST, to the URL in the Location header (a relative Location is resolved against the URL that was redirected). The session then goes on at that URL as if no redirect had happened. The body of the redirect response is ignored.

  • How long the URL is used: for the rest of that session, or until the next redirect. It is never written to ManagementServer.URL; the next session, and a retried Inform, start from the configured ACS URL again.

  • Hop limit: up to 5 redirects in a row are followed. A sixth ends the session as a failure and the session retry applies (below). A missing or non-HTTP(S) Location also fails the session.

  • Cookies: every cookie of the session is sent to the redirected URL, whatever its host.

  • Credentials: the configured Basic or Digest credentials are sent only to the scheme, host and port that asked for them with a 401, with every later request of the session. A request to a different origin, for example after a redirect, carries none; that origin gets them only after it answers 401 itself, and then it is the one the credentials belong to.

Connections

Each session has its own TCP connection to the ACS (TR-069 3.4.2):

  • One connection per session: every POST of the session goes over the same connection while the ACS keeps it open, the resend with credentials after a 401 included. If the ACS closes the connection after an answer (for example with Connection: close), the next POST of the session opens a new one.

  • Not shared: a connection never carries the POSTs of another session or of another device.

  • Closed at the end: the CPE closes the connection when the session ends, whether it completed or failed. No connection stays open between sessions.

  • Redirect: a redirect to another host or port opens a connection there, which is also closed at the end of the session.

A farm pod therefore holds at most sessionConcurrency connections to the ACS (one more per redirect target during a redirected session). Over HTTPS each session makes its own TLS handshake; the emulator offers the ACS TLS session resumption, so an ACS that supports it does not pay a full handshake per session.

HoldRequests

The ACS can hold the CPE’s own requests with the SOAP header cwmp:HoldRequests (1 or true; 0, false or no header means no hold). The CPE’s own requests are the TransferComplete (an earlier download or upload) and the DUStateChangeComplete (a Software Module operation); they are sent after the InformResponse and after the answer to each of them. Table 7 of TR-069 3.7.1.3 decides what the CPE sends next, from the most recent response of the ACS:

  • Every message of the ACS sets the hold, whether it is an InformResponse, the response to a TransferComplete or a request. An empty HTTP response (no envelope) means no hold.

  • A request of the ACS is always answered first, whatever its header says. Only after a response of the ACS does the CPE choose between its own request and an empty POST.

  • No hold: the next own request goes out. Hold: the CPE sends an empty POST and keeps the request; a held request is never lost and is never sent early.

  • An empty HTTP response lifts the hold. The CPE then sends the request it kept. If it has none, and the empty POST it sent earlier went out during the hold, it sends one more empty POST: only an empty POST sent without hold tells the ACS there is nothing more to send (3.7.1.4).

  • Once the CPE has sent an empty POST without hold, it sends no further own request in that session (3.7.1.3, condition 3). A TransferComplete still queued stays pending and goes out in the next session.

  • The session ends when the ACS answers empty after such an empty POST.

  • The confirmation of an event does not wait for the hold: the M Reboot entry is confirmed when the InformResponse arrives, and the entry of a TransferComplete or DUStateChangeComplete when its response arrives. Only the sending of the next request waits. A session that fails during the hold therefore does not report M Reboot again.

Session retry waits

A session that fails is retried after a random wait of whole seconds taken from a range that grows with each failed attempt (3.2.1.1, Table 3). With m the minimum wait and k the multiplier, retry number n waits between m × (k/1000)n-1 and m × (k/1000)n seconds. From the tenth retry on the range stays that of the tenth.

Retry Wait with the defaults (m = 5, k = 2000) Wait with m = 1, k = 1000

#1

5 to 10 s

1 s

#2

10 to 20 s

1 s

#3

20 to 40 s

1 s

#10 and later

2560 to 5120 s

1 s

m and k are read from the device’s ManagementServer.CWMPRetryMinimumWaitInterval and ManagementServer.CWMPRetryIntervalMultiplier. The shipped parameter trees differ (some hold 1 and 1000, some 5 and 2000, a few 0, and cpe_params.xml defines neither); a value of 0, a missing parameter, or a multiplier below 1000, means the spec defaults (5 and 2000).

One rule covers every way a session can fail: a refused or dropped connection, a timeout, an HTTP error such as 503, a 401 the credentials do not answer, a redirect loop or an unusable response. The session ends as failed, the failure is counted (see RetryCount below), and the device is scheduled again after the wait. The wait is outside the session: the device holds no session slot while it waits, so a farm whose ACS is down does not block its own session concurrency (sessionConcurrency).

During the wait:

  • Connection Request, or another new event: a session starts at once (3.2.1.1: the CPE retries "after the wait or when a new event occurs, whichever comes first"). Its Inform carries the RetryCount of the failed attempts and the new event, together with the events the failed session had not delivered, a 2 PERIODIC among them (Table 8: an undelivered periodic event is never discarded). A device without periodic inform sends nothing more after that session; it does not start an event-less one when the old wait runs out.

  • Stop: the device is removed. No further Inform is sent.

  • Not registered yet: a device whose 0 BOOTSTRAP has not been delivered ignores a Connection Request; its retried session carries the bootstrap.

  • Periodic Inform: the wait is not shortened to the next periodic time. A periodic Inform that would fall due during a wait is not sent on its own; the retried session replaces it.

With the defaults the wait of the tenth and later retries is 2560 to 5120 seconds (Table 3 allows no cap). To shorten the waits, the ACS sets ManagementServer.CWMPRetryMinimumWaitInterval (m) and ManagementServer.CWMPRetryIntervalMultiplier (k) with SetParameterValues after the device has started: with m = 1 and k = 1000 every retry waits 1 second. Values written into a device’s parameter tree are not the way: a factory reset reloads that tree, and the factory defaults of m and k must be the values of the Default column (5 and 2000). The former sessionRetryMaxWait setting is gone, and so is the chart value fleet.sessionRetryMaxWait; an old deployment that still sets EMULATOR_SESSION_RETRY_MAX_WAIT stops at startup with the unknown emulator variable error.

RetryCount

The RetryCount of the Inform is the number of failed sessions since the last one that completed (Table 37). The count is kept per device in one place, so the Inform after a refused connection, a 503, a 401, a redirect loop and a dropped connection all report it. Every Inform is built when its session starts, from that count. A session that completes resets it to 0; a session that is skipped because no event is left for it (a 7 TRANSFER COMPLETE whose entry an earlier session already delivered) sends no Inform and leaves the count as it was; the count is not persisted, so a restart of the emulator starts at 0 too. A session that fails or completes after a newer session of the same device has started does not change the count. The Random RetryCount option of the Web UI (randomRetryCount) still replaces the value of every Inform with a random one.

Periodic Inform and UpTime

  • Phase. When ManagementServer.PeriodicInformTime holds a valid time, the device informs at that time plus a whole number of PeriodicInformInterval periods (the next grid point, never at once; TR-181 2.18 PeriodicInformTime). Otherwise, with a spread of 0, it uses a fixed grid started by the first session after power-up; a reboot or an invoked session does not move it (the old behaviour was the session end plus one period, which drifted). A spread above 0, phase anchors and periodicAlignEpochMs work as before, but a valid PeriodicInformTime takes precedence over a spread above 0; to keep a mass group dispersed, use periodicAlignEpochMs, phase anchors or legacyPeriodicPhase. The seed parameter trees start with PeriodicInformTime set to Unknown Time (0001-01-01T00:00:00Z), so they follow the first-session grid until the ACS sets a time.

  • Interval. A PeriodicInformInterval of 0, a negative, unparseable or missing value parks the device until a session is invoked (it was an immediate re-Inform, a past schedule or an exception that skipped the post-session work). A value above Integer.MAX_VALUE seconds is clamped to it.

  • UpTime. DeviceInfo.UpTime is the number of seconds since the last restart. It is 0 at the first session, restarts from 0 on a Reboot RPC and on a REST reboot, and is not reset by the 0 BOOTSTRAP of an ACS URL change. A first session that has neither 0 BOOTSTRAP nor 1 BOOT (without initial Inform, INITIAL_EVENT=PERIODIC, restore) starts at 9000 seconds. The old values carried an offset of 9000000 ms; QoE UpTime values are therefore about 1/1000 of what they were.

  • Inform parameters. The Inform ParameterList follows the model’s forced-Inform set (TR-069 3.7.2.1): TR-181 adds Device.RootDataModelVersion, DeviceInfo.ProvisioningCode and ManagementServer.AliasBasedAddressing and drops Device.DeviceSummary and Device.LAN.IPAddress; TR-098 adds ManagementServer.AliasBasedAddressing. A name that the device’s own parameter tree lacks is skipped, so the effective list follows the seed tree.

  • UpTime notification. The DeviceInfo.UpTime refresh at session start is written without notification (TR-181 2.18 DeviceInfo.UpTime activeNotify="canDeny"): an ACS that set Notification 1 or 2 on UpTime gets no 4 VALUE CHANGE session for it and no UpTime queued in the Inform. The value is unchanged and its type is always xsd:unsignedInt. SetParameterAttributes refuses Active notification on UpTime with fault 9009.

  • DUStateChangeComplete. The StartTime and CompleteTime of the Results are UTC dateTimes (+00:00), 0001-01-01T00:00:00Z when absent (TR-069 A.4.2.3, Table 80).

Set EMULATOR_LEGACY_BOOTSTRAP_ONLY_EVENT=true (Helm legacy.bootstrapOnlyEvent) to send 0 BOOTSTRAP alone on a first Inform, and EMULATOR_LEGACY_PERIODIC_PHASE=true (Helm legacy.periodicPhase) to restore the session-end-plus-period phase. The interval rule, UpTime, the Inform parameters, the Upload and failure diagnostic values and the DU timestamps have no switch.

Not implemented

The CWMP version negotiation of 3.7.1.1 and 3.7.4 (inferring the ACS version from the namespace of the InformResponse, the SupportedCWMPVersions and UseCWMPVersion headers of CWMP 1.4, and the fall back to 1.0 when a failed first session is retried) is not implemented. The emulator declares urn:dslforum-org:cwmp-1-2 in its Inform and does not change its messages according to the namespace of the ACS’s answers.

TLS / Certificates

Direction Behaviour

CPE → ACS (outbound)

The CPE validates the certificate of an https:// ACS before it sends anything (TR-069 3.3): the chain must lead to a trusted CA, the certificate must be within its validity, and it must name the host of the ACS URL (a DNS name, or an IP address for an IP literal URL). A redirect target is validated against its own URL. By default the trusted CAs are those of the JDK. A certificate that fails validation fails the session, and the session retry applies (see Session Behaviour).

ACS → CPE (Connection Request)

Optional HTTPS listener serving the operator PEM pair or a generated self-signed certificate — see Connection Request Transports.

Bulk Data upload

Bulk data reports are sent over HTTP or HTTPS depending on the profile ServerURL. The upload does not validate the certificate of the collector yet.

ACS certificate parameters

Parameter (variable) Default Effect

acsTrustStore (EMULATOR_ACS_TRUST_STORE; chart: the key acs.tls.trustStore.fileKey of the Secret acs.tls.trustStore.secretName, mounted read-only)

empty (JDK CAs)

File of the CAs the CPE trusts for the ACS, instead of the JDK CAs. The extension names the format: .pem, .crt or .cer (one or more PEM certificates), .p12 or .pfx (PKCS12), .jks (JKS). A file that does not exist, cannot be read, has another extension, has the wrong password or holds no certificate fails every HTTPS session. The emulator then logs an error naming the file and the variable, at most once a minute. It never falls back to the JDK CAs or to trusting any certificate.

acsTrustStorePassword (EMULATOR_ACS_TRUST_STORE_PASSWORD; chart: the key acs.tls.trustStore.passwordKey of the Secret acs.tls.trustStore.secretName)

empty

Password of a PKCS12 or JKS store. Set it in the environment only: the emulator does not write it to start_params.properties, prints it as * in the startup parameter list, and never returns it from the REST API. A PEM file needs no password.

acsTlsInsecure (EMULATOR_ACS_TLS_INSECURE; chart value acs.tls.insecure)

false

If true, the CPE accepts any certificate of the ACS for any host: the behaviour of earlier versions. Use it only for a test ACS without a valid certificate. The emulator logs one warning when it first uses it.

acsEmpty200Accepted (EMULATOR_ACS_EMPTY_200_ACCEPTED; chart value acs.empty200Accepted)

false

TR-069 3.4.6: the empty response of the ACS is a 204. By default an empty 200, and any other 2xx without an envelope, fails the session. If true, the CPE accepts them as the end of the session, as before. The emulator logs one warning when it first accepts one.

These parameters are read at the start of each HTTPS session. The emulator reads a trust store once per path and password: if the file changes on disk (for example a rotated Kubernetes Secret), restart the emulator.

A rejected certificate is logged as a warning that names the endpoint and both acsTrustStore and acsTlsInsecure, at most once a minute per ACS host and port.