Presets and ProductClass (version 1.2.9+)

Hello All,

I have different Huawei Onts and when I manage them with TR069, it automatically configures new
WAN profiles and WLAN SSIDs. For example, Huawei EG8145V5 has WLAN 5GHz and HG8546M does not have 5GHz, so HG8546M shows a fault alarm. I would like to know if there is more than one preset that is separated by ProductClass.

That’s odd. We also use some models of huawei with 2.4Ghz only and they don’t complain if you send a parameter for 5Ghz – IOW we don’t have presets based on product class, we use about 4 Huawei models and we don’t get faults for 5Ghz parameters on those “2.4Ghz only” models.

Can you paste your entire preset and provision script? The way GenieACS works is it will not do a SetParameterValue for a particular parameter unless the CPE reports its existence. What I’ve seen from a lot of CPEs is they report properties that don’t actually exist, and then throw a fault when you try and do a GPV/SPV on those params. This might be the case for your issue. In which case you would need to add a check in your provision script for that CPE and not set the values that the CPE reports as exists but don’t actually exist.

I received your provision script in email, not sure why it didn’t make it to this forum post. There are a few different issues going on, some minor, others that represent a fundamental misunderstanding of how provisions work. I’ll start at the top:

declare("InternetGatewayDevice.DeviceInfo.HardwareVersion", {path: hourly, value: hourly});
declare("InternetGatewayDevice.DeviceInfo.SoftwareVersion", {path: hourly, value: hourly});
declare("InternetGatewayDevice.DeviceInfo.SerialNumber", {path: hourly, value: hourly});

These aren’t necessary. Part of the spec is the CPE itself reports those values in a periodic inform. So they will never change without GenieACS knowing about them.

To the bigger issue though,
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.", null, {path: 2}). This tells GenieACS that you want two instances under the WANConnectionDevice. Based upon the next lines of code, that is almost certainly not what you are intending to do. This is what I believe you want:

const values = {
    Enable: true,
    X_HW_ServiceType: 4,
    X_HW_VLAN: 30,
    X_HW_VlanMux8021p: 0,
    X_HW_VlanEnable: true,
    ConnectionType: 'IP_Routed',
    AddressingType: 'PPPoE',
    MaxMTUSize: 1500,
    "X_HW_LANBIND.SSID1Enable": 1,
    "X_HW_LANBIND.Lan1Enable": 1,
    "X_HW_LANBIND.Lan2Enable": 1,
    "X_HW_LANBIND.Lan3Enable": 1,
    "X_HW_LANBIND.Lan4Enable": 1,
    DNSEnabled: true,
    NATEnabled: true,
const basePath = "InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection";
const path = basePath + '.[' + Object.keys(values).map(key => key + ':' + values[key]).join(',') + ']';

declare(path, {path: 1}, {path: 1});

This will generate the required declare for GenieACS and will ensure that only one instance exists under InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection. The only thing I’m unsure of the sub-params (X_HW_LANBIND). If the code above gives you issues, try removing those 5 params from the code and try again. One other thing that jumped out to me is the max mtu size. For pppoe it should be 1492 to account for the 8 bytes used by PPPoE encapsulation.

Now, if you know your CPE always has the instances pre-configured from the factory a specific way, then you can shortcut a lot of this. All of my CPEs come from the factory with our config on it. PPP is always on InternetGatewayDevice.WANDevice.*.WANConnectionDevice.1.WANPPPConnection.1, management is always InternetGatewayDevice.WANDevice.*.WANConnectionDevice.1.WANIPConnection

Ok, thank you for explaining this, but one thing I don’t understand is that the error occurs when I press summon HG8546M and the error channel is from inform. inform used the default inform of geniacs

Red haring. If you don’t put in an event filter for your preset, then it will be triggered by any event. Enable debug logging and check the debug log for more details.