iopsys-feed/icwmp
Sukru Senli ad652de055 Update feed [ feed_inteno_packages ] package [ icwmp ]
-------------------------------------------------------------------------------
* a65572a DeviceInfo.VendorLogFile : update instance in dmmap instead of systemwq!
* 6fc82a6 Ticket refs #14388: "Device.WiFi.AccessPoint.x.Enable"  is 0 after factory reset even though the Access points are enabled
* 0c20fe9 Ticket refs #14270: X_IOPSYS_ifname is wrongly populated for wifi clients in Device.Hosts.Host.{i}. profile
* 59261aa Ticket refs #14266: Ethernet Interface Alias parameter to be populated as same interface name
* 79aa835 #14159:TR-069: Vendor logfile in datamodel
* 393b7af Ticket refs #14185: TR069 reboot not working
* 679324f Ticket refs #13818: Not able to Upgrade/downgrade RG using TR069 . Required/Steps for Upgrade procedure
* fe026c3 Ticket refs #14209: TR-069: add support for compiling both TR-098 and TR-181 support and make it UCI configurable
-------------------------------------------------------------------------------
commit a65572af53664945cc6af751c2cbff3a37d64833
Author: Feten Besbes <feten.besbes@pivasoftware.com>
Date: 2018-03-08 11:03:49 +0100

    DeviceInfo.VendorLogFile : update instance in dmmap instead of systemwq!

Base directory -> /
 dm/dmtree/common/deviceinfo.c | 28 ++++++++++++++++++++++++----
 1 file changed, 24 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit 6fc82a68e0377a4aaa4a0a7f49c04803a122e4d1
Author: Amin Ben Ramdhane <amin.benramdhane@pivasoftware.com>
Date: 2018-03-07 13:04:21 +0100

    Ticket refs #14388: "Device.WiFi.AccessPoint.x.Enable"  is 0 after factory
    reset even though the Access points are enabled

Base directory -> /
 dm/dmtree/tr181/wifi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 0c20fe9560304df4ce29cf67c499062e75f436fa
Author: Amin Ben Ramdhane <amin.benramdhane@pivasoftware.com>
Date: 2018-03-07 13:02:10 +0100

    Ticket refs #14270: X_IOPSYS_ifname is wrongly populated for wifi clients in
    Device.Hosts.Host.{i}. profile

Base directory -> /
 dm/dmtree/tr181/hosts.c | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit 59261aabea1a8f31af52e5401541584e5743ab22
Author: Amin Ben Ramdhane <amin.benramdhane@pivasoftware.com>
Date: 2018-03-07 12:39:06 +0100

    Ticket refs #14266: Ethernet Interface Alias parameter to be populated as
    same interface name

Base directory -> /
 dm/dmtree/tr181/ethernet.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 79aa8353d7cc64933fafb1ee69d7991b77b18336
Author: Feten Besbes <feten.besbes@pivasoftware.com>
Date: 2018-03-07 10:07:42 +0100

    #14159:TR-069: Vendor logfile in datamodel

Base directory -> /
 dm/dmtree/common/deviceinfo.c | 63 ++++++++++++++++++++++++++++++++++++++
 dm/dmtree/common/deviceinfo.h |  7 +++++
 scripts/icwmp.sh              | 70 ++++++++++++++++++++++++++++++-------------
 xml.c                         | 26 ++++++++--------
 4 files changed, 131 insertions(+), 35 deletions(-)
-------------------------------------------------------------------------------
commit 393b7af010908ebccb379cc5620656088c37bbc8
Author: Omar Kallel <omar.kallel@pivasoftware.com>
Date: 2018-03-01 14:21:25 +0100

    Ticket refs #14185: TR069 reboot not working

Base directory -> /
 event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 679324fc33045953adc0ec63265738fc1b2e38ef
