Wan ppp instances?

Hello, I’m new to GenieAcs.
I’m trying to setup a Fiberhome HG6245D with the following WAN:

  1. DHCP for TR069
  2. PPPOE for INTERNET

So far i got the first WAN, the TR069 is configured via device interface, i tried many post about creating wan instrances but nothing happen may fault code appear and so many invalid arguments showed. I’m unable to create WANPPPConnection no matter what I’ve tried to do.
Any help will be appreciated.

I dont know where to start on creating wan pppoe instances?

I tried adding this on provisions named “WAN_PPP_Instances” and presets named “WAN_PPP_Instances” with 0 Weight and 0 BOOTSTRAP i dont know whats the purpose, i hoped someone will explain. Im so really grateful if i ever solve this problem. Thank you

const now = Date.now();
log(‘Creating WANPPPConnection (if necessary)’);
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.*”, null, {path: 1});

log(‘Setting up WANPPPConnection’);
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection..”, {path: now}); //Refresh the node…

declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection..Enable", {value: now}, {value: “true”});
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.
.Name”, {value: now}, {value: “2_INTERNET_R_VID_1”});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection..ConnectionType", {value: now}, {value: “IP_Routed”});
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.
.X_FH_ServiceList”, {value: now}, {value: “INTERNET”});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection..Password", null,{value: serial.value[0]});
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.
.Username”, null,{value: serial.value[0]});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection..NATEnabled", {value: now}, {value: true});
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.
.ConnectionStatus”, null, {value: serial.value[0]});

Try this:

const now = Date.now();
const basePath = 'InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection';

const params = {
    Enable: true,
    name: "2_INTERNET_R_VID_1",
    ConnectionType: "IP_Routed",
    X_FH_ServiceList: "INTERNET",
    Username: serial.value[0],
    Password: serial.value[0],
    NATEnabled: true,
};

// Remove all existing entries. No changes will be made until the end of the script (if necessary)
declare(`${basePath}.[]`, null, {path: 0});

const path = basePath + '.[' + Object.keys(params).map(key => key + ':' + params[key]).join(',') + ']';

log('Creating WANPPPConnection (if necessary)', path);

// Create the instance (if necessary)
declare(path, {path: 1}, {path: 1});

Thank you.

I can’t make it work with your suggestion or maybe putting it in the wrong place.

I try pressing summon to get some result and i showed something like this.

and haved error
image

Please check if this is correct

Parameter names are case sensitive, and it appears I lower cased one on accident. Replace the params block with this and try again:

const params = {
    Enable: true,
    Name: "2_INTERNET_R_VID_1",
    ConnectionType: "IP_Routed",
    X_FH_ServiceList: "INTERNET",
    Username: serial.value[0],
    Password: serial.value[0],
    NATEnabled: true,
};

If you still get an error, check the logs on the CPE. Or honestly even better is to crack the unit open and connect a TTL->USB serial adapter. Every CPE I’ve encountered has a 4 pin serial header on the PCB. You can use a logic analyzer, or an internet search to figure out the pinout of the serial header. A significant amount of info is dumped out to the serial port that doesn’t even make it into syslog.

1 Like

got this fault
image
image

Thank you, i’ll try

Because you haven’t defined the serial parameter. Please don’t copy and paste code without understanding what is actually going on. This is how potentially critical vulnerabilities get introduced.

const serial = declare('DeviceID.SerialNumber', {value: 1});
1 Like

Thank you for everything to figure out my problem, i’ll try this TTL-USB Serial Adapter to crack the device and also i noticed that everytime i make wan pppoe connection thru modem interface i dont see delete instances on genieacs>device page, its different to another brand like huawei, zte that everytime you create wan instances you see delete instances.

how to solve this on zte “-”

Wrap the key X_ZTE-COM_ServiceList in quotes “X_ZTE-COM_ServiceList”