EasyCwmp - easycwmp
View Issue Details
0000285easycwmp[All Projects] Helppublic2017-08-17 04:552017-08-26 16:20
resolvedno change required 
Raspberry Pi 2bOpenWRT BleedingEdge
0000285: Run easycwmpd -f -d but nothing happens
I am trying to run easycwmp on Raspberry Pi2b as a client and the server that I've run is using GenieACS.

What I run the command, there is nothing happening. No logs, no error, nothing.

I've listed down the steps to reproduce this.

Can you help me to see any mistakes in the steps taken please?

I really appreciate it.

1. Download easycwmp tar package from the download page
2. Compile the image for raspberry pi together with the downloaded easycwmp package
3. Configure the /etc/config/easycwmp to this:

config local
        option interface 'eth0'
        option port '7547'
        option ubus_socket '/var/run/ubus.sock'
        option date_format '%FT%T%z'
        option logging_level '3'

config acs
        option scheme 'http'
        option url ''
        option hostname ''
        option port '7547'
        option path '/'
        option parameter_key '1'
        option periodic_enable '1'
        option periodic_interval '100'

config device
        option oui 'FFFFFF'
        option serial_number 'FFFFFF123456'
        option hardware_version 'v0'
        option product_class 'Generic'
        option manufacturer 'OpenWrt
http://www.openwrt.org/' [^]
        option software_version '50108'

4. Run easycwmpd -f -d
No tags attached.
? dump.pcap (14,576) 2017-08-22 12:26
Issue History
2017-08-17 04:55hidayat@swag.myNew Issue
2017-08-17 12:56AnisNote Added: 0000757
2017-08-17 15:20AnisNote Edited: 0000757bug_revision_view_page.php?bugnote_id=757#r329
2017-08-17 15:27AnisNote Edited: 0000757bug_revision_view_page.php?bugnote_id=757#r330
2017-08-17 18:16AnisNote Edited: 0000757bug_revision_view_page.php?bugnote_id=757#r331
2017-08-18 04:00hidayat@swag.myNote Added: 0000758
2017-08-18 05:06hidayat@swag.myNote Added: 0000759
2017-08-18 06:08hidayat@swag.myNote Added: 0000760
2017-08-18 10:52AnisNote Added: 0000761
2017-08-18 10:57AnisNote Added: 0000762
2017-08-18 11:21AnisNote Deleted: 0000762
2017-08-18 11:23mohamed.kallelNote Edited: 0000761bug_revision_view_page.php?bugnote_id=761#r333
2017-08-18 11:26mohamed.kallelNote Edited: 0000761bug_revision_view_page.php?bugnote_id=761#r334
2017-08-21 09:26hidayat@swag.myNote Added: 0000763
2017-08-21 12:00AnisNote Added: 0000764
2017-08-21 12:03hidayat@swag.myNote Added: 0000765
2017-08-21 12:13AnisNote Added: 0000766
2017-08-21 12:15hidayat@swag.myNote Added: 0000767
2017-08-21 12:23AnisNote Added: 0000768
2017-08-21 12:25hidayat@swag.myNote Added: 0000769
2017-08-21 12:41AnisNote Added: 0000770
2017-08-21 12:42AnisNote Edited: 0000770bug_revision_view_page.php?bugnote_id=770#r336
2017-08-22 04:57hidayat@swag.myNote Added: 0000771
2017-08-22 09:10hidayat@swag.myNote Added: 0000772
2017-08-22 10:38hidayat@swag.myNote Added: 0000773
2017-08-22 11:05AnisNote Added: 0000774
2017-08-22 11:09hidayat@swag.myNote Added: 0000775
2017-08-22 11:11AnisNote Added: 0000776
2017-08-22 11:22hidayat@swag.myNote Added: 0000777
2017-08-22 11:32AnisNote Added: 0000778
2017-08-22 11:34hidayat@swag.myNote Added: 0000779
2017-08-22 11:35hidayat@swag.myNote Added: 0000780
2017-08-22 11:36AnisNote Added: 0000781
2017-08-22 11:37hidayat@swag.myNote Added: 0000782
2017-08-22 12:19hidayat@swag.myNote Added: 0000783
2017-08-22 12:25hidayat@swag.myNote Added: 0000784
2017-08-22 12:26hidayat@swag.myFile Added: dump.pcap
2017-08-22 12:26hidayat@swag.myNote Added: 0000785
2017-08-22 13:14AnisNote Added: 0000786
2017-08-23 04:46hidayat@swag.myNote Added: 0000787
2017-08-24 10:58hidayat@swag.myNote Added: 0000788
2017-08-24 14:29AnisNote Added: 0000789
2017-08-25 08:44hidayat@swag.myNote Added: 0000790
2017-08-25 10:48hidayat@swag.myNote Added: 0000791
2017-08-25 11:13AnisNote Added: 0000792
2017-08-25 11:19hidayat@swag.myNote Added: 0000793
2017-08-25 11:46AnisNote Added: 0000794
2017-08-26 16:20mohamed.kallelStatusnew => resolved
2017-08-26 16:20mohamed.kallelResolutionopen => no change required
2017-08-26 16:20mohamed.kallelAssigned To => mohamed.kallel

