Inconsistent Nextlevel Behaviour

I am trying to get the following Parameters from my CPE.

I am using a test provision, called using a summon the therefore causes a “6 CONNECTION REQUEST”.

Script is the following:

// Constants
const now = Date.now();

clear("InternetGatewayDevice", now);
declare("InternetGatewayDevice.WANDevice.*", {path: now});
declare("InternetGatewayDevice.LANDevice.*", {path: now});

When genieacs queries the value of:
InternetGatewayDevice.LANDevice.1.WLANConfiguration.1. with a NextLevel of 0, the CPE returns this:
InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.PreSharedKey.1.

When genieacs queries the value of:
InternetGatewayDevice.LANDevice.1.WLANConfiguration.1. with a NextLevel of 1 the CPE does not return this:
InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.PreSharedKey.1.

Genieacs alternates between sending NextLevel of 0 and 1 between subsequent calls.

Can anyone please help with why Genieacs is sending 0 and 1 when running the same script over and over again using a Summon?

Kind Regards,

Johan

Hi All,

I can confirm that “hacking” session.ts and inserting

     // JM hack to fix NextLevel for InternetGatewayDevice.LANDevice.1.WLANConfiguration.1
      if (path.toString() != "InternetGatewayDevice.LANDevice.1.WLANConfiguration.1") {
        logger.accessWarn({
          sessionContext: sessionContext,
          message: "Setting nextLevel to false",
        });
        nextLevel = false;
      }

just before

      return {
        name: "GetParameterNames",
        parameterPath: path.length ? path.toString() + "." : "",
        nextLevel: nextLevel,
      };

Works around my problem…

Kind Regards,

Johan

This is by design. If you’d like to refresh multiple levels then you need to do this:

declare("InternetGatewayDevice.LANDevice.*.*", {path: now});
1 Like

Genie uses a crude heuristic to decide when to use nextLevel and when not to. Definitely don’t mess with that part of the code :slight_smile: