...
| draw.io Diagram | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
This service provides the download location (URL) required for RDK download Manager for dynamic Apps/packages/certs/tools installation. This module is responsible to trigger RDM Application. The module will do the security evaluation of the downloaded packages and verify the signature to ensure the installation of packages.
The App or binary name as part of rootfs is "rdkvfwupgrader". This module having below components
...
Function Name | Parameter | Description | |||
|---|---|---|---|---|---|
MakeXconfComms | pResponse | Pointer to structure to receive output data Xconf Http status | |||
createJsonString | Char * pPostFieldOut, Size_t szPostFieldOut | The json string is looks like tbd | upgradeRequest | int upgrade_type,int server_type,constchar* artifactLocationUrl,constvoid* dwlloc,char*pPostFields,int*pHttp_codeUse For requesting upgrade pci, pdri and xconf. Param-1: Upgrade type pci, pdri, xconf Param-2: Type of server. HTTP_XCONF_DIRECT, HTTP_XCONF_CODEBIG, HTTP_SSR_DIRECT, HTTP_SSR_CODEBIG Param-3: Download server url Param-4: To store download data Param-5: http code | getXconfRespData | XCONFRES *pResponse,char*pJsonStr
The response from Xconf is processed as part of the jsonparser Component. This is a typical response from the Xconf.
{
"firmwareDownloadProtocol":"http",
"firmwareFilename":"tbd",
"firmwareLocation":"tbd",
"firmwareVersion":"tbd",
"rebootImmediately":false
}
The key parameters of this json response are populated as part of this datastructure.
| Code Block | ||||
|---|---|---|---|---|
| ||||
typedef struct xconf_response {
char cloudFWFile[64];
char cloudFWLocation[CLD_URL_MAX_LEN];
char ipv6cloudFWLocation[CLD_URL_MAX_LEN];
char cloudFWVersion[64];
char cloudDelayDownload[8];
char cloudProto[6];
char cloudImmediateRebootFlag[12];
char peripheralFirmwares[256];
char dlCertBundle[64];
char cloudPDRIVersion[64];
char rdmCatalogueVersion[512];
} XCONFRES; |
This component provided rfc api to use for getting rfc value and setting rfc value.
This component is responsible for reading the rfc value and writing the rfc value. Below are the rfc used in this module.
| RFC name | Description | Default Value |
|---|---|---|
| Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.SWDLSpLimit.Enable | Use for throttle feature | FALSE |
Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.SWDLSpLimit.TopSpeed | Use for set throttle speed | 1MB => 1 *1024 * 1024 |
Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.IncrementalCDL.Enable | Use For Incremental Download | TRUE |
Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.SWDLDirect.Enable | Use For Direct CDN Download | FALSE |
This a share library and provide all the download api using curl interface.
This is a share library and provide all the json parser api using cjson.
This is a share library and provide all the device specific information by reading device configure file or using some api.
RDK Firmware Upgrader Capability
Low Level Design Flow From Start To End
| ||
upgradeRequest | int upgrade_type,int server_type,constchar* artifactLocationUrl,constvoid* dwlloc,char*pPostFields,int*pHttp_code | Use For requesting upgrade pci, pdri and xconf. Param-1: Upgrade type pci, pdri, xconf Param-2: Type of server. HTTP_XCONF_DIRECT, HTTP_XCONF_CODEBIG, HTTP_SSR_DIRECT, HTTP_SSR_CODEBIG Param-3: Download server url Param-4: To store download data Param-5: http code |
getXconfRespData | XCONFRES *pResponse,char*pJsonStr | The response looks like below {"firmwareDownloadProtocol":"http","firmwareFilename":"lib32-application-test-image-RPI4-raspberrypi4-64-rdke-feature-RDKECOREMW-863-OTA.wic.tar.gz","firmwareLocation":"https://tools.rdkcentral.com:8443/images/","firmwareVersion":"lib32-application-test-image-RPI4-raspberrypi4-64-rdke-feature-RDKECOREMW-863-OTA.wic.tar.gz","mandatoryUpdate":false,"rebootImmediately":false} |
The response from Xconf is processed as part of the jsonparser Component. This is a typical response from the Xconf.
| Code Block |
|---|
{
"firmwareDownloadProtocol":"http",
"firmwareFilename":"lib32-application-test-image-RPI4-raspberrypi4-64-rdke-feature-RDKECOREMW-863-OTA.wic.tar.gz",
"firmwareLocation":"https://tools.rdkcentral.com:8443/images/",
"firmwareVersion":"lib32-application-test-image-RPI4-raspberrypi4-64-rdke-feature-RDKECOREMW-863-OTA.wic.tar.gz",
"mandatoryUpdate":false,
"rebootImmediately":false
} |
The key parameters of this json response are populated as part of this datastructure.
| Code Block | ||||
|---|---|---|---|---|
| ||||
typedef struct xconf_response {
char cloudFWFile[64];
char cloudFWLocation[CLD_URL_MAX_LEN];
char ipv6cloudFWLocation[CLD_URL_MAX_LEN];
char cloudFWVersion[64];
char cloudDelayDownload[8];
char cloudProto[6];
char cloudImmediateRebootFlag[12];
char peripheralFirmwares[256];
char dlCertBundle[64];
char cloudPDRIVersion[64];
char rdmCatalogueVersion[512];
} XCONFRES; |
This component provided rfc api to use for getting rfc value and setting rfc value.
This component is responsible for reading the rfc value and writing the rfc value. Below are the rfc used in this module.
| RFC name | Description | Default Value |
|---|---|---|
| Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.SWDLSpLimit.Enable | Use for throttle feature | FALSE |
Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.SWDLSpLimit.TopSpeed | Use for set throttle speed | 1MB => 1 *1024 * 1024 |
Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.IncrementalCDL.Enable | Use For Incremental Download | TRUE |
Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.SWDLDirect.Enable | Use For Direct CDN Download | FALSE |
This a share library and provide all the download api using curl interface.
This is a share library and provide all the json parser api using cjson.
This is a share library and provide all the device specific information by reading device configure file or using some api.
RDK Firmware Upgrader Capability
Low Level Design Flow From Start To End
eStbMac=D8:3A:DD:0A:43:71&firmwareVersion=lib32-middleware-test-image-RPI4-20251118074027&env=dev&model=RPI4&manufacturer=RaspberryPi&partnerId=community&activationInProgress=false&osClass=Not Available&accountId=1234&serial=10000000e33bf0d4&localtime=Wed Nov 26 13:44:09 UTC 2025&dlCertBundle=&rdmCatalogueVersion=&timezone=Asia/Calcutta&capabilities=rebootDecoupled&capabilities=RCDL&capabilities=supportsFullHttpUrl |
|---|
{
"firmwareDownloadProtocol":"http",
"firmwareFilename":"lib32-application-test-image-RPI4-raspberrypi4-64-rdke-feature-RDKECOREMW-863-OTA.wic.tar.gz",
"firmwareLocation":"https://tools.rdkcentral.com:8443/images/",
"firmwareVersion":"lib32-application-test-image-RPI4-raspberrypi4-64-rdke-feature-RDKECOREMW-863-OTA.wic.tar.gz",
"mandatoryUpdate":false,
"rebootImmediately":false
} |
|---|
Below Sequence diagram is for device where maintenance manager is running
| draw.io Diagram | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
| PlantUML Macro |
|---|
@startuml title Reference legend |<back:Green> | Libraries | |<back:Yellow> | Cloud Endpoints | |<back:Grey> | Daemon | end legend @enduml |
...
| PlantUML Macro | ||
|---|---|---|
| ||
@startuml
participant mm
participant rdkvfwupdater
participant iarmlib #Green
participant rfclib #Green
participant jsonlib #Green
participant upgradelib #Green
participant utilslib #Green
participant downloadlib #Green
participant xconfserver #Yellow
participant parsinglib #Green
participant ssrserver #Yellow
participant flashapp
mm -> rdkvfwupdater : trigger
rdkvfwupdater -> rdkvfwupdater : initial validation
alt validation success
rdkvfwupdater -> utilslib : get device details
utilslib --> rdkvfwupdater : device details
rdkvfwupdater -> rfclib : get rfc data
rfclib --> rdkvfwupdater : rfc data
rdkvfwupdater -> jsonlib : create json request
jsonlib -> parsinglib : generic JSON parse/construct
parsinglib --> jsonlib : result
jsonlib --> rdkvfwupdater : json payload
rdkvfwupdater -> upgradelib : request xconf connection
upgradelib -> downloadlib : connect to xconf server
downloadlib -> xconfserver : request
alt xconf response success
xconfserver --> downloadlib : success response
downloadlib --> upgradelib : success response
upgradelib --> rdkvfwupdater : success response
rdkvfwupdater -> jsonlib : parse json data
jsonlib -> parsinglib : generic JSON parse/construct
parsinglib --> jsonlib : result
alt parsing success
jsonlib --> rdkvfwupdater : success response
rdkvfwupdater -> rdkvfwupdater : process json data
alt new image different
rdkvfwupdater -> upgradelib : download image
upgradelib -> downloadlib : download image
downloadlib -> ssrserver : request
ssrserver --> downloadlib : server status
alt server status 0
downloadlib --> upgradelib : success response
upgradelib --> rdkvfwupdater : success response
rdkvfwupdater -> flashapp : flash image
flashapp --> rdkvfwupdater : flash status
rdkvfwupdater -> iarmlib : success status
iarmlib --> mm : success status
else server status 18 or 28
downloadlib --> upgradelib : chunkdownload
upgradelib --> rdkvfwupdater : chunkdownload
rdkvfwupdater -> flashapp : flash image
flashapp --> rdkvfwupdater : flash status
rdkvfwupdater -> iarmlib : success status
iarmlib --> mm : success status
else server status 58
rdkvfwupdater -> rdkvfwupdater : recovery download
else other server status
downloadlib --> upgradelib : retry download
upgradelib --> rdkvfwupdater : retry download
rdkvfwupdater -> iarmlib : fail status
iarmlib --> mm : fail status
end
else same image
rdkvfwupdater -> iarmlib : success status
iarmlib --> mm : success status
end
else parsing fail
rdkvfwupdater -> iarmlib : fail status
iarmlib --> mm : fail status
end
else xconf response fail
xconfserver --> downloadlib : fail response
downloadlib --> upgradelib : fail response
upgradelib --> rdkvfwupdater : fail response
rdkvfwupdater -> iarmlib : fail status
iarmlib --> mm : fail status
end
else validation fail
rdkvfwupdater -> iarmlib : error status
iarmlib --> mm : error status
end
@enduml |
NEW DEVICE SYSTEM :NEW DEVICE SYSTEM:Children Display