Patch for DZS HX2466GN returning empty GetParameterNamesResponse with NextLevel=true

I found an issue with DZS Inc / HX2466GN ONUs

In this model, some GetParameterNames requests with NextLevel=true return an empty ParameterList, even though the subtree actually exists and the CPE reports parameters inside it during Inform. A clear example is:

  • InternetGatewayDevice.WANDevice. with NextLevel=true → empty response

  • the same path with NextLevel=false → returns the full subtree correctly

In my case, this breaks incremental discovery for branches such as WANDevice and some nested WAN/LAN subtrees. The device is not actually missing those objects; it just does not respond correctly when queried with NextLevel=true.

As a workaround, I patched session.ts in the GetParameterNamesResponse handling path. The idea is:

  • only apply it to Manufacturer = "DZS Inc" and ProductClass = "HX2466GN"

  • only apply it when:

    • request is GetParameterNames

    • nextLevel === true

    • response parameterList.length === 0

  • then reissue the same request with nextLevel = false

    const manufacturerPath = sessionContext.deviceData.paths.get(
    Path.parse(“DeviceID.Manufacturer”),
    );
    const productClassPath = sessionContext.deviceData.paths.get(
    Path.parse(“DeviceID.ProductClass”),
    );

    const manufacturer =
    manufacturerPath &&
    sessionContext.deviceData.attributes.get(manufacturerPath)?.value?.[1]?.[0];
    const productClass =
    productClassPath &&
    sessionContext.deviceData.attributes.get(productClassPath)?.value?.[1]?.[0];

    const rootStr = root.toString();

    if (
    rpcReq.nextLevel &&
    rpcRes.parameterList.length === 0 &&
    manufacturer === “DZS Inc” &&
    productClass === “HX2466GN” &&
    (
    rootStr === “InternetGatewayDevice.WANDevice” ||
    /^InternetGatewayDevice.WANDevice.\d+$/.test(rootStr) ||
    /^InternetGatewayDevice.WANDevice.\d+.WANConnectionDevice$/.test(rootStr) ||
    /^InternetGatewayDevice.WANDevice.\d+.WANConnectionDevice.\d+$/.test(rootStr) ||
    /^InternetGatewayDevice.WANDevice.\d+.WANConnectionDevice.\d+.WANIPConnection$/.test(rootStr) ||
    /^InternetGatewayDevice.WANDevice.\d+.WANConnectionDevice.\d+.WANPPPConnection$/.test(rootStr) ||
    rootStr === “InternetGatewayDevice.LANDevice” ||
    /^InternetGatewayDevice.LANDevice.\d+$/.test(rootStr) ||
    /^InternetGatewayDevice.LANDevice.\d+.WLANConfiguration$/.test(rootStr) ||
    /^InternetGatewayDevice.LANDevice.\d+.WLANConfiguration.\d+$/.test(rootStr) ||
    /^InternetGatewayDevice.LANDevice.\d+.WLANConfiguration.\d+.X_BROADCOM_COM_WlanAdapter$/.test(rootStr) ||
    /^InternetGatewayDevice.LANDevice.\d+.WLANConfiguration.\d+.X_BROADCOM_COM_WlanAdapter.WlBaseCfg$/.test(rootStr) ||
    /^InternetGatewayDevice.LANDevice.\d+.LANEthernetInterfaceConfig$/.test(rootStr) ||
    /^InternetGatewayDevice.LANDevice.\d+.LANEthernetInterfaceConfig.\d+$/.test(rootStr)
    )
    ) {
    sessionContext.rpcRequest = {
    name: “GetParameterNames”,
    parameterPath: rpcReq.parameterPath,
    nextLevel: false,
    };
    return null;
    }