Problem with Set RegulatoryDomain ONT Huawei

Hi guys,
I have a problem with set InternetGatewayDevice.LANDevice.1.WLANConfiguration.*.RegulatoryDomain on ONT Huawei.

It’s work from curl:

curl -i 'http://localhost:7557/devices/00259E-HG8245Q2-4857544309F83D92/tasks?timeout=3000&connection_request' \
-X POST \
--data '{"name": "setParameterValues", "parameterValues": [["InternetGatewayDevice.LANDevice.1.WLANConfiguration.*.RegulatoryDomain", "PL"]]}'

but don’t work from provisioning script:

const now = Date.now();

clear("Device", now);
clear("InternetGatewayDevice", now);

declare("InternetGatewayDevice.LANDevice.1.WLANConfiguration.*.RegulatoryDomain", {value: now}, {value: "PL"});

i got fault

faultCode: "9002"
faultString: Internal error
setParameterValuesFault: null

I don’t have more info from device about this error. What is the difference between the two methods? Am I making a mistake in the code? I have simplified the provisioning script to a minimum. I will be grateful for your help.

When you set a parameter value from the API, you need to specify the particular instance. You can use * in provision scripts though.

1 Like

Hi, change your declare to this:

declare("InternetGatewayDevice.LANDevice.1.WLANConfiguration.[Enabled:1].RegulatoryDomain", {value: now}, {value: "PL"});
1 Like

Thank you for your response, @lavira unfortunately that did not solve the problem.

I add logs from debug:

event: outgoing HTTP response
timestamp: 2021-07-20T17:38:54.774Z
remoteAddress: x.x.x.x
deviceId: 00259E-HG8245Q2-4857544309F83D92
connection: 2021-07-20T17:38:54.743Z
statusCode: 200
headers:
  content-length: 755
  server: GenieACS/1.2.5+20210312233623
  soapserver: GenieACS/1.2.5+20210312233623
  content-type: text/xml; charset="utf-8"
body: >-
  <?xml version="1.0" encoding="UTF-8"?>

  <soap-env:Envelope xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:cwmp="urn:dslforum-org:cwmp-1-0"><soap-env:Header><cwmp:ID
  soap-env:mustUnderstand="1">17ac4ffc67d0000</cwmp:ID></soap-env:Header><soap-env:Body><cwmp:GetParameterValues><ParameterNames
  soap-enc:arrayType="xsd:string[2]"><string>InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.RegulatoryDomain</string><string>InternetGatewayDevice.LANDevice.1.WLANConfiguration.5.RegulatoryDomain</string></ParameterNames></cwmp:G$
---
event: incoming HTTP request
timestamp: 2021-07-20T17:38:54.812Z
remoteAddress: x.x.x.x
deviceId: 00259E-HG8245Q2-4857544309F83D92
connection: 2021-07-20T17:38:54.743Z
localPort: 7547
method: POST
url: /
headers:
  host: x.x.x.x:7547
  soapaction: ""
  connection: Keep-Alive
  content-type: text/xml; charset=UTF-8
  cookie: session=5a290428d7cc7e18
  user-agent: HW_WAP_CWMP_V02
  content-length: "649"
body: >
  <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:cwmp="urn:dslforum-org:cwmp-1-0">

  <SOAP-ENV:Header>

  <cwmp:ID SOAP-ENV:mustUnderstand="1">17ac4ffc67d0000</cwmp:ID>

  </SOAP-ENV:Header>

  <SOAP-ENV:Body>

  <SOAP-ENV:Fault>

  <faultcode>Client</faultcode>

  <faultstring>CWMP fault</faultstring>

  <detail>

  <cwmp:Fault>

  <FaultCode>9002</FaultCode>

  <FaultString>Internal error</FaultString>

  </cwmp:Fault>

  </detail>

  </SOAP-ENV:Fault>

  </SOAP-ENV:Body>

  </SOAP-ENV:Envelope>

It’s look like Genieacs try to get value before set and fail.

Log from device:

2021-07-20 17:38:54 [Error][Debug-Log] static:RpcType:CwmpRpcGetParameterValues,RetCode:0x232a.<Name>InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.RegulatoryDomain<Name>InternetGatewayDevice.LANDevice.1.WLANConfiguration.5.RegulatoryDomain

then it’s a firmware issue, contact the distributor and ask for a newer firmware. What version do you have on it by the way ? I had similar problems with V3R017C10S120 and the only fix was upgrade to a new version.

1 Like

Soft on device is V3R017C10S138.

I know how to make it work around. It seems CPE does not allow or cannot set the parameter after 0 BOOTSTRAP and 1 BOOT. But when I add a provisioning that runs every 60 seconds, it throws fault 9002 after the first pass, but after 60 seconds it sets the parameter correctly. Now I need to find a way to set up delay in provisioning. Or I have provisioning that will check the setting every now and then and if it doesn’t match, it will set the correct value. Thx for help.