2017-08-17 12:56   
(edited on: 2017-08-17 18:16)
what is the version of easycwmp that you use ?
it is recommended to use the last version.
could you provide the output of the cmd : ps aux|grep easycwmp
to check if easycwmp is running.

BTW, do you run easycwmp as root ?

2017-08-18 04:00   
Thank you very much for your speedy support! Really appreciate it!

Yes I did run easycwp as root.

The version that I'm using is easycwmp-openwrt-1.5.3. The latest one from the download page.

However now I just realized that I'm seeing this error in my kernel log:

Thu Aug 17 10:19:19 2017 daemon.notice easycwmpd: external script init
Thu Aug 17 10:19:19 2017 daemon.crit easycwmpd: configuration (re)loading failed, exit daemon

Can you please point me in the right direction on how to configure easycwmp?

I really appreciate your help!
2017-08-18 05:06   
I've recompile again the image for the raspberryPi, keep the default /etc/config/easycwmp, and it is running!

But now there is one other thing that I want to ask.

I've change the configuration in /etc/config/easycwmp for the 'option manufacturer'

to this -->

config device
        option oui 'SWAG_WR1'
        option serial_number 'FFFFF0000000001'
        option SerialNumber 'TESTSERIALNUMBERHERE'
        option manufacturer 'swag Technologies Sdn Bhd'
        option product_class 'SWAG_WR1'
        option hardware_version 'v1.0'
        option software_version 'v1.001'

but it always reverted back when I run /etc/init.d/easycwmpd stop/start -->

config device
        option oui 'SWAG_WR1'
        option serial_number 'FFFFF0000000001'
        option SerialNumber 'TESTSERIALNUMBERHERE'
        option manufacturer 'OpenWrt
http://www.openwrt.org/' [^]
        option product_class 'Generic'
        option hardware_version 'v0'
        option software_version '50108'

Can you help guide me to the correct place of where I need to do all the required configuration?

And can you also give me some information on how to send the some INFORM data to the ACS for 'BytesSent' and 'BytesReceived' and where can I put that information in.

Thank you very much!
2017-08-18 06:08   
Alright I've tried playing around with the easycwmp command.

I want to try setting up the parameter using the command like this -->

easycwmp set value Device.DeviceInfo.Manufacturer "swag technologies"
easycwmp apply value

But I always get this error -->
{ "parameter": "Device.DeviceInfo.Manufacturer", "fault_code": "9008" }

Can you help me with this please?

2017-08-18 10:52   
(edited on: 2017-08-18 11:26)
The parameter Manufacturer is retrieved from "/etc/device_info" file, you have to use this file to change it. When easycwmp start, easycwmp copy parameters from "/etc/device_info" to the "/etc/config/easycwmp".

The error that you got when setting Manufacturer param (with easycwmp set value) is normal, because Device.DeviceInfo.Mnufacturer is a read only parameter.

2017-08-21 09:26   
Hi Anis,

thank you very much for your reply.

Now I'm starting to understand it. But there is some more stuff that I would be really glad if you can help me.

I need to send some information to GenieAcs server for example the number of bytes used interface 1 for example?

Because right now I'm not seeing that information in GenieAcs. What I'm seeing is only the device information itself like the device id, manufacturer id and so on.
2017-08-21 12:00   

 Easycwmp open source contains only data model basic parameters (about 75 parameters). the Data model open source version is developed in shell and you can add others parameters to the current data model. For your case, there is few stats params under Device.IP.Interface.{i}. and you can add other stats parameters for other obect like PPP, WiFi, DHCP...

 The data model of OpenSource version is for basic usage and not for professional usage. We offer a commercial version of Data Model Developed in C. It contains a large number of parameters(about 400 parameters and it include stats) and it's much more faster then the shell solution (open source)
