SetParameterAttributes: Empty Notification field when NotificationChange is false (vague specification?)

We are currently facing an interesting issue with certain CPE devices. While trying to disable write access to certain values (e.g. PPP username) via SetParameterAttributes we don’t get any response from the device. We set up the following provision:

declare('InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username', {accessList: Date.now()}, {accessList: []});

During BOOTSTRAP GenieACS queries the parameter attribute, gets ['Subscriber'] for the AccessList and will set it to [] using the following SetParameterAttributes RPC:

<soap-env:Body>
    <cwmp:SetParameterAttributes>
        <ParameterList
            soap-enc:arrayType="cwmp:SetParameterAttributesStruct[1]">
            <SetParameterAttributesStruct>
                <Name>
                    InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username
                </Name>
                <NotificationChange>
                    false
                </NotificationChange>
                <Notification>
                </Notification>
                <AccessListChange>
                    true
                </AccessListChange>
                <AccessList
                    soap-enc:arrayType="xsd:string[0]">
                </AccessList>
            </SetParameterAttributesStruct>
        </ParameterList>
    </cwmp:SetParameterAttributes>
</soap-env:Body>

Because we don’t want to make changes to the notifications, NotificationChange is set to false and the Notification field is empty. Seems fine to us. But apparently the device has issue with an empty Notification field even though NotificationChange is false and simply won’t respond at all. After a minute we get:

Channel has faulted; channel="default" retries=0 faultCode="session_terminated" faultMessage="The TR-069 session was unsuccessfully terminated"

I’d like to get your opinion on that behavior:

  1. Is that standard compliant? (see https://www.broadband-forum.org/download/TR-069_Amendment-2.pdf page 52)
  2. Is GenieACS supposed to set an int[0:2] even though NotificationChange is false?

Without patching the GenieACS codebase, we tried working around the issue by setting up the following provision:

declare('InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username', {accessList: Date.now()}, {accessList: []});
declare('InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username', {notification: Date.now()}, {notification: 1});

Since Notification is 0 after factory reset, the first time the provision is executed the SetParameterAttributes RPC looks like:

<cwmp:SetParameterAttributes>
    <ParameterList
        soap-enc:arrayType="cwmp:SetParameterAttributesStruct[1]">
        <SetParameterAttributesStruct>
            <Name>
                InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username
                </Name>
            <NotificationChange>
                true
                </NotificationChange>
            <Notification>
                1
                </Notification>
            <AccessListChange>
                true
                </AccessListChange>
            <AccessList
                soap-enc:arrayType="xsd:string[0]">
                </AccessList>
            </SetParameterAttributesStruct>
        </ParameterList>
    </cwmp:SetParameterAttributes>

And the device will happily apply. However, the next time it is run, the RPC will look like in the first example, since Notification is already 1. So for the workaround to properly work, we would have to alternate notification between 0 and 1. :roll_eyes:

We could also patch GenieACS to always set Notification to a value (e.g. 0), even though NotificationChange is false:

diff --git a/lib/soap.ts b/lib/soap.ts
index 7894dc1..937b0d8 100644
--- a/lib/soap.ts
+++ b/lib/soap.ts
@@ -386,7 +386,7 @@ function SetParameterAttributes(methodRequest): string {
     }</Name><NotificationChange>${
       p[1] == null ? "false" : "true"
     }</NotificationChange><Notification>${
-      p[1] == null ? "" : p[1]
+      p[1] == null ? "0" : p[1]
     }</Notification><AccessListChange>${
       p[2] == null ? "false" : "true"
     }</AccessListChange><AccessList soap-enc:arrayType="xsd:string[${

We tried that and it works. However, I’m not sure if you would be willing to include this patch. First I’d like to get your take on the specification.

Thanks,
Ole

1 Like