Author: Omar Kallel <omar.kallel@pivasoftware.com>
Date: 2018-03-01 11:37:55 +0100

    Ticket refs #13818: Not able to Upgrade/downgrade RG using TR069 .
    Required/Steps for Upgrade procedure

Base directory -> /
 xml.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit fe026c3ffa7623f12d14d4b164c458f3e5c5437c
Author: Amin Ben Ramdhane <amin.benramdhane@pivasoftware.com>
Date: 2018-03-01 10:41:34 +0100

    Ticket refs #14209: TR-069: add support for compiling both TR-098 and TR-181
    support and make it UCI configurable

Base directory -> /
 bin/Makefile.am                      |   5 +-
 config/cwmp                          |   3 +
 configure.ac                         |  14 ---
 dm/dmcommon.c                        |   9 ++
 dm/dmcommon.h                        |   1 +
 dm/dmcwmp.c                          |   2 +-
 dm/dmcwmp.h                          |  15 ++-
 dm/dmentry.c                         |  75 +++++++++++--
 dm/dmtree/common/root.c              | 200 +++++++++++++++++++++++++----------
 dm/dmtree/common/root.h              |  41 ++++---
 dm/dmtree/common/x_inteno_se_owsd.c  |  40 ++++---
 dm/dmtree/tr098/landevice.c          |  16 +--
 dm/dmtree/tr098/landevice.h          |  14 +--
 dm/dmtree/tr098/layer_2_bridging.c   |  22 ++--
 dm/dmtree/tr098/layer_3_forwarding.c |  25 ++---
 dm/dmtree/tr098/x_inteno_se_wifi.c   |   4 +-
 dm/dmtree/tr098/x_inteno_se_wifi.h   |   4 +-
 dm/dmtree/tr181/bridging.c           |  20 ++--
 dm/dmtree/tr181/bridging.h           |   2 -
 dm/dmtree/tr181/dhcp.c               |   2 +-
 dm/dmtree/tr181/hosts.c              |   4 +-
 dm/dmtree/tr181/ip.c                 |  13 ++-
 dm/dmtree/tr181/nat.c                |   2 +-
 dm/dmtree/tr181/ppp.c                |   8 +-
 dm/dmtree/tr181/routing.c            |  21 ++--
 dm/dmtree/tr181/wan.c                |   6 +-
 dm/dmtree/tr181/wifi.c               |  22 ++--
 dm/dmtree/tr181/wifi.h               |  18 ++--
 event.c                              |   2 +-
 xml.c                                |  12 +--
 30 files changed, 376 insertions(+), 246 deletions(-)
-------------------------------------------------------------------------------
2018-03-08 16:05:04 +01:00
..
files icwmp: do not use local out of function 2018-01-02 16:46:15 +01:00
Config_cwmp.in Makefile and Config files of new icwmp version 2017-12-24 14:11:05 +01:00
Config_datamodel.in Makefile and Config files of new icwmp version (modified) 2017-12-24 14:11:05 +01:00
Makefile Update feed [ feed_inteno_packages ] package [ icwmp ] 2018-03-08 16:05:04 +01:00
README new package icwmp 2015-10-05 10:01:07 +01:00

1)Build
    Requirements<74>:
	librairies:
	- libuci.so
	- libexpat.so
	- libcurl.so
	- libpthread.so
	- libopenssl.so
	- libz.so
	- libcrypto.so
	the librairies should be present in the "staging_dir/target-i386_uClibc-0.9.30.1/usr/lib/"  or "staging_dir/toolchain-mips_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib"
	
	header files and folders:
	- expat.h
	- expat_external.h
	- uci.h
	- uci_config.h
	- zlib.h
	- curl folder
	- openssl folder
	the header files and folders should be present in the staging_dir/target-i386_uClibc-0.9.30.1/usr/include/ or staging_dir/toolchain-i386_gcc-4.1.2_uClibc-0.9.30.1/usr/include/


if a librairie doesn't exist:
 	a- run make menuconfig and select the librarie
	b- build the librarie package

2) Build

