RDK-B
FWUPGRADE HAL APIs

Description

Functions

int fwupgrade_hal_set_download_url (char *pUrl, char *pfilename)
 
int fwupgrade_hal_get_download_url (char *pUrl, char *pfilename)
 
int fwupgrade_hal_set_download_interface (unsigned int interface)
 
int fwupgrade_hal_get_download_interface (unsigned int *pinterface)
 
int fwupgrade_hal_download ()
 
int fwupgrade_hal_get_download_status ()
 
int fwupgrade_hal_reboot_ready (unsigned long *pValue)
 
int fwupgrade_hal_download_reboot_now ()
 
int fwupgrade_hal_update_and_factoryreset ()
 
int fwupgrade_hal_download_install (const char *url)
 

Function Documentation

◆ fwupgrade_hal_set_download_url()

int fwupgrade_hal_set_download_url ( char *  pUrl,
char *  pfilename 
)

@description Set FW Download Settings

Parameters
char*pUrl
char*pfilename
Returns
the status of the operation
Return values
RETURN_OKif successful.
RETURN_ERRif any Downloading is in process or Url string is invalided.

◆ fwupgrade_hal_get_download_url()

int fwupgrade_hal_get_download_url ( char *  pUrl,
char *  pfilename 
)

@description Get FW Download Url

Parameters
char*pUrl
char*pfilename
Returns
the status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif FW url string is empty.

◆ fwupgrade_hal_set_download_interface()

int fwupgrade_hal_set_download_interface ( unsigned int  interface)

@description Set the FW Download Interface

Parameters
unsignedint interface - interface=0 for wan0, interface=1 for erouter0
Returns
the status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected

◆ fwupgrade_hal_get_download_interface()

int fwupgrade_hal_get_download_interface ( unsigned int *  pinterface)

@description Get the FW Download Interface

Parameters
unsignedint* pinterface - interface=0 for wan0, interface=1 for erouter0
Returns
the status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected

◆ fwupgrade_hal_download()

int fwupgrade_hal_download ( )

@description Start FW Download

Parameters
<None>
Returns
the status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any Downloading is in process.
Execution:\n Synchronous.
Side Effects:\n None.
Note
This function must not suspend and must not invoke any blocking system calls. It should probably just send a message to a driver event handler task.

◆ fwupgrade_hal_get_download_status()

int fwupgrade_hal_get_download_status ( )

@description Get the FW Download Status

Parameters
<None>
Returns
the status of the FW Download.
Return values
0- Download is not started.
0-100- Values of percent of download.
200- Download is completed and waiting for reboot.
400- Invalided Http server Url
401- Cannot connect to Http server
402- File is not found on Http server
403- HW_Type_DL_Protection Failure
404- HW Mask DL Protection Failure
405- DL Rev Protection Failure
406- DL Header Protection Failure
407- DL CVC Failure
500- General Download Failure

◆ fwupgrade_hal_reboot_ready()

int fwupgrade_hal_reboot_ready ( unsigned long *  pValue)

@description Get the Reboot Ready Status

Parameters
ULONG*pValue- Values of 1 for Ready, 2 for Not Ready
Returns
the status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected

◆ fwupgrade_hal_download_reboot_now()

int fwupgrade_hal_download_reboot_now ( )

@description FW Download Reboot Now

Parameters
<None>
Returns
the status of the reboot operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any reboot is in process.

◆ fwupgrade_hal_update_and_factoryreset()

int fwupgrade_hal_update_and_factoryreset ( )

@description: Firmware update and factory reset the device

Parameters
None
Returns
the status of the Firmware update and factory reset operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any reboot is in process.

◆ fwupgrade_hal_download_install()

int fwupgrade_hal_download_install ( const char *  url)

@description: Downloads and upgrades the firmware

Parameters
None
Returns
the status of the Firmware download and upgrade status
Return values
RETURN_OKif successful.
RETURN_ERRin case of remote server not reachable