Push PPPOE from the server

Hello, I don’t know very well TR069 and genieacs. I am new in this work…

I have to make the CPE contact the genieacs server and the server has to push the pppoe

Could you help me?
You would be very kind, thanks

This has been answered several times on this forum. Please use the search feature.

Hi,
Thank you for your reply.

The problem is that nothing is logged like serial number, ip, etc!
Schermata del 2020-08-27 09-13-17|690x321

That could be a problem. You will need to enable debug logging and look at the data being sent by the CPE to the ACS.

This is what I see

2020-08-27T15:51:14.087Z [INFO] x.x.x.x Device: Inform; cpeRequestId=“52” informEvent=“2 PERIODIC” informRetryCount=0
2020-08-27T15:51:14.117Z [INFO] x.x.x.x Device: ACS request; acsRequestId=“174309dada30100” acsRequestName=“GetParameterNames”

Was that what you meant for debug logging?

I also see this if I run this command:

root@genieacs-gui/genieacs/bin# genieacs-cwmp
2020-08-27T15:19:50.524Z [INFO] GenieACS (genieacs-cwmp) starting; pid=24413 version=“1.1.3” dependencies=“node@8.17.0,later@1.2.0,libxmljs@0.18.8,mongodb@2.2.36,redis@2.8.0,seedrandom@2.4.4” config=""
2020-08-27T15:19:50.909Z [ERROR] Uncaught exception; pid=24434 exceptionName=“Error” exceptionMessage=“bind EADDRINUSE 0.0.0.0:7547” exceptionStack=“Error: bind EADDRINUSE 0.0.0.0:7547\n at listenOnMasterHandle (net.js:1420:16)\n at rr (internal/cluster/child.js:121:12)\n at Worker.send (internal/cluster/child.js:88:7)\n at process.onInternalMessage (internal/cluster/utils.js:42:8)\n at emitTwo (events.js:131:20)\n at process.emit (events.js:214:7)\n at emit (internal/child_process.js:762:12)\n at _combinedTickCallback (internal/process/next_tick.js:142:11)\n at process._tickCallback (internal/process/next_tick.js:181:9)”

http://docs.genieacs.com/en/latest/environment-variables.html

You cannot run multiple instances of the CWMP process bound to the same IP and port.

I have tried this scipt that I found in the old answer
let username = “”;
if (“value” in args[1]) {
// Set declared value
username = args[1].value;
declare(“InternetGatewayDevice.WANDevice..WANConnectionDevice..WANPPPConnection..Username", null, {value: username});
} else {
let igd = declare("InternetGatewayDevice.WANDevice.
.WANConnectionDevice..WANPPPConnection..Username”, {value: 1});

if (igd.size) {
    for (let p of igd) {
        if (p.value[0]) {
            username = p.value[0];
            break;
        }
    }
}

}
return {writable: true, value: [username, “xsd:string”]};

But the problem is: script.TypeError Cannot use ‘in’ operator to search for ‘value’ in undefined

Where is the mistake? Sorry but I don’t know JS

You may want to engage the services of a developer to help you. I, and others on this forum are willing to provide assistance, but writing complete code is outside the realm of what I’m willing to do.

I know @zaidka also sells support services, it may be best to engage with him on that.

But I only asked why the operator “in” doesn’t work, someone can help me?

because you don’t pass the args needed for the script to work, leading to the use of “in” on a undefined variable.

> let x=undefined
undefined
> if ("value" in x) { console.log("true"); }
Uncaught TypeError: Cannot use 'in' operator to search for 'value' in undefined
> x={"value":1,"some_other_value":2}
{ value: 1, some_other_value: 2 }
> if ("value" in x) { console.log("true"); }
true

Thank you for your reply!

Therefore by default args [1] is set “undefined”, which value should I assign it?

You don’t need to assign it … args is a variable that holds the arguments passed to the provisioning script or the timestamps, current value and requested value for virtual parameters.

From the code, I think you use this as a Virtual parameter, and this should fix the code:

if (typeof(args[1])=='object' && 'value' in args[1]) {

but the main conclusion is that you need to learn some javascript and be commited to read the documentation in order to use genieacs properly in production … otherwise I advise you to request commercial support

yes I know…Thank you all for the support!

Kind regards