this software is composed of 3 packages:
- icwmp package:  contains icwmpd daemon
- cwmp lib package: contains cwmplib and contains cwmp_value_change binary. They could be used by other user space applications in order to notify the icwmp daemon when paramter changes
- cwmp kernel package: contains cwmp kernel module. This module could be used by other kernel modules to notify the icwmpd daemon  when kernel parameter changes

The three packages should be selected in the make menu config in order to get the three packages compiled.
To compile the three packages: $ make package/cwmpd/compile 

3) OpenWRT settings
in the  OpenWRT, Add the following lines in the /usr/share/udhcpc/default.script file:
 uci_set_state provisioning iup tr069url "$url"
 uci_set_state provisioning iup provisioningcode "$provisioningcode"

4) Run
    Requirements:
	- libuci package should be installed
	- libexpat package should be installed
	- libcurl package should be installed
	- libpthread package should be installed
	- libopenssl package should be installed
	- libz package should be installed
	- libcrypto package should be installed
    
    Configure the acs url in the /etc/config/icwmp
    and then start the cwmpd service: /etc/init.d/icwmpd start
    for the help: /etc/init.d/icwmpd

5) Value Change

5.1) value change for user space applications (using the libcwmp)

Before using the libcwmp, we should check that the libcwmp package is selected in "make menu config". and we should check that the package is compiled.
The libcwmp should be installed uin the OpenWRT firmware

example of using libcwmp
in myapplication.c

#...
#include <cwmp_lib.h>
#...

int anyfunction ()
{
   .....
   /* parameter change here  */
   /* so we inform the icwmp: */
   lib_api_cwmp_value_change_call (3, "InternetGatewayDevice.LANDevice.{i}.LANHostConfigManagement.IPInterface.{i}.IPInterfaceIPAddress","lan2","3");
   .....
/*
Description of lib_api_cwmp_value_change_call input parameters
 parameter 1 : is the number of input string in the function lib_api_cwmp_value_change_call
 parameter 2 : is the parameter path
 parameter 3 : is the first correspondence related to the first indice
 parameter 4 : is the second correspondence related to the second indice
   .
   .
   .
 parameter n : is the (n-2) correspondence related to the (n-2) indice
*/

}

5.2) value change for user space applications (using the cwmp_value_change CLI)

Before using the libcwmp, we should check that the libcwmp package is selected in "make menu config". and we should check that the package is compiled.
The libcwmp should be installed uin the OpenWRT firmware

in OpenWRT:

root@OpenWrt:~# cwmp_value_change InternetGatewayDevice.LANDevice.{i}.LANHostConfigManagement.IPInterface.{i}.IPInterfaceIPAddress "lan2" "3"

in this case the command will force cwmp client to send a notification to the ACS (if and only if the parameter path as configured as active or as passive parameter using the setAttributeParameter method)

5.3) value change for kernel space modules
Before using the cwmp kernel module for value change, we should check that the kernel module package is selected in "make menu config". and we should check that the package is compiled.
The kernel module should be installed uin the OpenWRT firmware and should be insert before all other kernel modules

example of using cwmp kernel module
in mykernelmodule.c

#...
#include <linux/cwmp_kernel.h>
#...

int anykernelfunction ()
{
   .....
   /* parameter change here  */
   /* so we inform the cwmp: */
   kernel_api_cwmp_value_change_call (3, "InternetGatewayDevice.LANDevice.{i}.LANHostConfigManagement.IPInterface.{i}.IPInterfaceIPAddress","lan2","3");
   .....
/*
Description of lib_api_cwmp_value_change_call input parameters
 parameter 1 : is the number of input string in the function lib_api_cwmp_value_change_call
 parameter 2 : is the parameter path
 parameter 3 : is the first correspondence related to the first indice
 parameter 4 : is the second correspondence related to the second indice
   .
   .
   .
 parameter n : is the (n-2) correspondence related to the (n-2) indice
*/

}