2017-08-21 12:03   
Alright so to be clear. All the data that is shown when I run 'easycwmp get value' should be sent to GenieACS right?

If that is true, is it safe to say right now there should be something that I still havent configured correctly on the GenieACS side?

BTW the other parameters, can I just add in any custom parameter thru 'easycwmp set value <custom_parameter_here> <value>' and 'easycwmp apply'?
2017-08-21 12:13   
as I know GenieAcs get all param of each device. otherwise you can contact genieacs support.

No, you have to develop your param script before and then you can make a get/set value of your new param.
2017-08-21 12:15   
Sorry for this. So by default easycwmp will send all information (about 75 parameters) together during 'inform' right?

And regarding the param script, can you give me an example of where to get started with it?
2017-08-21 12:23   
no, the inform rpc contains only some specific parameters.
You can see the log/capture to understand all exchange between acs and cpe.
You can follow the IP ojb/param implementation to add your own obj/param.
2017-08-21 12:25   
Ok great thank you very much for the information.

And how can I send the other 75 params to the ACS?

Im so sorry for all of this question. I just getting started with all of this like 3 days ago and I really appreciate this support.
2017-08-21 12:41   
(edited on: 2017-08-21 12:42)
genieacs has its own script to get the data model parameters for first time connection of each device.

the log/capture show you all details of TR069 session.

2017-08-22 04:57   
Alright so for GenieACS to get all the data from the CPE, I need to configure the GenieACS script to get the value from the device?
2017-08-22 09:10   
Hi Anis,

Can you guide me on how to change the following -->

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-2' to --> 'XMLSchema-instance"

Thank you!
2017-08-22 10:38   
Where can I view the log/capture?

And just to confirm. the IP obj/param implementation, is it this file --> easycwmp/ext/openwrt/scripts/functions/tr181/ip ??
2017-08-22 11:05   
for genieacs you have to contact genieacs support.

you can see the capture by wireshark.
logread cmd show you the log.

yes, easycwmp/ext/openwrt/scripts/functions/tr181/ip is the IP obj/param implementation file
2017-08-22 11:09   
Alright, if I want to implement a new scripts, do I need to recompile easycwmp manually?
2017-08-22 11:11   
if you change the script file(not .c file) you do not have to recompile. just copy the file at the right path
2017-08-22 11:22   

Another question. When the CPE received a task from ACS ie: getParameterValues, some of the information is not being sent by CPE to the ACS for example:

- Device.IP.Interface.1.Stats.BytesSent
- Device.IP.Interface.1.Stats.BytesReceived

Can you help me with this as well?
2017-08-22 11:32   
run the getParameterValues RPC and send me the capture to check that.
2017-08-22 11:34   
Sorry, how can I run that?
2017-08-22 11:35   
Oh wait, run in inside the ACS right. And the capture is thru wireshark?
2017-08-22 11:36   
yes, in wireshark make a filter on genieacs port
2017-08-22 11:37   
ok great gimme a sec
2017-08-22 12:19   
I tried running wireshark to capture the packet on a raspberry pi cpe, using this configuration on the wireshark. I selected remote ssh.

The configuration --> http://imgur.com/a/EoY6U [^]

Is it correct?
2017-08-22 12:25   
Pardon my stupidity. It is working. Im just looking at the wrong interface.
2017-08-22 12:26   
There I've just attached the wireshark file.
2017-08-22 13:14   
it does not contain the the capture of getParameterValues RPC !!
2017-08-23 04:46   
Oh really I'm sorry! I'll try to capture it again.
2017-08-24 10:58   
Hi Anis,

I've manage to get more parameters information. Thanks to you now I'm starting to understand how to protocol works.

Btw I have some more questions. As a default, do easycwmp implement factory RPC on the CPE?

If not, can you point me in the right direction on how can I start develop the functionality myself?

Thank you!
2017-08-24 14:29   
easycwmp supports factory_reset rpc
2017-08-25 08:44   
Hi anis, wow that is amazing! However I have a question. If I want to map the factory_reset function to another function of my own, can you show me where can I do that?

Thank you!
2017-08-25 10:48   
I've figured it out!

Now I just need to try to implement a custom parameter. I'll try to figure it out myself first.
2017-08-25 11:13   
sorry I'm busy right now,
what you need is easy to do, if you are understanding the source code
2017-08-25 11:19   
No worries Anis. You've helped a lot! Thank you very much. I'll continue tinkering on my own. But I might still bug you later though :)
2017-08-25 11:46   
you are welcome :)