RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
Protocol Agents are CCSP components that directly interface to the Cloud. These components facilitate remote administration/management of GW device profiles. The Protocol Agents provides the necessary abstraction to the internal CCSP architecture and internal CCSP components for interacting with the Cloud. The internal CCSP components are not required to be aware of any protocol specific details on the cloud interfaces. As a Protocol Agent could be an SNMP PA or a TR-069 PA..etc.
TR69 ACS uses HTTP/SOAP to communicate with EP or GW. The TR69 protocol agent hides all the protocol specific details and communicates internally using internal namespaces and APIs over the CCSP message bus.
There may be multiple instances of Protocol Agents in a CCSP subsystem.
Protocol Agents perform the following functions:
Authenticate and establish secure session with their corresponding cloud configuration server during initialization.
Perform low level protocol handling for downstream traffic.
Perform low level protocol handling for upstream traffic.
Routes cloud messages to internal functional components registered for consumption/processing of those namespaces by looking up the Component Registrar.
“Action” Normalization
Define an XML based Mapping Schema that defines the mapping from external constructs to internal constructs. These constructs will include:Signals errors and routes responses to corresponding cloud adapters
Performs all transactions as an atomic operation.
Manages the order of operations within a transaction and across transactions.
Control Plane architecture abstracts the cloud interfaces for internal CCSP architecture. It makes internal common components like TR-069 PA to be agnostic to those cloud interfaces by using a set of normalized actions.
This component is responsible for all normalized actions listed below. This component does not provide interface for servicing normalized actions, rather it depends on functional components to expose APIs on CCSP message bus.
North bound interface to cloud, this component implements CWMP CPE. Through south bound interface, this component interacts with CR and FCs to perform normalized actions. And the related data structures and function prototypes will be defined by CCSP Architecture Specification, and please refer to it for details. This document only discusses specific items related to the TR-069 PA component.
Upon start up, the TR- 069 PA loads a mapping configuration file which includes information on how to map external namespaces specific to the PA to internal namespaces on supported data model parameters as well as external and internal data types of each parameter.
With respect to downloadable applications that define their own data model (defining external data model only), TR-069 PA must be able to route normalized calls to appropriate applications via Application Framework Adapter which should be covered by TR-069 Protocol Agent Software Design Document. The Application Framework Adapter is the default route for all data model namespace for which there is no explicit mapping to an internal namespace.
TR-069 PA needs a XML mapping file to achieve the following goals.
Error Mapping
CCSP Component Design Rules specification defines some CCSP generic error codes. As well, each functional component may define its own CCSP error codes. TR-069 PA has to maintain the mapping between CCSP error codes and TR-069 error codes. The goal is to make CCSP components agnostic to any protocol specific error codes and data models.
TR-069 data type and CCSP data type mapping
The internal CCSP data model is based on TR-181 and follows the data types as defined in TR-181. Therefore it is not necessary to map data types since the TR69 ACS also uses TR-181 for configuration and diagnostics. The optional data type mapping is only for simply mapping. In foreseeable future, TR-069 PA is not expected to implement any data type mapping due to the significant differences CCSP and cloud data types, value range, the way to interpret them. We list this item here for completeness of discussion.
Namespace mapping
It is required by the current architecture design that the TR-069 PA CCSP component needs to list all supported TR parameters. The mapping file contains the internal data model parameters supported by all CCSP components and their corresponding external cloud names. For TR-69, however this would be an easy mapping since the internal CCSP Data model is based on TR-181.
Also considering how complexity a CPE may be, TR-069 PA may have to know which sub-system a parameter is supposed to be retrieved from. Due to complexity of data type mapping, no data type/value mapping is needed.
To support use case of multiple sub-systems, each parameter listed includes an optional sub-system name to indicate that the owning Functional Component is on the specified sub-system. TR-069 PA therefore queries local CR to discover that owning FC.
Moreover, the mapping file also includes CCSP internal namespaces that are invisible to the cloud server through TR-069 PA. Usually those namespaces are extensions to TR data models, but this is not required, meaning even for TR data model namespaces, we can do exactly the same if it makes sense.
When PA receives a GetParameterNames request on “Device.” for example, PA through the mapping file and knows the possible sub-systems, and queries local CR to discover all relating FCs that own namespaces under “Device.”. Then PA makes a GetParameterNames normalized action call to each owning FC on local or remote sub-system. After the call returns, PA needs to check each returned namespace against the mapping file to filter out un-supported or invisible ones, and then merge results and sends to cloud server.
Per CCSP Architecture specification and CCSP Common Component Design Rules document, we will only define message bus APIs for the following normalized actions.
For other normalized actions, they will be covered with data model approach. In details, CCSP namespaces are defined for each action. These actions will be requested by PA via setting their values respectively to the namespaces defined. These namespaces are defined in each Functional Component Software Architecture Specification.
CCSP Common Component Design Rules document does not define a specific action and let a FC to do it, the mapping must be included into TR-069 PA namespace mapping file. For action such as Download, depending on our methodology, we may require only single FC to handle all download, or we allow multiple FCs to handle different type of downloads. For latter case, the namespace mapping file must include a mapping entity per download file type. With current CCSP architecture, single functional component will take care of download of all file types. Please refer Secure Software Download Software
The following data model related events must be handled by TR-069 PA.
DUStateChangeComplete*
AutonomousDUStateChangeComplete*
TransferComplete**
AutonomousTransferComplete**
ValueChanged
* must be supported if CPE supports normalized action ‘ChangeDUState’.
** must be supported if CPE supports Download or Upload.
Event ValueChanged needs to be examined carefully by TR-069 PA. FC signals ValueChanged event on message bus on a parameter that the notification counter is larger than zero. Also FC indicates which component causes the value change by specifying ‘writeID’ which was used in SetParameterValues and SetCommit actions.
In order for TR-069 PA to capture event ValueChanged, TR-069 PA must subscribe to the signal through Component Registrar. And once TR-069 PA receives such event, it needs to check if the value change is caused by itself by checking ‘writeID’ included in the signal against TR-069 PA’s own writeID. If they are same, this signal is simply ignored. Otherwise, PA needs to either notify ACS about a parameter value change in active or passive way as defined by TR-069 specification, or for some special namespaces, PA knows they are asynchronous event indication, could it be TransferComplete, DUStateChangeComplete, or diagnostics completion and so on.
Component Registration is the same for all common components. We will use whatever defined in CR software design specification to register TR-069 PA and subscribe signals this component wants to capture such as ParameterValueChangeSignal.
You may refer to Component Registrar SFS, SDS, and CCSP High Level Architecture Specification for function prototypes related to Message Bus APIs.
TR-069 PA follows transaction control mechanism defined by CCSP Architecture specification based on session ID.
In case normalized action call on external namespaces that do not have counterpart internal namespaces or say PA cannot get such mapping information from CR, TR-069 PA must be able to route calls to default namespace handler which could be Application Environment Manager through private interface per CCSP Component Registrar specification.
Figure 1 shows the overview of TR-069 Protocol Agent.
Figure 1 CCSP TR-069 PA System Overview
This component provides cloud interface to TR-069 ACS and get services from internal CCSP interface to communicate with functional components via normalized actions and internal namespaces.
As you can see from figure 1, when TR-069 PA receives a request from ACS, it resolves namespace with CR, and makes a normalized action invocation over message bus into target functional component. Once TR-069 PA receives response or error from functional component, it construct CWMP SOAP message back to ACS.
Figure 2 TR-069 PA SetParameterValues data flow
Figure 3 TR-069 PA GetParameterNames data flow
GetParameterNames(“Device.”). PA needs to find out all owning FCs on local and remote sub-systems, and make GetParameterNames normalized action calls. Once it gets results, PA needs to filter out un-supported and invisible namespaces (no matter partial or full names) and send back to ACS.
Implemented as part of notify_comp, implements a notification function to all the Protocol Agents who have registered for notification of changes in the RDK-B stack.
16 Comments
Unknown User (changeway)
Hi,
About HTTPS support, In current source code, the client side MUST install device private key and certificate files which are pair for ACS certificate, then it possible to have HTTPS connection with ACS.
HTTPS is not supported in case of NO device key and certificate files pre-installed, right?
Thanks.
Unknown User (srinivas.k)
Hi Patrick Chen,
The CA certificate file and device certificate/private key file can be configured in ccsp_tr069_pa_cfg.xml for https support.
Thanks and Regards
Srinivas
Unknown User (srinivas.k)
HI Patrick Chen,
On boot up, after device powers, it contacts the ACS server using a private key and certificate, after which ACS server assigns device a password that is used for future communication. So, yes, without that key, secure communication with ACS is not possible.
Thanks and Regards
Srinivas
Unknown User (changeway)
Thank you, srinivas kota ramaiah,
I'm trying to get a suitable key and cert files can be authorized by ACS.
I checked the xml config file,
"<CA>/nvram/cacert.pem</CA>" is already set, but no file put.
I have to set "<PrivateKey>/nvram/key.pem</PrivateKey>" also, and put both correct files, right ?
Any compile flag or source code modification need I to check to support HTTPS ?
Thanks.
Unknown User (srinivas.k)
HI Patrick Chen,
yes the above configuration looks to be proper.
For ACS, we are currently using /nvram/cacert.pem. I think we now keep shared key encrypted in CEDM (Credential Encrypt/Decrypt Module)utility, and on startup it is decrypted to /tmp folder.
https://code.rdkcentral.com/r/#/c/rdkb/components/opensource/ccsp/CcspTr069Pa/+/13568/
https://code.rdkcentral.com/r/#/c/rdkb/components/opensource/ccsp/CcspTr069Pa/+/12993/
https://code.rdkcentral.com/r/#/c/rdkb/components/opensource/ccsp/CcspTr069Pa/+/13261/
The current code should already be supporting https for ACS connection. Actually the secure connection is the only way to connect to ACS.
Thanks and Regards
Srinivas
Z-Arthur Huang
I follow the steps in TR-069 Support for RDKB RPI Reference Platform - RDK - RDK Central Wiki and put cert.pem under "/etc" to set up tr-069 on my device.
But it shows "CcspManagementServer_RegisterWanInterface failed to get pFirstUpstreamIpAddress" in TR69log.
Deepika Ganapathi Bhat
Hi Unknown User (arthur.cc.huang)
Could you please confirm the below dmcli are set properly in your device
dmcli eRT setv Device.ManagementServer.EnableCWMP bool false
dmcli eRT setv Device.ManagementServer.URL string "<URL/Ip of ACS Server"
dmcli eRT setv Device.DeviceInfo.X_RDKCENTRAL-COM_Syndication.TR69CertLocation string /etc/cacert.pem
dmcli eRT setv Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.AllowOpenPorts.Enable bool true
dmcli eRT setv Device.ManagementServer.EnableCWMP bool true
ufs
While amount of parameter set from ACS server to RDKB DUT, I got CcspTr069Pa crash then generates core.prog_CcspTr069PaSsp.signal files in rootfs, and the process will create again..
No more information can be found in rdklogs/logs/TR069log.txt, so it still cannot sure the issue happens on which source code
Any suggestions to debug it?
Thanks
Z-Arthur Huang
Hi Unknown User (ufs) ,
It is not related to your question.
Could you share how you make rdkb connect to acs server?
Deepika Ganapathi Bhat
Hi Unknown User (ufs)
Could you please provide us the below details
1. which parameters you are trying to set.
2. what was the crash reported in crash file
3. Can you share us the decoded file
Unknown User (asbarla)
Hi Unknown User (deepika.b)
e.g. Device.WiFi.Radio., Device.WiFi.Accesspoint., Device.WiFi.SSID.
2. /tmp/_core.prog_CcspTr069PaSsp.signal_11.pid
Briefly explain:
I found it cause on CcspCwmpProcessor map interface (CcspCwmppoMpaSetParameterValuesWithWriteID)
The value of parameter -ulArraySize is passed and decided by ACS server dynamically
The array of pointer to char* ParamName[MAX_NO_WIFI_PARAM] = {0}; only define size 10 ( #define MAX_NO_WIFI_PARAM 10 )
So, when setting parameter is larger than MAX_NO_WIFI_PARAM ( i.e ulArraySize > 10), the end of function doing memory free which is based on for loop i to ulArraySize will generate segment fault, and Tr069PaSsp crash.
i.e CcspTr069PaFreeMemory(ParamName[i]);
https://imgur.com/a/yjBr2AY
By examine to rdkb code base to 2022q1, I think it still exits this issue, please refer it.
Thanks
Tang Heming
Hello @Z-Subhendra Singh
for RPC method download file, I see TR069Pa set the parameters under the data model com.cisco.spvtg.ccsp.fu.Configuration. such as,
com.cisco.spvtg.ccsp.fu.Configuration.CommandKey
Do you know which application own the data model object com.cisco.spvtg.ccsp.fu.Configuration?
Thank you!
Charles Moreman
Protocol Agents are responsible for filtering as needed. Filtering is optional and may be used to restrict external access to some internal objects, parameters, events or methods.
This may be built as an "allow" list, that only allows access to specific listed internal objects, parameters, events or methods. Alternately this may be built as a "block" list that blocks access to specific listed internal objects, parameters, events or methods. Since filtering is optional the PA may alternatively allow access to all internal elements.
This should be added to the "Introduction" section.
Z-Kihyun Kim
Hello.
I try to find the Data Model file in xml format.
But, I can not find that file in RDK Central Wiki.
please, How can I find that TR069/TR181 Data Model xml file.
Thank you.
Wilson Liu
Unknown User (kihyun.kim)
The xml file should be in /usr/ccsp/tr069pa/ccsp_tr069_pa_mapper.xml
Wilson Liu
Dear all,
I tried to set ManagementServer.ConnectionRequestPassword. It is not allowed due to the failed of SaveConfigFile and system cannot find the file /nvram/.keys/MgmtCRPwdID
The process as follow
echo $the_value_of_pwd > /tmp/tempMSCRPwdFile;
mkdir -p /nvram/.keys;
SaveConfigFile /tmp/tempMSCRPwd File;
rm -rf /tmp/tempMSCRPwdFile
By examine to rdkb code base to 2022q1 and 2022q4, it still exits this issue, please refer it.
Thanks