diff --git a/README.md b/README.md index b78b070..d39260d 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ It defines **device configuration** (such as interface, manufacturer, etc...). T | `provisioning_code` | string | Specifies the primary service provider and other provisioning information, which may be used by the ACS to determine service provider-specific customization and provisioning parameters. | | `amd_version` | integer | Specifies the amendment version to use. The default amendment version is **'2'**. | | `instance_mode` | string | Specifies the instance mode to use, by default **'InstanceNumber'**. Two instance modes are supported: **'InstanceNumber' and 'InstanceNumber'**. | -| `session_timeout` | integer | | +| `session_timeout` | integer | Represents the number of seconds that should be used by the ACS as the amount of time to wait before timing out a CWMP session due to the CPE not responding, by default **60**.| | `notification` | boolean | If set to **1**, it enables the notification feature. | | `vlan_method` | integer | Specifies the vlan method to use, by default **'1'**. Two vlan methods are supported: **'1' and '2'** (1: only tagged vlan termination, 2: all vlan terminations tagged and untagged). | | `datamodel` | string | Specifies the data model to use, by default **'tr181'**. Two data models are supported: **'tr181' and 'tr098'**. | @@ -244,13 +244,13 @@ root@iopsys:~# - To trigger a new session to ACS with the event `'6 CONNECTION REQUEST'` or `'8 DIAGNOSTICS COMPLETE'`, etc.., use the `inform` ubus method with the appropriate `event` argument: ``` -root@iopsys:~# ubus call tr069 inform '{"event":"6 CONNECTION REQUEST"}' +root@iopsys:~# ubus call tr069 inform '{"event":"6 connection request"}' { "status": 1, "info": "Session started" } root@iopsys:~# -root@iopsys:~# ubus call tr069 inform '{"event":"8 DIAGNOSTICS COMPLETE"}' +root@iopsys:~# ubus call tr069 inform '{"event":"8 diagnostics complete"}' { "status": 1, "info": "Session started" diff --git a/init/icwmp_twampd b/init/icwmp_twampd index d20c91e..5ffa918 100644 --- a/init/icwmp_twampd +++ b/init/icwmp_twampd @@ -11,7 +11,7 @@ PROG="/usr/sbin/icwmp_twampd" start_service() { local id=`uci -q get cwmp_twamp.twamp.id` - local connection=`uci show cwmp_twamp | grep "cwmp_twamp.@twamp_refector.*id=\'$id\'" | cut -d "." -f 2` + local connection=`uci show cwmp_twamp | grep "cwmp_twamp.@twamp_reflector.*id=\'$id\'" | cut -d "." -f 2` local enable=`uci -q get cwmp_twamp.$connection.enable` local interface=`uci -q get cwmp_twamp.$connection.interface` local port=`uci -q get cwmp_twamp.$connection.port` diff --git a/scripts/juci.tr069 b/scripts/juci.tr069 index cb37391..e443ab2 100644 --- a/scripts/juci.tr069 +++ b/scripts/juci.tr069 @@ -9,7 +9,7 @@ case "$1" in call) case "$2" in connection_request) - ubus call tr069 inform '{"event" : "connection request"}' + ubus call tr069 inform '{"event" : "6 connection request"}' ;; esac ;; diff --git a/twamp/twamp.c b/twamp/twamp.c index 7f37a45..0517b9b 100644 --- a/twamp/twamp.c +++ b/twamp/twamp.c @@ -783,11 +783,11 @@ int twamp_connect(void) return 0; } -char *get_twamp_refector_option(char *instance, char *option) +char *get_twamp_reflector_option(char *instance, char *option) { struct uci_section *s; char *v, *twamp_id, *curr_interface; - dmuci_foreach_section("cwmp_twamp", "twamp_refector", s) { + dmuci_foreach_section("cwmp_twamp", "twamp_reflector", s) { twamp_id = dmuci_get_value_bysection(s, "id"); if(strcmp(twamp_id, instance) == 0) { @@ -814,14 +814,14 @@ int twamp_init(void) twamp_log(SDEBUG,"TWAMP Reflector Log Level:%d", cur_twamp_conf.loglevel); id = dmuci_get_value("cwmp_twamp", "twamp", "id"); - cur_twamp_conf.enable = atoi(get_twamp_refector_option(id, "enable")); - cur_twamp_conf.interface = strdup(get_twamp_refector_option(id, "interface")); - cur_twamp_conf.device = strdup(get_twamp_refector_option(id, "device")); - cur_twamp_conf.ip_version = atoi(get_twamp_refector_option(id, "ip_version")); - cur_twamp_conf.port = atoi(get_twamp_refector_option(id, "port")); - cur_twamp_conf.max_ttl = atoi(get_twamp_refector_option(id, "max_ttl")); - cur_twamp_conf.ip_list = strdup(get_twamp_refector_option(id, "ip_list")); - cur_twamp_conf.port_list = strdup(get_twamp_refector_option(id, "port_list")); + cur_twamp_conf.enable = atoi(get_twamp_reflector_option(id, "enable")); + cur_twamp_conf.interface = strdup(get_twamp_reflector_option(id, "interface")); + cur_twamp_conf.device = strdup(get_twamp_reflector_option(id, "device")); + cur_twamp_conf.ip_version = atoi(get_twamp_reflector_option(id, "ip_version")); + cur_twamp_conf.port = atoi(get_twamp_reflector_option(id, "port")); + cur_twamp_conf.max_ttl = atoi(get_twamp_reflector_option(id, "max_ttl")); + cur_twamp_conf.ip_list = strdup(get_twamp_reflector_option(id, "ip_list")); + cur_twamp_conf.port_list = strdup(get_twamp_reflector_option(id, "port_list")); twamp_log(SDEBUG,"TWAMP Reflector Enable: %d", cur_twamp_conf.enable); twamp_log(SDEBUG,"TWAMP Reflector Interface: %s", cur_twamp_conf.interface); diff --git a/xmpp/xmpp.c b/xmpp/xmpp.c index 668c31f..90f8ca3 100644 --- a/xmpp/xmpp.c +++ b/xmpp/xmpp.c @@ -224,7 +224,7 @@ xmpp_end: } else { cwmp_xmpp_log(SINFO,"XMPP Authorized"); send_stanza_cr_response(conn, stanza1, userdata); - XMPP_CMD(7, "ubus", "-t", "3", "call", "tr069", "inform", "{\"event\" : \"connection request\"}"); + XMPP_CMD(7, "ubus", "-t", "3", "call", "tr069", "inform", "{\"event\" : \"6 connection request\"}"); return 1; } return 1;