This is my script:
let login = args[0]
let haslo = args[1]
const now = Date.now();
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.[]”, null, {path: 0});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.*”, null, {path: 2});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.X_WANGponLinkConfig.802-1pMark”, {value: now}, {value: 1});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.X_WANGponLinkConfig.VLANIDMark”, {value: now}, {value: 100});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.X_WANGponLinkConfig.Mode”, {value: now}, {value: 2});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.X_WANGponLinkConfig.Enable”, {value: now}, {value: 1});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.*”, null, {path: 1});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.1.ConnectionType”, {value: now}, {value: ‘IP_Routed’});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.1.NATEnabled”, {value: now}, {value: true});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.1.X_ServiceList”, {value: now}, {value: ‘TR069,INTERNET’});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.1.X_LanInterface-DHCPEnable”, {value: now}, {value: true});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.1.Username”, {value: now}, {value: login});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.1.Password”, {value: now}, {value: haslo});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.1.Enable”, {value: now}, {value: true});
When I comment declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.[]”, null, {path: 0}); everything works correctly.