darkam
1
Good evening dear colleagues.
I would like to know if you would be able to create the script with condition.
If model is HG8245W5-6T he respect
- label: “‘SSID 2G’”
parameter: InternetGatewayDevice.LANDevice.1.WLANConfiguration.3.SSID
- label: “‘SSID 5G’”
parameter: InternetGatewayDevice.LANDevice.1.WLANConfiguration.6.SSID
caso for o modelo EG8141A5 , entao ele respeitar outra forma de localizar os seus dados.
- label: “‘SSID 2G’”
parameter: InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.SSID
can I do this? someone would have an example to show me or a manual where I can find this
Hi darkam,
If i understand, you need to set SSID on a different instance index (1, 3 or 6) based on CPE model?
If yes, with this script yo can do that:
const now = Date.now();
var ssid = "Your SSID here;
//Refresh path
declare("InternetGatewayDevice.DeviceInfo.*", {path: now});
//Detect CPE model
var cpe_model = declare("InternetGatewayDevice.DeviceInfo.ModelName", {value: now}).value[0];
//Wlan SSID provision based on CPE model
switch(cpe_model){
case "HG8245W5-6T":
//Configure 2.4G Wlan
declare("InternetGatewayDevice.LANDevice.1.WLANConfiguration.3.SSID", {value: now}, {value: ssid});
//Configure 5G Wlan
declare("InternetGatewayDevice.LANDevice.1.WLANConfiguration.6.SSID", {value: now}, {value: ssid});
break;
case "EG8141A5":
//Configure 2.4G Wlan
declare("InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.SSID", {value: now}, {value: ssid});
break;
}
Hope i help you!
Regards
darkam
3
Very good my friend, the problem is that I don’t know where to put this script, how to make it work, you could teach me this way.