mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2026-03-12 03:58:34 +01:00
Ticket refs #1585: CWMP documentation
This commit is contained in:
parent
3fdaca7e34
commit
c08e5094a3
6 changed files with 736 additions and 0 deletions
401
README.md
Normal file
401
README.md
Normal file
|
|
@ -0,0 +1,401 @@
|
|||
# README #
|
||||
|
||||
icwmp is a client implementation of [TR-069/CWMP](https://cwmp-data-models.broadband-forum.org/) protocol.
|
||||
|
||||
## Build Instructions ##
|
||||
|
||||
icwmp is written in C programming language and depends on a number of librairies of OpenWrt for building and running.
|
||||
|
||||
## Project Components ##
|
||||
|
||||
The package is composed of the following components:
|
||||
|
||||
- [ICWMP](https://dev.iopsys.eu/iopsys/icwmp/blob/master/README.md) daemon written in C programming language and it's in charge of communication with ACS using the protocol TR-069/CWMP.
|
||||
- [STUN](https://dev.iopsys.eu/iopsys/icwmp/blob/master/stun/stun.md) daemon written in C for TR-069 stun connection request feature. the TR-069 stun is described in TR-069(Annex G) and in TR111(Part 2).
|
||||
- [XMPP](https://dev.iopsys.eu/iopsys/icwmp/blob/master/xmpp/xmpp.md) daemon written in C for TR-069 xmpp connection request feature. the TR-069 xmpp is described in TR-069(Annex K).
|
||||
- [BulkData](https://dev.iopsys.eu/iopsys/icwmp/blob/master/bulkdata/bulkdata.md) daemon written in C for collecting data from device to the data server collector. the TR-069 bulkdata is described in TR-069(Annex N) and TR157 Amendment 10(Annex A).
|
||||
- [TWAMP](https://dev.iopsys.eu/iopsys/icwmp/blob/master/twamp/twamp.md) daemon written in C. It is an implementation of the Two-Way Active Measurement Protocol (TWAMP) reflector measuring network as described in TR-390.
|
||||
- [UDP Echo Server](https://dev.iopsys.eu/iopsys/icwmp/blob/master/udpechoserver/udpechoserver.md) daemon written in C to support the UDP Echo Service. It's described in TR143.
|
||||
|
||||
**NOTE: The [STUN](https://dev.iopsys.eu/iopsys/icwmp/blob/master/stun/stun.md), [XMPP](https://dev.iopsys.eu/iopsys/icwmp/blob/master/xmpp/xmpp.md), [BulkData](https://dev.iopsys.eu/iopsys/icwmp/blob/master/bulkdata/bulkdata.md), [TWAMP](https://dev.iopsys.eu/iopsys/icwmp/blob/master/twamp/twamp.md) and [UDP Echo Server](https://dev.iopsys.eu/iopsys/icwmp/blob/master/udpechoserver/udpechoserver.md) are described in details in their relative sub packages.**
|
||||
|
||||
**NOTE: Below the detailed description about the icwmp.**
|
||||
|
||||
## Good To know ##
|
||||
|
||||
The icwmp client is :
|
||||
* tested with several ACS such as **Axiros**, **AVSytem**, **GenieACS**, **OpenACS**, etc...
|
||||
* supports all required TR069 RPCs.
|
||||
* supports all DataModel of TR family such as **TR-181**, **TR-104**, **TR-143**, **TR-157**, **TR-098**, etc...
|
||||
* supports all types of connection requests such as **HTTP**, **XMPP**, **STUN**.
|
||||
* supports integrated file transfer sudo as **HTTP**, **HTTPS**, **FTP**.
|
||||
|
||||
## Configuration File ##
|
||||
|
||||
The icwmp UCI configuration is located in **'/etc/config/cwmp'**, and contains 3 sections: **'acs'**, **'cpe'** and **'lwn'**.
|
||||
|
||||
```
|
||||
config cwmp 'acs'
|
||||
option userid 'iopsys'
|
||||
option dhcp_discovery 'enable'
|
||||
option compression 'Disabled'
|
||||
option retry_min_wait_interval '5'
|
||||
option retry_interval_multiplier '2000'
|
||||
|
||||
config cwmp 'cpe'
|
||||
option interface 'eth0.1'
|
||||
option default_wan_interface 'wan'
|
||||
option userid 'iopsys'
|
||||
option vlan_method '1'
|
||||
option datamodel 'tr181'
|
||||
option exec_download '0'
|
||||
|
||||
config cwmp 'lwn'
|
||||
option enable '1'
|
||||
option hostname ''
|
||||
option port ''
|
||||
```
|
||||
|
||||
### cwmp asc section ###
|
||||
|
||||
It defines **acs configuration** (like acs url, acs username, etc...). The possible options for **acs** section are listed in the table below.
|
||||
|
||||
| Name | Type | Description |
|
||||
| --------------------------- | ------- | ------------------------------- |
|
||||
| `url` | string | the **url** of ACS server. |
|
||||
| `userid` | string | the **username** of ACS server. |
|
||||
| `passwd` | string | the **password** of ACS server. |
|
||||
| `periodic_inform_enable` | boolean | If set to **1**, the CPE must periodically open session with ACS by sending Inform message to the ACS. |
|
||||
| `periodic_inform_interval` | integer | The duration in seconds of the interval for which the CPE must attempt to connect with the ACS and call the Inform method. |
|
||||
| `periodic_inform_time` | integer | An absolute time reference to determine when the CPE will initiate the periodic Inform method calls. |
|
||||
| `ParameterKey` | string | Provides the ACS a reliable and extensible means to track changes made by the ACS. |
|
||||
| `dhcp_discovery` | string | if set to **enable**, the CPE will get the url of ACS from DHCP server Option 43. |
|
||||
| `compression` | boolean | if set to **1**, the CPE must use the HTTP Compression when communicating with the ACS . |
|
||||
| `retry_min_wait_interval` | integer | The min wait interval of rerty session (in seconds) as described in the standard. |
|
||||
| `retry_interval_multiplier` | integer | The retry interval mulpilier of rerty session as described in the standard. |
|
||||
| `https_ssl_capath` | string | The path of ssl certicafications files. the ssl certification is for Upload and Downlod methods. |
|
||||
| `ipv6_enable` | boolean | if set to **1**, enable IPv6. |
|
||||
| `ssl_capath` | string | The path of ssl certicafications files. the ssl certification is for TR-069 sessions. |
|
||||
| `insecure_enable` | boolean | if set to **1**, the CPE checks the validity of the ACS certificates. |
|
||||
| `http_disable_100continue` | boolean | if set to **1**, disables the http 100 continue behaviour. |
|
||||
| `dhcp_url` | string | the **url** of ACS server received from the DHCP server Option 43 when **'dhcp_discovery'** option is enabled. This option is updated automatically by the daemon. |
|
||||
|
||||
### cwmp cpe section ###
|
||||
|
||||
It defines **device configuration** (such as interface, manufacturer, etc...). The possible options for **cpe** section are listed in the table below.
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----------------------- | ------- | ------------------------------------------------------------ |
|
||||
| `interface` | string | Specifies the device interface to use for connecting to ACS. |
|
||||
| `default_wan_interface` | string | Specifies the default wan interface of the device. |
|
||||
| `manufacturer` | string | Specifies the manafacturer of the device. |
|
||||
| `log_to_console` | string | If set to **1**, the log messages will be shown in the console. |
|
||||
| `log_to_file` | string | If set to **1**, the log messages will be saved in the log file. |
|
||||
| `log_severity` | string | Specifies the log type to use, by default **'INFO'**. The possible types are **'EMERG', 'ALERT', 'CRITIC' ,'ERROR', 'WARNING', 'NOTICE', 'INFO' and 'DEBUG'**. |
|
||||
| `log_file_name` | string | Specifies the path of the log file, by default **'/var/log/icwmpd.log'**. |
|
||||
| `log_max_size` | integer | Size of the log file. The default value is **102400**. |
|
||||
| `userid` | string | The username of the device used in a connection request from ACS to CPE. |
|
||||
| `passwd` | string | The password of the device when sending a connection request from ACS to CPE. |
|
||||
| `port` | integer | The port used for connection request. |
|
||||
| `ubus_socket` | string | Specifies the path of the ubus socket file, by default **'/var/run/ubus.sock'**. |
|
||||
| `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 | |
|
||||
| `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'**. |
|
||||
| `exec_download` | boolean | If set to **1**, Specifies if Download method is executed. |
|
||||
|
||||
### cwmp lwn section ###
|
||||
|
||||
It defines **lightweight notification configuration** (like enable, hostname, etc...). The possible options for **lwn** section are listed in the table below.
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---------- | ------- | ---------------------------------------------------------------------------------- |
|
||||
| `enable` | boolean | if set to **1**, the Lightweight Notifications will be enabled. |
|
||||
| `hostname` | string | The hostname or address to be used when sending the UDP Lightweight Notifications. |
|
||||
| `port` | integer | The port number to be used when sending UDP Lightweight Notifications. |
|
||||
|
||||
## RPCs Method supported ##
|
||||
|
||||
the folowing tables provides a summary of all methods, and indicates the conditions under which implementation of each RPC method defined in Annex A is `REQUIRED` or `OPTIONAL`.
|
||||
|
||||
### Methods for CPE responding ###
|
||||
|
||||
| Method name | CPE requirement | Supported |
|
||||
| ------------------------ | --------------- | --------- |
|
||||
| `GetRPCMethods` | `REQUIRED` | `Yes` |
|
||||
| `SetParameterValues` | `REQUIRED` | `Yes` |
|
||||
| `GetParameterValues` | `REQUIRED` | `Yes` |
|
||||
| `GetParameterNames` | `REQUIRED` | `Yes` |
|
||||
| `SetParameterAttributes` | `REQUIRED` | `Yes` |
|
||||
| `GetParameterAttributes` | `REQUIRED` | `Yes` |
|
||||
| `AddObject` | `REQUIRED` | `Yes` |
|
||||
| `DeleteObject` | `REQUIRED` | `Yes` |
|
||||
| `Reboot` | `REQUIRED` | `Yes` |
|
||||
| `Download` | `REQUIRED` | `Yes` |
|
||||
| `ScheduleDownload` | OPTIONAL | `Yes` |
|
||||
| `Upload` | OPTIONAL | `Yes` |
|
||||
| `FactoryReset` | OPTIONAL | `Yes` |
|
||||
| `GetQueuedTransfers` | OPTIONAL | No |
|
||||
| `GetAllQueuedTransfers` | OPTIONAL | No |
|
||||
| `CancelTransfer` | OPTIONAL | `Yes` |
|
||||
| `ScheduleInform` | OPTIONAL | `Yes` |
|
||||
| `ChangeDUState` | OPTIONAL | `Yes` |
|
||||
| `SetVouchers` | OPTIONAL | No |
|
||||
| `GetOptions` | OPTIONAL | No |
|
||||
|
||||
|
||||
### Methods for CPE calling ###
|
||||
|
||||
| Method name | CPE requirement | Supported |
|
||||
| --------------------------------- | --------------- | --------- |
|
||||
| `GetRPCMethods` | OPTIONAL | `Yes` |
|
||||
| `Inform` | `REQUIRED` | `Yes` |
|
||||
| `TransferComplete` | `REQUIRED` | `Yes` |
|
||||
| `AutonomousTransferComplete` | OPTIONAL | No |
|
||||
| `DUStateChangeComplete` | OPTIONAL | `Yes` |
|
||||
| `AutonomousDUStateChangeComplete` | OPTIONAL | No |
|
||||
| `RequestDownload` | OPTIONAL | No |
|
||||
| `Kicked` | OPTIONAL | No |
|
||||
|
||||
|
||||
## Concepts and Workflow ##
|
||||
|
||||
As indicated in the TR069 standard, the icwmpd starts automatically when the system is started. Then it connects to the ACS, that can be set manually by the admin or found by dhcp discovery. And later it could start other sessions due to event causes.
|
||||
|
||||
Session workflow could be checked with sniffer packets tool such as wireshark or tcpdump.
|
||||
In addition icwmpd has a log file '/var/log/icwmpd.log', that describes the workflow. E.g. below you can find an abstract of a log file content:
|
||||
|
||||
```
|
||||
24-12-2019, 10:21:18 [INFO] STARTING ICWMP with PID :7762
|
||||
24-12-2019, 10:21:18 [INFO] Periodic event is enabled. Interval period = 180000s
|
||||
24-12-2019, 10:21:18 [INFO] Periodic time is Unknown
|
||||
24-12-2019, 10:21:18 [INFO] Connection Request server initiated with the port: 7547
|
||||
24-12-2019, 10:21:18 [INFO] Start session
|
||||
24-12-2019, 10:21:18 [INFO] ACS url: http://genieacs:7547
|
||||
24-12-2019, 10:21:18 [INFO] Preparing the Inform RPC message to send to the ACS
|
||||
24-12-2019, 10:21:18 [INFO] Send the Inform RPC message to the ACS
|
||||
24-12-2019, 10:21:19 [INFO] Get the InformResponse message from the ACS
|
||||
24-12-2019, 10:21:19 [INFO] Send empty message to the ACS
|
||||
24-12-2019, 10:21:19 [INFO] Receive HTTP 204 No Content
|
||||
24-12-2019, 10:21:19 [INFO] End session
|
||||
24-12-2019, 10:21:19 [INFO] Waiting the next session
|
||||
```
|
||||
|
||||
You could set the uci config `cwmp.cpe.log_severity` option to `'DEBUG'` in order to show in details the cwmp log.
|
||||
|
||||
## ICWMP UBUS ##
|
||||
|
||||
icwmpd must be launched on startup after ubusd. It exposes the CWMP functionality over ubus. The icwmpd registers `tr069` namespaces with ubus, that has the shown below functionalities:
|
||||
|
||||
```
|
||||
root@iopsys:~# ubus -v list tr069
|
||||
'tr069' @04d3de4e
|
||||
"notify":{}
|
||||
"command":{"command":"String"}
|
||||
"status":{}
|
||||
"inform":{"GetRPCMethods":"Boolean","event":"String"}
|
||||
root@iopsys:~#
|
||||
```
|
||||
|
||||
Each object registered with the `'tr069'` namespace has a specific functionality.
|
||||
|
||||
To get the status of cwmp client, use the `status` ubus method:
|
||||
|
||||
```
|
||||
root@iopsys:~# ubus call tr069 status
|
||||
{
|
||||
"cwmp": {
|
||||
"status": "up",
|
||||
"start_time": "2019-12-24T10:21:18+01:00",
|
||||
"acs_url": "http:\/\/genieacs:7547"
|
||||
},
|
||||
"last_session": {
|
||||
"status": "success",
|
||||
"start_time": "2019-12-24T10:21:18+01:00",
|
||||
"end_time": "2019-12-24T10:21:19+01:00"
|
||||
},
|
||||
"next_session": {
|
||||
"status": "waiting",
|
||||
"start_time": "2019-12-26T12:21:18+01:00",
|
||||
"end_time": "N\/A"
|
||||
},
|
||||
"statistics": {
|
||||
"success_sessions": 1,
|
||||
"failure_sessions": 0,
|
||||
"total_sessions": 1
|
||||
}
|
||||
}
|
||||
root@iopsys:~#
|
||||
```
|
||||
|
||||
To trigger a new session of notify when a parameter is changed, then use the `notify` ubus method:
|
||||
|
||||
```
|
||||
root@iopsys:~# ubus call tr069 notify
|
||||
{
|
||||
"status": 1
|
||||
}
|
||||
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"}'
|
||||
{
|
||||
"status": 1,
|
||||
"info": "Session started"
|
||||
}
|
||||
root@iopsys:~#
|
||||
root@iopsys:~# ubus call tr069 inform '{"event":"8 DIAGNOSTICS COMPLETE"}'
|
||||
{
|
||||
"status": 1,
|
||||
"info": "Session started"
|
||||
}
|
||||
root@iopsys:~#
|
||||
root@iopsys:~# ubus call tr069 inform '{"GetRPCMethods":"1"}'
|
||||
{
|
||||
"status": 1,
|
||||
"info": "Session started"
|
||||
}
|
||||
root@iopsys:~#
|
||||
```
|
||||
|
||||
To reload the icwmp config, use the `command` ubus method with `reload` argument:
|
||||
|
||||
```
|
||||
root@iopsys:~# ubus call tr069 command '{"command":"reload"}'
|
||||
{
|
||||
"status": 1,
|
||||
"info": "cwmp config reloaded"
|
||||
}
|
||||
root@iopsys:~#
|
||||
```
|
||||
To exit the icwmpd daemod, use the `command` ubus method with `exit` argument:
|
||||
|
||||
```
|
||||
root@iopsys:~# ubus call tr069 command '{"command":"exit"}'
|
||||
{
|
||||
"status": 1,
|
||||
"info": "icwmpd daemon stopped"
|
||||
}
|
||||
root@iopsys:~#
|
||||
```
|
||||
|
||||
## ICWMP CLI ##
|
||||
|
||||
icwmpd offers a cli tool which its options are described with `--help` option as below:
|
||||
|
||||
```
|
||||
root@iopsys:~# icwmpd --help
|
||||
Usage: icwmpd [OPTIONS]
|
||||
-b, --boot-event (CWMP daemon) Start CWMP with BOOT event
|
||||
-g, --get-rpc-methods (CWMP daemon) Start CWMP with GetRPCMethods request to ACS
|
||||
-c, --command-input (DataModel CLI) Execute data model rpc(s) with commands input
|
||||
-m, --shell-cli <data model rpc> (DataModel CLI) Execute data model RPC command directly from shell.
|
||||
-a, --alias-based-addressing (DataModel CLI) Alias based addressing supported
|
||||
-N, --instance-mode-number (DataModel CLI) Instance mode is Number (Enabled by default)
|
||||
-A, --instance-mode-alias (DataModel CLI) Instance mode is Alias
|
||||
-M, --amendment <amendment version> (DataModel CLI) Amendment version (Default amendment version is 2)
|
||||
-U, --upnp (DataModel CLI) Use UPNP data model paths
|
||||
-u, --user-acl <public|basic|xxxadmin|superadmin> (DataModel CLI) user access level. Default: superadmin
|
||||
-t, --time-tracking (DataModel CLI) Tracking time of RPC commands
|
||||
-E, --evaluating-test (DataModel CLI) Evaluating test format
|
||||
-f, --file <file path> (DataModel CLI) Execute data model rpc(s) from file
|
||||
-w, --wep <strength> <passphrase> (WEP KEY GEN) Generate wep keys
|
||||
-h, --help Display this help text
|
||||
-v, --version Display the version
|
||||
root@iopsys:~#
|
||||
```
|
||||
|
||||
For example `'-m'` option is used to connect to the datamodel **(libbbfdm)** as following:
|
||||
|
||||
```
|
||||
root@iopsys:~# icwmpd -m 1 get_value Device.Time.
|
||||
{ "parameter": "Device.Time.CurrentLocalTime", "value": "2019-12-19T16:51:53+01:00", "type": "xsd:dateTime" }
|
||||
{ "parameter": "Device.Time.Enable", "value": "1", "type": "xsd:boolean" }
|
||||
{ "parameter": "Device.Time.LocalTimeZone", "value": "CET-1CEST,M3.5.0,M10.5.0/3", "type": "xsd:string" }
|
||||
{ "parameter": "Device.Time.NTPServer1", "value": "ntp1.sth.netnod.se", "type": "xsd:string" }
|
||||
{ "parameter": "Device.Time.NTPServer2", "value": "ntp1.gbg.netnod.se", "type": "xsd:string" }
|
||||
{ "parameter": "Device.Time.NTPServer3", "value": "", "type": "xsd:string" }
|
||||
{ "parameter": "Device.Time.NTPServer4", "value": "", "type": "xsd:string" }
|
||||
{ "parameter": "Device.Time.NTPServer5", "value": "", "type": "xsd:string" }
|
||||
{ "parameter": "Device.Time.Status", "value": "Synchronized", "type": "xsd:string" }
|
||||
{ "parameter": "Device.Time.X_IOPSYS_EU_LocalTimeZoneOlson", "value": "Europe/Stockholm", "type": "xsd:string" }
|
||||
{ "parameter": "Device.Time.X_IOPSYS_EU_SourceInterface", "value": "", "type": "xsd:string" }
|
||||
root@iopsys:~#
|
||||
```
|
||||
Another way to use icwmp cli is via the script `'icwmp'` that can be runned as follow:
|
||||
|
||||
```
|
||||
root@iopsys:~# icwmp get Device.Time.
|
||||
{ "parameter": "Device.Time.CurrentLocalTime", "value": "2019-12-19T16:52:05+01:00", "type": "xsd:dateTime" }
|
||||
{ "parameter": "Device.Time.Enable", "value": "1", "type": "xsd:boolean" }
|
||||
{ "parameter": "Device.Time.LocalTimeZone", "value": "CET-1CEST,M3.5.0,M10.5.0/3", "type": "xsd:string" }
|
||||
{ "parameter": "Device.Time.NTPServer1", "value": "ntp1.sth.netnod.se", "type": "xsd:string" }
|
||||
{ "parameter": "Device.Time.NTPServer2", "value": "ntp1.gbg.netnod.se", "type": "xsd:string" }
|
||||
{ "parameter": "Device.Time.NTPServer3", "value": "", "type": "xsd:string" }
|
||||
{ "parameter": "Device.Time.NTPServer4", "value": "", "type": "xsd:string" }
|
||||
{ "parameter": "Device.Time.NTPServer5", "value": "", "type": "xsd:string" }
|
||||
{ "parameter": "Device.Time.Status", "value": "Synchronized", "type": "xsd:string" }
|
||||
{ "parameter": "Device.Time.X_IOPSYS_EU_LocalTimeZoneOlson", "value": "Europe/Stockholm", "type": "xsd:string" }
|
||||
{ "parameter": "Device.Time.X_IOPSYS_EU_SourceInterface", "value": "", "type": "xsd:string" }
|
||||
root@iopsys:~#
|
||||
```
|
||||
|
||||
**NOTE: It's the same, whether to use icwmp script or icwmpd command for connecting to datamodel**
|
||||
|
||||
```
|
||||
root@iopsys:~# icwmpd -m 1 inform
|
||||
{ "parameter": "Device.DeviceInfo.HardwareVersion", "value": "DG400PRIMEA", "type": "xsd:string" }
|
||||
{ "parameter": "Device.DeviceInfo.Manufacturer", "value": "iopsys", "type": "xsd:string" }
|
||||
{ "parameter": "Device.DeviceInfo.ManufacturerOUI", "value": "201F31", "type": "xsd:string" }
|
||||
{ "parameter": "Device.DeviceInfo.ModelName", "value": "DG400PRIMEA", "type": "xsd:string" }
|
||||
{ "parameter": "Device.DeviceInfo.ProductClass", "value": "DG400PRIME", "type": "xsd:string" }
|
||||
{ "parameter": "Device.DeviceInfo.ProvisioningCode", "value": "", "type": "xsd:string" }
|
||||
{ "parameter": "Device.DeviceInfo.SerialNumber", "value": "J814001008", "type": "xsd:string" }
|
||||
{ "parameter": "Device.DeviceInfo.SoftwareVersion", "value": "DG400PRIME-A-IOPSYS-4.4.0RC1-191205_1004", "type": "xsd:string" }
|
||||
{ "parameter": "Device.DeviceInfo.SpecVersion", "value": "1.0", "type": "xsd:string" }
|
||||
{ "parameter": "Device.ManagementServer.AliasBasedAddressing", "value": "false", "type": "xsd:boolean" }
|
||||
{ "parameter": "Device.ManagementServer.ConnReqJabberID", "value": "", "type": "xsd:string" }
|
||||
{ "parameter": "Device.ManagementServer.ConnReqXMPPConnection", "value": "Device.XMPP.Connection.", "type": "xsd:string" }
|
||||
{ "parameter": "Device.ManagementServer.ConnectionRequestURL", "value": "http://192.168.117.45:7547/", "type": "xsd:string" }
|
||||
{ "parameter": "Device.ManagementServer.ParameterKey", "value": "", "type": "xsd:string" }
|
||||
root@iopsys:~#
|
||||
root@iopsys:~# icwmp inform
|
||||
{ "parameter": "Device.DeviceInfo.HardwareVersion", "value": "DG400PRIMEA", "type": "xsd:string" }
|
||||
{ "parameter": "Device.DeviceInfo.Manufacturer", "value": "iopsys", "type": "xsd:string" }
|
||||
{ "parameter": "Device.DeviceInfo.ManufacturerOUI", "value": "201F31", "type": "xsd:string" }
|
||||
{ "parameter": "Device.DeviceInfo.ModelName", "value": "DG400PRIMEA", "type": "xsd:string" }
|
||||
{ "parameter": "Device.DeviceInfo.ProductClass", "value": "DG400PRIME", "type": "xsd:string" }
|
||||
{ "parameter": "Device.DeviceInfo.ProvisioningCode", "value": "", "type": "xsd:string" }
|
||||
{ "parameter": "Device.DeviceInfo.SerialNumber", "value": "J814001008", "type": "xsd:string" }
|
||||
{ "parameter": "Device.DeviceInfo.SoftwareVersion", "value": "DG400PRIME-A-IOPSYS-4.4.0RC1-191205_1004", "type": "xsd:string" }
|
||||
{ "parameter": "Device.DeviceInfo.SpecVersion", "value": "1.0", "type": "xsd:string" }
|
||||
{ "parameter": "Device.ManagementServer.AliasBasedAddressing", "value": "false", "type": "xsd:boolean" }
|
||||
{ "parameter": "Device.ManagementServer.ConnReqJabberID", "value": "", "type": "xsd:string" }
|
||||
{ "parameter": "Device.ManagementServer.ConnReqXMPPConnection", "value": "Device.XMPP.Connection.", "type": "xsd:string" }
|
||||
{ "parameter": "Device.ManagementServer.ConnectionRequestURL", "value": "http://192.168.117.45:7547/", "type": "xsd:string" }
|
||||
{ "parameter": "Device.ManagementServer.ParameterKey", "value": "", "type": "xsd:string" }
|
||||
root@iopsys:~#
|
||||
```
|
||||
|
||||
## Dependencies ##
|
||||
|
||||
To successfully build icwmp, the following libraries are needed:
|
||||
|
||||
| Dependency | Link | License |
|
||||
| ----------- | ------------------------------------------- | -------------- |
|
||||
| libuci | https://git.openwrt.org/project/uci.git | LGPL 2.1 |
|
||||
| libubox | https://git.openwrt.org/project/libubox.git | BSD |
|
||||
| libubus | https://git.openwrt.org/project/ubus.git | LGPL 2.1 |
|
||||
| libjson-c | https://s3.amazonaws.com/json-c_releases | MIT |
|
||||
| libopenssl | http://ftp.fi.muni.cz/pub/openssl/source/ | OpenSSL |
|
||||
| libcurl | https://dl.uxnr.de/mirror/curl | MIT |
|
||||
| libbbfdm | https://dev.iopsys.eu/iopsys/bbf.git | LGPL 2.1 |
|
||||
| libmicroxml | https://dev.freecwmp.org/microxml | LGPL 2.0 |
|
||||
| libpthread | | |
|
||||
|
||||
106
bulkdata/bulkdata.md
Normal file
106
bulkdata/bulkdata.md
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
# README #
|
||||
|
||||
icwmp_bulkdatad is an implementation of The HTTP bulk data collection mechanism which is an extended feature of CPE and other agents implementing TR-069(CWMP) or TR-369(USP), defined by the Broadband Forum. It provides a means by which an Auto-Configuration Server (ACS), or USP Controller, can configure an agent to periodically send a JSON or CSV formatted set of Device information to an HTTP server running a data collection application.
|
||||
|
||||
## Configuration File ##
|
||||
|
||||
The icwmp_bulkdatad UCI configuration is located in **'/etc/config/cwmp\_bulkdata'**, and contains 4 sections: **bulkdata**, **profile**, **profile\_parameter** and **profile\_http\_request\_uri\_parameter**.
|
||||
|
||||
```
|
||||
config bulkdata 'bulkdata'
|
||||
option enable '0'
|
||||
option log_level '3'
|
||||
|
||||
config profile
|
||||
option profile_id '1'
|
||||
option enable '0'
|
||||
option csv_encoding_row_time_stamp 'unix'
|
||||
option json_encoding_report_time_stamp 'unix'
|
||||
option http_retry_minimum_wait_interval '5'
|
||||
option http_retry_interval_multiplier '2000'
|
||||
|
||||
config profile_parameter
|
||||
option profile_id '1'
|
||||
option name ''
|
||||
option reference ''
|
||||
|
||||
config profile_http_request_uri_parameter
|
||||
option profile_id '1'
|
||||
option name ''
|
||||
option reference ''
|
||||
```
|
||||
|
||||
### bulkdata section ###
|
||||
|
||||
It defines **bulkdata configuration**: enable and log\_level.
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----------- | ------- | ----------------------------------------------------------------------------------------------- |
|
||||
| `enable` | boolean | Enables the BulkData feature if set to "1". |
|
||||
| `log_level` | integer | Specifies the log type to use, by default **'INFO'**. The possible types are **'EMERG', 'ALERT', 'CRITIC' ,'ERROR', 'WARNING', 'NOTICE', 'INFO' and 'DEBUG'**. |
|
||||
|
||||
### profile section ###
|
||||
|
||||
It defines **the profile section configuration**: enable, name,... The possible options for **profile** section are listed below:
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---------------------------------- | ------- | ---------------------------------------------- |
|
||||
| `profile_id` | integer | The profile id to use. |
|
||||
| `enable` | boolean | If set to **1**, enables the bulkdata profile. |
|
||||
| `alias` | string | The alias of the profile. |
|
||||
| `name` | string | The name of the profile. |
|
||||
| `nbre_of_retained_failed_reports` | integer | The number of failed reports to be retained and transmitted at the end of the current reporting interval. |
|
||||
| `protocol` | string | The protocol used for the collection profile. |
|
||||
| `encoding_type` | string | The encoding type used for the collection profile. |
|
||||
| `reporting_interval` | integer | The reporting interval in seconds. |
|
||||
| `time_reference` | integer | The time reference to determine when the profile will be transmitted to the ACS collector. |
|
||||
| `csv_encoding_field_separator` | string | The field separator to use when encoding CSV data. |
|
||||
| `csv_encoding_row_separator` | string | The row separator to use when encoding CSV data. |
|
||||
| `csv_encoding_escape_character` | string | The escape character to use when encoding CSV data. |
|
||||
| `csv_encoding_report_format` | string | Describes how reports will be formatted. Two possible formats are supported: **'ParameterPerRow' and 'ParameterPerColumn'**. |
|
||||
| `csv_encoding_row_time_stamp` | string | The format of the timestamp to use for data inserted into the row. The row time stamp supported are **'Unix-Epoch', 'ISO-8601' and 'None'**. |
|
||||
| `json_encoding_report_format` | string | Describes the report format. The supported report formats are **'ObjectHierarchy' and 'NameValuePair'**. |
|
||||
| `json_encoding_report_time_stamp` | string | The format of the timestamp to use for the JSON Object named "CollectionTime". The supported timestamp are **'Unix-Epoch', 'ISO-8601' and 'None'**. |
|
||||
| `http_url` | string | The URL of the collection server. |
|
||||
| `http_username` | string | The username of the collection server. |
|
||||
| `http_password` | string | The password of the collection server. |
|
||||
| `http_compression` | string | The HTTP Compression mechanism used by the collection server. The supported compression mechanism are **'GZIP', 'Compress' and 'Deflate'**. |
|
||||
| `http_method` | string | The HTTP method used by the collection server. Two methods are supported: **'POST' and 'PUT'**. |
|
||||
| `http_use_date_header` | boolean | If set to **1**, the CPE encodes the HTTP Date Header. |
|
||||
| `http_retry_enable` | boolean | If set to **1**, the CPE retries unsuccessful attempts to transfer data. |
|
||||
| `http_retry_minimum_wait_interval` | integer | The data transfer retry wait interval. |
|
||||
| `http_retry_interval_multiplier` | integer | The retry interval multiplier. |
|
||||
| `http_persist_across_reboot` | boolean | If set to **1**, failed data transfers must be persisted across reboots. |
|
||||
|
||||
### profile_parameter section ###
|
||||
|
||||
It defines **the profile\_parameter section configuration**: profile\_id, name, reference.
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------------ | ------- | --------------------------------------- |
|
||||
| `profile_id` | integer | The id of the used profile. |
|
||||
| `name` | string | The name of the profile parameter. |
|
||||
| `reference` | string | The reference of the profile parameter. |
|
||||
|
||||
### profile_http_request_uri_parameter section ###
|
||||
|
||||
It defines **the profile\_http\_request\_uri\_parameter section configuration**: profile\_id, name, reference.
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------------ | ------- | --------------------------------------- |
|
||||
| `profile_id` | integer | The id of the used profile. |
|
||||
| `name` | string | The name of the Request-URI parameter. |
|
||||
| `reference` | string | The reference of the profile parameter. |
|
||||
|
||||
## Dependencies ##
|
||||
|
||||
To successfully build icwmp_bulkdatad, the following libraries are needed:
|
||||
|
||||
| Dependency | Link | License |
|
||||
| ----------- | ------------------------------------------- | -------------- |
|
||||
| libuci | https://git.openwrt.org/project/uci.git | LGPL 2.1 |
|
||||
| libubox | https://git.openwrt.org/project/libubox.git | BSD |
|
||||
| libjson-c | https://s3.amazonaws.com/json-c_releases | MIT |
|
||||
| libcurl | https://dl.uxnr.de/mirror/curl | MIT |
|
||||
| libbbfdm | https://dev.iopsys.eu/iopsys/bbf.git | LGPL 2.1 |
|
||||
|
||||
47
stun/stun.md
Normal file
47
stun/stun.md
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
# README #
|
||||
|
||||
In order to reach the devices that are connected behind NAT, the cwmp protocol introduces alternative method of executing Connection Request via NAT based on STUN. The icwmp_stund is an implementation of STUN functionality that performs this feature.
|
||||
|
||||
## Configuration File ##
|
||||
|
||||
The icwmp_stund UCI configuration is located in **'/etc/config/cwmp\_stun'** and contains only one section **stun**:
|
||||
|
||||
```
|
||||
config stun 'stun'
|
||||
option username 'tr069_stun'
|
||||
option password 'tr069_stun'
|
||||
option server_address 'stun.l.google.com'
|
||||
option server_port '19302'
|
||||
option min_keepalive '30'
|
||||
option max_keepalive '3600'
|
||||
option client_port 7547
|
||||
option log_level '1'
|
||||
```
|
||||
|
||||
### stun section ###
|
||||
|
||||
It defines **the stun section configuration** (like username, password, etc...). The possible options for **stun** section are listed in the table below.
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---------------- | ------- | ------------------------------------------------- |
|
||||
| `username` | string | The STUN username to be used in Binding Requests. |
|
||||
| `password` | string | The STUN Password to be used in computing the MESSAGE-INTEGRITY. |
|
||||
| `server_address` | string | The host name or IP address of the STUN server to send Binding Requests. |
|
||||
| `server_port` | integer | The port number of the STUN server to send Binding Requests. |
|
||||
| `min_keepalive` | integer | The minimum period that STUN Binding Requests must be sent by the CPE for the purpose of maintaining the binding in the Gateway. |
|
||||
| `max_keepalive` | integer | The maximum period that STUN Binding Requests must be sent by the CPE for the purpose of maintaining the binding in the Gateway. |
|
||||
| `client_port` | integer | The client source port of the STUN UDP binding. |
|
||||
| `log_level` | integer | The log type to use, by default it is set to **'INFO'**. The possible types are **'EMERG', 'ALERT', 'CRITIC' ,'ERROR', 'WARNING', 'NOTICE', 'INFO' and 'DEBUG'**. |
|
||||
|
||||
## Dependencies ##
|
||||
|
||||
To successfully build icwmp_stund, the following libraries are needed:
|
||||
|
||||
| Dependency | Link | License |
|
||||
| --------------- | ------------------------------------------- | -------------- |
|
||||
| libuci | https://git.openwrt.org/project/uci.git | LGPL 2.1 |
|
||||
| libubox | https://git.openwrt.org/project/libubox.git | BSD |
|
||||
| libubus | https://git.openwrt.org/project/ubus.git | LGPL 2.1 |
|
||||
| libjson-c | https://s3.amazonaws.com/json-c_releases | MIT |
|
||||
| libopenssl | http://ftp.fi.muni.cz/pub/openssl/source/ | OpenSSL |
|
||||
|
||||
57
twamp/twamp.md
Normal file
57
twamp/twamp.md
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
# README #
|
||||
|
||||
icwmp_twampd is an implementation of the Two-Way Active Measurement Protocol (TWAMP) reflector.
|
||||
|
||||
|
||||
## Configuration File ##
|
||||
|
||||
The icwmp_twampd UCI configuration is located in **'/etc/config/cwmp\_twamp'**, and contains 2 sections the **twam** and the **twamp\_reflector**.
|
||||
|
||||
```
|
||||
config cwmp 'twamp'
|
||||
option id '1'
|
||||
option log_level '3'
|
||||
|
||||
config twamp_reflector
|
||||
option id '1'
|
||||
option enable ''
|
||||
option interface ''
|
||||
option device ''
|
||||
option ip_version ''
|
||||
option port ''
|
||||
option max_ttl ''
|
||||
option ip_list ''
|
||||
option port_list ''
|
||||
```
|
||||
|
||||
### cwmp twamp section ###
|
||||
|
||||
It defines **the twamp configuration**: id, log_level. The possible options for **twamp** section are:
|
||||
|
||||
| Name | Type | Description |
|
||||
| --------- | ------- | ------------------------------------------- |
|
||||
| id | integer | Specifies the id of TWAMP reflector to use. |
|
||||
| log_level | integer | Specifies the log type to use, by default **'INFO'**. The possible types are **'EMERG', 'ALERT', 'CRITIC' ,'ERROR', 'WARNING', 'NOTICE', 'INFO' and 'DEBUG'**. |
|
||||
|
||||
### twamp_reflector section ###
|
||||
|
||||
It describes **the twamp reflector configuration**: id, ip\_version, etc... The possible options for **twamp_reflector** section are:
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---------- | ------- | ------------------------------ |
|
||||
| id | integer | Specifies the TWAMP id to use. |
|
||||
| enable | boolean | If set to **1**, it enables the TWAMP reflector. |
|
||||
| ip_version | integer | Specifies the IP version to use, 4 by default. The possible versions are 4 and 6. |
|
||||
| port | integer | Specifies the port to listen on. |
|
||||
| max_ttl | integer | Specifies the maximum TTL of a received packet, that the TWAMP reflector will reflect to the TWAMP controller. |
|
||||
| ip_list | string | Specifies the allowed source IP addresses and subnets to handle test packets. |
|
||||
| port_list | string | Specifies the range of source ports allowed to use for twamp\_reflector tests. |
|
||||
|
||||
## Dependencies ##
|
||||
|
||||
To successfully build icwmp_twampd, the following libraries are needed:
|
||||
|
||||
| Dependency | Link | License |
|
||||
| ----------- | ------------------------------------------- | -------------- |
|
||||
| libuci | https://git.openwrt.org/project/uci.git | LGPL 2.1 |
|
||||
|
||||
40
udpechoserver/udpechoserver.md
Normal file
40
udpechoserver/udpechoserver.md
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
# README #
|
||||
|
||||
icwmp_udpechoserverd is an implementation of udp echo server to perform the UDP Echo Service and UDP Echo Plus Service.
|
||||
|
||||
## Configuration File ##
|
||||
|
||||
The icwmp_udpechoserverd UCI configuration is located in **'/etc/config/cwmp\_udpechoserver'** and contains only one section: **udpechoserver**.
|
||||
|
||||
```
|
||||
config udpechoserver 'udpechoserver'
|
||||
option enable '0'
|
||||
option interface ''
|
||||
option address ''
|
||||
option server_port ''
|
||||
option plus '0'
|
||||
option log_level '3'
|
||||
```
|
||||
|
||||
### udpechoserver section ###
|
||||
|
||||
It defines **the udpechoserver configuration** such as enable, interface, address, etc... Possible options to be used in **the udpechoserver** section are listed in the table below.
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------------- | ------- | ------------------------------------------------- |
|
||||
| `enable` | boolean | If set to **1**, UDP Echo Server will be enabled. |
|
||||
| `interface` | string | Specifies the interface on which the CPE MUST listen and receive UDP echo requests. |
|
||||
| `address` | string | Specifies the source IP address which can make an UDP echo requests. |
|
||||
| `server_port` | integer | The UDP port on which the UDP Echo server MUST listen and respond to UDP echo requests. |
|
||||
| `plus` | boolean | If set to 1, the CPE will perform necessary packet processing for UDP Echo Plus packets. |
|
||||
| `log_level` | integer | Specifies the log type to use, by default it is set to **'INFO'**. The possible types are **'EMERG', 'ALERT', 'CRITIC' ,'ERROR', 'WARNING', 'NOTICE', 'INFO' and 'DEBUG'**. |
|
||||
|
||||
|
||||
## Dependencies ##
|
||||
|
||||
To successfully build icwmp_udpechoserverd, the following libraries are needed:
|
||||
|
||||
| Dependency | Link | License |
|
||||
| ----------- | ------------------------------------------- | -------------- |
|
||||
| libuci | https://git.openwrt.org/project/uci.git | LGPL 2.1 |
|
||||
|
||||
85
xmpp/xmpp.md
Normal file
85
xmpp/xmpp.md
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
# README #
|
||||
|
||||
In order to reach the devices that are connected behind NAT, the cwmp protocol introduces alternative method of executing Connection Request via NAT based on XMPP. The icwmp_xmppd is an implementation of XMPP functionality that performs this feature.
|
||||
|
||||
## Configuration File ##
|
||||
|
||||
The icwmp_xmppd UCI configuration is located in **'/etc/config/cwmp\_xmpp'**, and contains 3 sections: **xmpp**, **xmpp\_connection** and **xmpp\_connection\_server**.
|
||||
|
||||
```
|
||||
config cwmp 'xmpp'
|
||||
option enable '0'
|
||||
option id '0'
|
||||
option allowed_jid ''
|
||||
option loglevel '3'
|
||||
|
||||
config xmpp_connection
|
||||
option enable '0'
|
||||
option username ''
|
||||
option password ''
|
||||
option domain ''
|
||||
option resource ''
|
||||
option serveralgorithm 'DNS-SRV'
|
||||
|
||||
config xmpp_connection_server
|
||||
option id_connection '1'
|
||||
option connection_server_instance '1'
|
||||
option enable '0'
|
||||
option port '5222'
|
||||
```
|
||||
|
||||
### cwmp xmpp section ###
|
||||
|
||||
It defines **the cwmp xmpp section configuration**: enable, id, etc... The possible options for **cwmp xmpp** section are listed in the table below.
|
||||
|
||||
| Name | Type | Description |
|
||||
| --------------| ------- | --------------------------------------------- |
|
||||
| `enable` | boolean | If set to **1**, it enables the XMPP feature. |
|
||||
| `id` | integer | The id of XMPP connection. |
|
||||
| `allowed_jid` | string | The list of Jabber IDs or addresses that are allowed to initiate an XMPP Connection Request. |
|
||||
| `loglevel` | integer | The log type to use, by default it is set to **'INFO'**. The possible types are **'EMERG', 'ALERT', 'CRITIC' ,'ERROR', 'WARNING', 'NOTICE', 'INFO' and 'DEBUG'**. |
|
||||
|
||||
### xmpp_connection section ###
|
||||
|
||||
It defines the xmpp\_connection section configuration**: enable, connection\_instance, username, etc... The possible options for **xmpp\_connection** section are listed in the table below.
|
||||
|
||||
| Name | Type | Description |
|
||||
| --------------------------- | ------- | ----------------------------------------------------- |
|
||||
| `connection_instance` | integer | The instance number of the XMPP connection. |
|
||||
| `enable` | boolean | If set to **1**, it enables the XMPP connection. |
|
||||
| `connection_alias` | string | The alias of the XMPP connection. |
|
||||
| `username` | string | The username of the XMPP connection. |
|
||||
| `password` | string | The password of the XMPP connection. |
|
||||
| `domain` | string | The proposed domain-part of the Jabber ID of the XMPP connection. |
|
||||
| `resource` | string | The proposed resource-part of the Jabber ID of the XMPP connection. |
|
||||
| `usetls` | boolean | If set to **1**, the CPE will initiate TLS negotiation. |
|
||||
| `interval` | integer | The number of seconds, that keep alive events are sent by the XMPP connection. |
|
||||
| `attempt` | string | The number of times that the Connection attempts to connect to a given IP address. |
|
||||
| `initial_retry_interval` | integer | The maximum first reconnection wait interval in seconds. |
|
||||
| `retry_interval_multiplier` | integer | The reconnection interval multiplier. |
|
||||
| `retry_max_interval` | integer | The maximum reconnection wait interval in seconds. |
|
||||
| `serveralgorithm` | string | The algorithm used when connecting with the XMPP server. Two algorithms are supported: **'DNS-SRV' and 'ServerTable'**. |
|
||||
|
||||
|
||||
### xmpp_connection_server section ###
|
||||
|
||||
It defines **the xmpp\_connection\_server section configuration**: id\_connection, enable, port, etc... The possible options for **xmpp\_connection\_server** section are listed in the table below.
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---------------------------- | ------- | ------------------------------ |
|
||||
| `id_connection` | string | The id XMPP connection to use. |
|
||||
| `connection_server_instance` | integer | The instance number of the XMPP server. |
|
||||
| `enable` | boolean | If set to **1**, it enables this XMPP server. |
|
||||
| `connection_server_alias` | string | The alias of the XMPP connection. |
|
||||
| `port` | integer | The port of the XMPP connection. |
|
||||
| `server_address` | string | The server address of the XMPP connection. |
|
||||
|
||||
## Dependencies ##
|
||||
|
||||
To successfully build icwmp, the following libraries are needed:
|
||||
|
||||
| Dependency | Link | License |
|
||||
| ----------- | --------------------------------------- | -------------- |
|
||||
| libuci | https://git.openwrt.org/project/uci.git | LGPL 2.1 |
|
||||
| libstrophe | https://github.com/strophe/libstrophe | GPL 3.0 |
|
||||
|
||||
Loading…
Add table
Reference in a new issue