You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 20 Current »

What is RFC?

RFC stands for RDK Feature Control.
It provides a mechanism to remotely enable, disable, or configure software features on RDK-based devices (CPEs).

RFC is primarily used by Release Management for controlled, staged rollouts of new features across production devices — ensuring stability and gradual deployment.

Source code

rdkcentral/rfc at main


How does RDK receive the RFC configuration?

The RFC configuration process involves multiple RDK components working together to fetch, process, and apply configuration updates.

The flow is summarized below:


1. Maintenance Manager

  • Periodically evaluates when to start the RFC task.

  • When conditions are met, it launches the RFC Manager to begin the configuration process.


2. RFC Manager → XConf

  • RFC Manager sends an HTTP request to the configured XConf URL, including key device identifiers:

    • STB MAC Address

    • Account ID

    • Partner ID

    • Firmware Version

      2026-09-01T14:50:24.096558 [INFO ] [read_RFCProperty][205] RFC name=Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Bootstrap.XconfUrl,type=0,value=https://xconf.rdkcentral.com,status=0
      2026-09-01T14:50:24.096601 [INFO ] XconfUrl: = https://xconf.rdkcentral.com, found after 1 attempts
      
      
      2026-09-01T15:03:28.161794 [INFO ] [DownloadRuntimeFeatutres][2026] Xconf Request : [https://xconf.rdkcentral.com/featureControl/getSettings?estbMacAddress=E4%3A5F%3A01%3A56%3AF4%3A82&firmwareVersion=lib32-rdk-fullstack-image-RPI4-20260824125316&env=dev&model=RPI4&manufacturer=RaspberryPi&controllerId=2504&channelMapId=2345&VodId=15660&partnerId=community&osClass=&accountId=Unknown&Experience=X1&version=2]
  • XConf uses these identifiers to locate the appropriate configuration and returns it as a JSON payload.

    251124-19:50:21.532196 [mod=RFCMGR, lvl=INFO] [tid=2157] [PreProcessJsonResponse][2018] Xconf Response: {"featureControl":{"features":[{"name":"TC-NTP","enable":true,"effectiveImmediate":true,"configData":{"tr181.Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.TR069support.Enable":"false","tr181.Device.Time.NTPServer1":"time.google.com","tr181.Device.Time.NTPServer2":"time1.google.com","tr181.Device.Time.NTPServer3":"time2.google.com","tr181.Device.Time.NTPServer4":"time3.google.com","tr181.Device.Time.NTPServer5":"time4.google.com"},"featureInstance":"TC-NTP"}]}}



3. Configuring the xconf server url


  • If "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Bootstrap.XconfUrl" is unavailable or empty, the code falls back to reading the RFC xconf URL from the properties file—by default, rfc.properties.
  • The parameter read is "RFC_CONFIG_SERVER_URL="
  • Hence for testing purposes, update the rfc.properties file with the server url.

4. RFC Manager Processing

  • Parses the JSON response to extract all configuration parameters.

  • Updates TR-181 parameters by invoking tr181 set commands for each relevant RFC value.
  • tr181 set uses RFC API which in turn calls the tr69hotif API to store these environment variables and TR-181 parameters.

  • After applying all parameters, the processor updates the stored hash and timestamp in the database. This allows future invocations to skip re-applying the same configuration.

5. tr181 Set and RFC API

  • The tr181 set commands internally call the RFC API to perform parameter get/set operations.

  • The RFC API communicates with the local HTTP server running within tr69hostif using HTTP GET or POSTrequests.


    /opt/secure/RFC/rfcVariable.iniRFC environment variablesContains environment-level variables derived from RFC config
    /opt/secure/RFC/tr181store.iniRFC namespace TR-181 parametersContains TR-181 parameters managed within the RFC namespace
    /opt/secure/RFC/bootstrap.iniBootstrap TR-181 parametersContains TR-181 parameters with the bsUpdate attribute
    Profile-specific storageNon-RFC TR-181 parametersManaged by respective profile handlers with their own storage mechanism




6. tr69hostif Request Routing

  • The tr69hostif component routes incoming parameter requests based on their namespace or attributes:

    bsUpdate attribute presentBootstrap handlersHandles bootstrap get/set requests
    RFC namespaceRFC handlersManages parameters controlled by RFC
    Other (non-RFC) parametersProfile handlers

    Routed to profile-specific get/set implementations


7. Runtime Sources and Priority

  • Runtime Sources Overview
SourceBacking StoreOwnerPurpose
Persisted TR181 RFC override/opt/secure/RFC/tr181store.iniRFC/XConf apply pathXConf-applied parameter persistence
Persisted bootstrap value/opt/secure/RFC/bootstrap.iniXBSStoreRFC or WebPA overrides
Device-specific bootstrap overlay/etc/partners_defaults_device.jsontr69hostif firmware defaultsDevice-specific defaults
Partner bootstrap defaults/etc/partners_defaults.json (partner section) - communitytr69hostif firmware defaultsPartner-specific firmware defaults
Generic steady-state bootstrap defaults/etc/partners_defaults.json (default section)tr69hostif firmware defaultsGeneric firmware defaults
Early-boot bootstrap defaults/etc/partners_defaults.json (default_boot section)tr69hostif firmware defaultsEarly-boot temporary profile
XML default valueMerged TR181 data modelwaldb / tr69hostif validation pathData model XML defaults
RFC fallback defaults/etc/rfcdefaults/*.ini and /tmp/rfcdefaults.iniRFC repo fallback pathRFC library fallback layer
  •  RFC Library Runtime Priority
PrioritySourceFile LocationUsed ByCondition
1Persisted XConf-applied value/opt/secure/RFC/tr181store.inilibtr181api::getParam()If key missing in live hostif
2Persisted bootstrap value/opt/secure/RFC/bootstrap.iniRFC libraryIf key missing in tr181store.ini
3RFC fallback default/tmp/rfcdefaults.ini (merged from /etc/rfcdefaults/*.ini)RFC libraryFinal fallback for TR181-style keys
N/ALegacy RFC variables/opt/secure/RFC/rfcVariable.iniRFC libraryFor legacy RFC_xxxx keys (non-dotted)

  • Bootstrap Runtime Priority (XBSStore via tr69hostif)
PrioritySourceSelection LogicFile Location
1Persisted RFC/WebPA overrideDirect lookup/opt/secure/RFC/bootstrap.ini
2aPartner section bootstrap defaultIf PartnerId known AND match found/etc/partners_defaults.json (partner section)
2bGeneric defaultIf PartnerId known BUT no match/etc/partners_defaults.json (default section)
2cEarly-boot defaultIf PartnerId NOT yet available/etc/partners_defaults.json (default_boot section)
3Device-specific overlayApplied over 2a/2b/2c/etc/partners_defaults_device.json
  • Combined Conceptual Priority (All Paths Union)
PrioritySourceScopeNotes
1Live hostif valueActive hostif GET pathHighest precedence if returned
2Persisted runtime overrideRFC/WebPA apply pathsXConf-applied values
3Persisted bootstrap valueBootstrap-backed keysRFC or WebPA overrides
4Effective bootstrap firmware defaultAll bootstrap-backed lookupsFrom partners_defaults_device.json overlay + selected section
5XML default valueLive hostif fallback pathsOnly when handler fails; uses dmParam.defaultValue
6/etc/rfcdefaults merged fallbackRFC-library fallback pathsFinal fallback; lowest precedence

8. mTLS support

  • RDKE expects xconf connections to be secure. This expects RFC to use MTLS by default.
  • Support to add MTLS to RDKM xconf server is under investigation.
  • Until then, we are disabling MTLS support by not enabling rdkcertselector
    • mTLS is enabled in the RFC code when the macro LIBRDKCERTSELECTOR is defined.

Architecture Diagram:

rfc


  • Example curl command sent from an RDK device to XConf:
  • Example response json received from XConf. This is stored in /tmp/rfc-parsed.txt as part of the curl request's response.

{
  "featureControl": {
    "features": [
      {
        "name": "TC-NTP",
        "enable": true,
        "effectiveImmediate": true,
        "configData": {
          "tr181.Device.Time.NTPServer1": "time.google.com",
          "tr181.Device.Time.NTPServer2": "time1.google.com",
          "tr181.Device.Time.NTPServer3": "time2.google.com",
          "tr181.Device.Time.NTPServer4": "time3.google.com",

          "tr181.Device.Time.NTPServer5": "time4.google.com"
        },
        "featureInstance": "TC-NTP"
      }
    ]
  }
}

 

  • The tr181store.ini contains all the RFC namespace configuration that is configured at XConf. It also contains all the local RFC settings that are done using the "tr181 -s" command. bootstrap.ini contains all the bootstrap namespace configurations from XConf.

root@raspberrypi4-64-rdke:~# cat /opt/secure/RFC/tr181.list
TR181: Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.TR069support.Enable false
TR181: Device.Time.NTPServer1 time.google.com
TR181: Device.Time.NTPServer2 time1.google.com
TR181: Device.Time.NTPServer3 time2.google.com
TR181: Device.Time.NTPServer4 time3.google.com
TR181: Device.Time.NTPServer5 time4.google.com
root@raspberrypi4-64-rdke:~#
root@raspberrypi4-64-rdke:~#
root@raspberrypi4-64-rdke:~# cat /opt/secure/RFC/rfcFeature.list
TC-NTP=true,
root@raspberrypi4-64-rdke:~#
root@raspberrypi4-64-rdke:~# cat /opt/secure/RFC/rfcVariable.ini
export RFC_ENABLE_TC-NTP=true
export RFC_TC-NTP_effectiveImmediate=true
root@raspberrypi4-64-rdke:~#
root@raspberrypi4-64-rdke:~# cat /opt/secure/RFC/tr181store.ini
Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Control.XconfUrl=https://xconf.rdkcentral.com/featureControl/getSettings
Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Control.ConfigSetHash=18HWRXtCXc9e7oSb8M3AQ6sdA587hfs1V5
Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Control.XconfSelector=prod
Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.TR069support.Enable=false
Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.AccountInfo.AccountID=1234
Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Control.ConfigSetTime=1764012977
Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Control.ConfigChangeTime=1764012977
root@raspberrypi4-64-rdke:~#
root@raspberrypi4-64-rdke:~#
root@raspberrypi4-64-rdke:~# cat /opt/secure/RFC/bootstrap.ini | grep NTP
Device.Time.NTPServer2=time1.google.com
Device.Time.NTPServer1=time.google.com
Device.Time.NTPServer5=time4.google.com
Device.Time.NTPServer4=time3.google.com
Device.Time.NTPServer3=time2.google.com
root@raspberrypi4-64-rdke:~#
root@raspberrypi4-64-rdke:~#


  • To force retrieving a new RFC configuration from XConf even when there is no change, invalidate the hash value with the below command.

tr181 -s -v invalidate Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Control.ConfigSetHash

Child pages

No pages found.



  • No labels