# Problem setting PPPoE on ONT Zhone

**URL:** <https://forum.genieacs.com/t/problem-setting-pppoe-on-ont-zhone/6738>\
**Category:** Uncategorized\
**Created:** [April 9, 2025, 5:03pm UTC](https://forum.genieacs.com/t/problem-setting-pppoe-on-ont-zhone/6738 "2025-04-09T17:03:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luzb3l1t0](https://avatars.discourse-cdn.com/v4/letter/l/90db22/32.png) [@Luzb3l1t0](https://forum.genieacs.com/u/Luzb3l1t0)\
**Post date:** [April 9, 2025, 5:03pm UTC](https://forum.genieacs.com/t/problem-setting-pppoe-on-ont-zhone/6738/1 "2025-04-09T17:03:04Z")

</div>

Hello, I’m pretty newie in TR-69 and GenieACS.  
I’m trying to configure PPPoE credentials on an HX2466GN ONT using GenieACS v1.2.13 without success.  
Within the ONT, I can see the created PPPoE interface.  
When I try to apply the credentials using my provisioning script, nothing happens.  
When I enter the GenieACS UI, I see a partial path that goes to

> InternetGatewayDevice.WANDevice.1.WANConnectionDevice

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/genieacs/original/2X/c/c744ab336e2c6ec59bc7c1c95b0edeaf44c4154e.png)

I tried updating the path to the end using

> declare(‘InternetGatewayDevice.WANDevice.1.WANConnectionDevice._._’, {path: Date.now(), value: Date.now()})

, but the path doesn’t update.  
If I refresh the path using the GenieACS UI, the path is populated, and the credentials are set using my provisioning script.  
By enabling debugging, I could see that the difference between updating the path using the declare function within the script and using the UI is that in the first case, the NextLevel field is true, and in the second, it’s false.  
Is there a way to accomplish this using the provisioning script?  
Is it normal to have to update the entire path to set a parameter?

---

<div class="post-metadata">

**Author:** ![akcoder](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/akcoder/32/11_2.png) [@akcoder](https://forum.genieacs.com/u/akcoder)\
**Post date:** [April 9, 2025, 8:18pm UTC](https://forum.genieacs.com/t/problem-setting-pppoe-on-ont-zhone/6738/2 "2025-04-09T20:18:43Z")

</div>

> [@Luzb3l1t0](#):
>
> > declare(‘InternetGatewayDevice.WANDevice.1.WANConnectionDevice._._’, {path: Date.now(), value: Date.now()})

GenieACS works in a declarative fashion. Don’t worry about refreshing things, set the values you want in the provision script.

```auto
declare('InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username', null, {value: 'some_username'})
declare('InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Password', null, {value: 'some_password'})

```

---

<div class="post-metadata">

**Author:** ![Luzb3l1t0](https://avatars.discourse-cdn.com/v4/letter/l/90db22/32.png) [@Luzb3l1t0](https://forum.genieacs.com/u/Luzb3l1t0)\
**Post date:** [April 9, 2025, 9:51pm UTC](https://forum.genieacs.com/t/problem-setting-pppoe-on-ont-zhone/6738/3 "2025-04-09T21:51:50Z")

</div>

Thanks for your reply. The first thing that i tried was

> declare(‘InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username’, {value: Date.now()}, {value: ‘some\_username’})

But on the ONT the PPPoE user isn’t set.  
I also try as you suggest using the timestamp as ‘null’, but the behavior is the same.  
By the way, can you tell me what is the difference between this two approach?.  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![akcoder](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/akcoder/32/11_2.png) [@akcoder](https://forum.genieacs.com/u/akcoder)\
**Post date:** [April 9, 2025, 10:23pm UTC](https://forum.genieacs.com/t/problem-setting-pppoe-on-ont-zhone/6738/4 "2025-04-09T22:23:22Z")

</div>

> [@Luzb3l1t0](#):
>
> By the way, can you tell me what is the difference between this two approach?.

This is [covered in the docs](https://docs.genieacs.com/en/latest/provisions.html#built-in-functions)

> [@Luzb3l1t0](#):
>
> But on the ONT the PPPoE user isn’t set.

Does an instance of `InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection` exist on the ONT? If not, you will need to add one.

```auto
const basePath = 'InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.';

const params = {
    Username: 'some_username',
    Password: 'some_password',
    // Add any other key/value pairs in here
};
const path = basePath + '.[' + Object.keys(params).map(key => key + ':' + params[key]).join(',') + ']';

declare(basePath + '.[]', null, {path: 0}); // Remove all existing instances
declare(path, {path: 1}, {path: 1}); // Ensure only one entry using the key/values in params to ensure uniqueness

```

---

<div class="post-metadata">

**Author:** ![Luzb3l1t0](https://avatars.discourse-cdn.com/v4/letter/l/90db22/32.png) [@Luzb3l1t0](https://forum.genieacs.com/u/Luzb3l1t0)\
**Post date:** [April 9, 2025, 11:30pm UTC](https://forum.genieacs.com/t/problem-setting-pppoe-on-ont-zhone/6738/5 "2025-04-09T23:30:30Z")

</div>

If you refresh the path

> InternetGatewayDevice.WANDevice.1.WANConnectionDevice

using the ui, you can see the path

> InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username

![image](https://canada1.discourse-cdn.com/flex035/uploads/genieacs/optimized/2X/4/464f769e66cfa98fcfa2b4cf990012af71533b49_2_690x14.png)

and if you do the refresh, you can set the username by using the declare function. But you can do it, only after doing the path refresh using the ui.  
As i can understand setting the timestamp value to null is similar to the most recent value, so it will force a sync with the device and set the value declared in the declare function. Am I correct?

---

<div class="post-metadata">

**Author:** ![akcoder](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/akcoder/32/11_2.png) [@akcoder](https://forum.genieacs.com/u/akcoder)\
**Post date:** [April 9, 2025, 11:45pm UTC](https://forum.genieacs.com/t/problem-setting-pppoe-on-ont-zhone/6738/6 "2025-04-09T23:45:16Z")

</div>

> [@Luzb3l1t0](#):
>
> and if you do the refresh, you can set the username by using the declare function. But you can do it, only after doing the path refresh using the ui.

There is no requirement to refresh parameters to set parameters via provision script. GenieACS will resolve the path itself.

---

<div class="post-metadata">

**Author:** ![Luzb3l1t0](https://avatars.discourse-cdn.com/v4/letter/l/90db22/32.png) [@Luzb3l1t0](https://forum.genieacs.com/u/Luzb3l1t0)\
**Post date:** [April 9, 2025, 11:53pm UTC](https://forum.genieacs.com/t/problem-setting-pppoe-on-ont-zhone/6738/7 "2025-04-09T23:53:17Z")

</div>

Yes, I understand that. But setting the value directly doesn’t do anything on the ONT.  
Now the ONT is in SUF status and I can’t manage it. Tomorrow I’ll try to debug what happens when I try to set the username directly.  
Thanks.

---

<div class="post-metadata">

**Author:** ![Luzb3l1t0](https://avatars.discourse-cdn.com/v4/letter/l/90db22/32.png) [@Luzb3l1t0](https://forum.genieacs.com/u/Luzb3l1t0)\
**Post date:** [April 10, 2025, 1:56pm UTC](https://forum.genieacs.com/t/problem-setting-pppoe-on-ont-zhone/6738/8 "2025-04-10T13:56:57Z")

</div>

I have recovered the management of the ONT, and made some more test with GenieACS debug enable to see the cwmp messages.  
The first attempt is to set the PPPoE username and password in a declarative way.  
The provision script is executed in every PERIOD event.

[Log before refreshing path](https://drive.google.com/file/d/1rA8x3LdCUnVp6RbVknn6HYtChyX1olna/view?usp=drive_link)

But I never see a SetParameterValues message, only the GetParameterNames displayed above.  
Then i did the path refresh using the GenieACS UI while the the provision script is still running, you can see the whole WANPPPConnection path in the incoming message, and the Writable flag in false in the top of it.  
And in the next PERIODIC event, the SetParameterValues is sent to the ONT.

[Log after refreshing path](https://drive.google.com/file/d/1AlmlsKbVYry7LxuJS131Z7bhdZG2Woch/view?usp=drive_link)

Any suggestion?  
Thanks in advanced

---

<div class="post-metadata">

**Author:** ![Luzb3l1t0](https://avatars.discourse-cdn.com/v4/letter/l/90db22/32.png) [@Luzb3l1t0](https://forum.genieacs.com/u/Luzb3l1t0)\
**Post date:** [April 10, 2025, 5:15pm UTC](https://forum.genieacs.com/t/problem-setting-pppoe-on-ont-zhone/6738/9 "2025-04-10T17:15:00Z")

</div>

After some effort, and looking for another configuration alternative, trying to send a configuration file instead of doing it through the declare function, I found that the PPPoE credentials in the file I downloaded from the ONT were not saved in the path

> InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username

, but in

> InternetGatewayDevice.LANDevice.10.LANHostConfigManagement.IPInterface.1.X\_ZHONE\_COM\_PPPoEConfig.Username

. A similar path is for setting the password.  
Using this path, the configuration can be done in a declarative way as you mentioned before.  
Thank you for your help and the time you used to helping me.
