EasyCwmp - easycwmp
View Issue Details
0000320easycwmp[All Projects] Helppublic2018-04-17 03:352018-05-10 15:16
yuhan 
mohamed.kallel 
highminoralways
resolvedno change required 
0000320: easycwmp cannot set the value of the corresponding field by "easycwmp set Device.ManagementServer.Username XXX"
Hello, I am a user of easycwmp. I have a question in use, I would like to ask for it. If it is convenient, can you help me to answer it? This question has really been bothering me for a long time. Thank you.

The problem is that:

Easycwmp runs in openwrt system, compiled easycwmp-1.6.1 version. Both openwrt and easycwmp run normally, and the value of the field corresponding to the field can be obtained by "easycwmp get Device.ManagementServer.Username", but it is not possible to set the value of the corresponding field by "easycwmp set Device.ManagementServer.Username XXX". There are corresponding fields in the management_server file under the function folder, and support the setting function. Other fields can only be read through get command, but not set. I want to ask if there are less steps in compiling or configuring. Or is my configuration wrong? How can we configure the values of existing fields through easycwmp?

Thanks again!
No tags attached.
Issue History
2018-04-17 03:35yuhanNew Issue
2018-04-17 03:49yuhanNote Added: 0000858
2018-04-19 10:27nromeroNote Added: 0000859
2018-04-19 11:13yuhanNote Added: 0000861
2018-05-10 15:16mohamed.kallelStatusnew => resolved
2018-05-10 15:16mohamed.kallelResolutionopen => no change required
2018-05-10 15:16mohamed.kallelAssigned To => mohamed.kallel

Notes
(0000858)
yuhan   
2018-04-17 03:49   
root@TAU:~# easycwmp set Device.ManagementServer.Username huhuhu
root@TAU:~# easycwmp get Device.ManagementServer.Username
{ "parameter": "Device.ManagementServer.Username", "value": "easycwmp" }

/usr/share/easycwmp/functions/management_server:
common_execute_method_param "$DMROOT.ManagementServer.Username" "1" "$UCI_GET easycwmp.@acs[0].username" "management_server_set easycwmp.@acs[0].username"

management_server_set_url() {
    local val=$1
    
    local chk=`echo $val | grep "[a-zA-Z0-9_]://.*"`
    [ "$chk" = "" ] && return $E_INVALID_PARAMETER_VALUE

    $UCI_SET easycwmp.@acs[0].url=$val
    return 0
}
(0000859)
nromero   
2018-04-19 10:27   
Hi yuhan,

You need to apply your changes after setting them.

root@OpenWrt:/# easycwmp get Device.ManagementServer.Username
{ "parameter": "Device.ManagementServer.Username", "value": "easycwmp" }

root@OpenWrt:/# easycwmp set Device.ManagementServer.Username huhuhu

root@OpenWrt:/# easycwmp apply
{ "status": "1", "config_load": "1" }

root@OpenWrt:/# easycwmp get Device.ManagementServer.Username
{ "parameter": "Device.ManagementServer.Username", "value": "huhuhu" }
(0000861)
yuhan   
2018-04-19 11:13   
dear nromero,
Thank you very much. I'm glad to hear from you! You're right。