Setting up wifi password on Huawei CPE

Hi all. I have been searching on this forum for several days now and I was not able to find a solution to this problem:

Context:
we have a GenieACS 1.2.3 running on a debian for testing purposes, the final goal is to give the customer the ability to change his/her Wireless SSID and Password thru a costumer self-management web page.

Situation:
I was able to create a provisioning script which loads an extension, makes an api call to another server and return a json list of parameters and values. It works fine for anything I have tried so far except for the wifi parameter:

const dev_id = declare( "DeviceID.ID", {value: 1}).value[0];
var json = { "devid" : dev_id, "provision" : "inform" };
const res = ext("cpe", "pruebaRequest", JSON.stringify( json )  );
for( const prop in res ) {
  var valor = res[prop];
  log( "propiedad "+prop );
  log( "valor: "+valor );
  declare( prop, {value: now}, {value: valor });
}

(sorry about the spannish mix).
I have tried using InternetGatewayDevice.LANDevice..WLANConfiguration..KeyPassphrase which gives me an 9007 error (invalid argument value). I have tried other parameters and they give me no error but password is not changed:

InternetGatewayDevice.LANDevice..WLANConfiguration..Presharedkey
InternetGatewayDevice.LANDevice..WLANConfiguration..Presharedkey.1.Presharedkey

test device is Huawei EG8141A5. Been searching on the web for specific Huawei acs parameters but so far no luck.

truth be told, I am a programmer and I had zero idea about TR069 until they handed me the task to investigate how to do this. Have read and re-read the docs and the only unclear point to me was the virtual parameters sections which gives an example to to do exactly this but it does not mention how to implement it.

I will post code if needed. Any suggestion / tip ?

edit: also, I would like to know if passwords can be set as is, or do I have to apply an encription function.

thanks in advance.

an important fact I forgot to mention. At GenieACS web, on the device page, it does enables me to manually edit WPA Password, but when I commit the change it gives me error 9003.

found the solution myself, apparently wpa passwords are not supposed to go plaintext.

https://www.speedguide.net/wlan_key.php

I guess the next step would be to setup specific wifi parameters

thanks anyway.

I use InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.PreSharedKey.1.KeyPassphrase with no issues from any of the CPEs I’ve tried.

ty for your answer. Still I find it hard to setup, seems like propper hex value is according to wifi encription setup.

Now they gave me a tp link to play with and I’m having a similar problem as yesterday. but at least is progress.

ty again.

I should have noted that I set that param with the plain text password. This has worked successfully for me with CPEs from 3 different vendors (all broadcom based though).

-dan

Try this parameter for Tplink modems
InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.X_TP_PreSharedKey

1 Like

hi all. I’m currently investigating again over this issue. I have followed @akcoder suggestion but password was not set. TPLink passwd was set as suggested by @webtron

Apparently the solution (at least for this Huawei model) is to set InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.PreSharedKey.1PreSharedKey as plaintext.

And that was the result of a mere accident by experiment. My initial thought on the subject was I had to encrypt the password using wpa2 algorithm.

thanks