RDK-Bcomponentsare designed to avoid platform or silicon dependencies. Hardware Abstraction Layer (HAL) defines a standard interface for hardware vendors to implement. The HAL layer abstracts the underlying hardware like MOCA, Wi-Fi, etc. through a standard set of APIs defined as part of RDK-B HAL for the respective components. This HAL layer is implemented per platform and the rest of the components can be compiled to run on the new platform without major modifications.
The HAL in RDK-B Architecture section gives an overview of CCSP framework's Hardware Abstraction Layer.
HAL can be common-HAL or component-specific-HAL. Components may define a component specific HAL to hardware drivers, that are only used by that component.
PandM HAL Integration (back-end) Layer is also known as component specific HAL.
This layer makes calls to underlying Linux system calls/commands, third party modules, open source modules, and other CCSP components to execute the requests.
This layer will be more component specific and will provide APIs to CCSP so as to manage a particular hardware module of the system.
Following are some of the component specific HALs available in "../rdkb/components/opensource/ccsp/hal/source/" path.
Wifi
MoCA
MTA Agent
CM
Ethernet Switch
DHCPv4C
Virtual LAN
DPoE
Bluetooth
MSO_Management
Voice
WAN
TR69_TLV
Wi-Fi HAL
All HAL function prototypes and structure definitions are available in wifi_hal.h file.
Wi-Fi HAL is used for the RDK-Broadband Wifi radio hardware abstraction layer.
Latest version of RDKB supports 300+ Wi-Fi HAL APIs.
Based on how Wi-Fi vendors expose their driver capabilities in user space, the HAL API’s can be implemented in wifi_hal.c
Some of the APIs are:
wifi_getRadioChannelStats
wifi_getRadioChannelStats2
wifi_getApAssociatedDeviceRxStatsResult
wifi_getApAssociatedDeviceTxStatsResult
wifi_getApAssociatedDeviceTidStatsResult
wifi_getApAssociatedDeviceStats
wifi_getHalVersion
wifi_factoryReset
wifi_factoryResetRadios
wifi_factoryResetRadio
wifi_setLED
wifi_init
wifi_reset
wifi_down
wifi_createInitialConfigFiles
wifi_getRadioCountryCode
wifi_setRadioCountryCode
wifi_pushCountryCode
wifi_getATMCapable
wifi_setATMEnable
To see the API specification of WI-fI HAL, please refer - Wi-Fi HAL APIs
MOCA HAL
All HAL function prototypes and structure definitions are available in moca_hal.h file.
MoCA HAL is used for the RDK-Broadband MoCA hardware abstraction layer.
An abstraction layer, mainly for interacting with MoCA driver.
The APIs are:
moca_GetIfConfig
moca_SetIfConfig
moca_IfGetDynamicInfo
moca_IfGetStaticInfo
moca_IfGetStats
moca_GetNumAssociatedDevices
moca_IfGetExtCounter
moca_IfGetExtAggrCounter
moca_GetMocaCPEs
moca_GetAssociatedDevices
moca_FreqMaskToValue
moca_HardwareEquipped
moca_GetFullMeshRates
moca_GetFlowStatistics
moca_GetResetCount
moca_setIfAcaConfig
moca_getIfAcaConfig
moca_cancelIfAca
moca_getIfAcaStatus
moca_getIfScmod
To see the API specification of MoCA HAL, please refer - MoCA HAL APIs
MTA HAL
All HAL function prototypes and structure definitions are available in mta_hal.h file. An MTA can deliver home phone service in addition to high-speed Internet.
MTA HAL used for the RDK-Broadband hardware abstraction layer for cable modem.
An abstraction layer, implemented to interact with MTA device.
mta_hal.c file provides the function call prototypes and structure definitions used for the MTA hardware abstraction layer.
Some of the APIs are:
mta_hal_InitDB
mta_hal_GetDHCPInfo
mta_hal_LineTableGetNumberOfEntries
mta_hal_LineTableGetEntry
mta_hal_TriggerDiagnostics
mta_hal_GetServiceFlow
mta_hal_DectGetEnable
mta_hal_DectSetEnable.
mta_hal_DectGetRegistrationMode
mta_hal_DectSetRegistrationMode
mta_hal_DectDeregisterDectHandset
mta_hal_GetCalls
mta_hal_GetDect
mta_hal_GetDectPIN
mta_hal_SetDectPIN
mta_hal_GetHandsets
mta_hal_GetCALLP
mta_hal_GetDSXLogs
mta_hal_GetDSXLogEnable
mta_hal_SetDSXLogEnable
To see the API specification of MTA HAL, please refer - MTA HAL APIs
CM HAL
All HAL function prototypes and structure definitions are available in cm_hal.h file.
CM HAL is used for the RDK-Broadband hardware abstraction layer for cable modem.
It provides an interface that cable modem software developers can use to interface with RDK-B.
Some of the APIs are:
cm_hal_InitDB
docsis_InitDS
docsis_InitUS
docsis_getCMStatus
docsis_GetDSChannel
docsis_GetUsStatus
docsis_GetUSChannel
docsis_GetDOCSISInfo
docsis_GetNumOfActiveTxChannels
docsis_GetNumOfActiveRxChannels
docsis_GetErrorCodewords
docsis_SetMddIpModeOverride
docsis_GetMddIpModeOverride
docsis_GetUSChannelId
docsis_SetUSChannelId
docsis_GetDownFreq
docsis_SetStartFreq
docsis_GetDocsisEventLogItems
cm_hal_GetDHCPInfo
cm_hal_GetCPEList
To see the API specification of CM HAL, please refer - CM HAL APIs
Ethernet Switch HAL
All HAL function prototypes and structure definitions are available in ccsp_hal_ethsw.h file.
It provides implementation for Ethernet Switch Control.
Based on how vendor exposes their driver capabilities in user space, the HAL APIs can be implemented in hal-ethsw-generic/git/source/ethsw/ccsp_hal_ethsw.c.
All HAL function prototypes and structure definitions are available in voice_hal.h file.
Voice HAL is used for the RDK-Broadband hardware abstraction layer for VoIP.
Some of the APIs are :
voice_hal_Init
voice_hal_InitDB
voice_hal_Deinit
voice_hal_DeinitDB
voice_hal_setVoiceProcessState
voice_hal_getVoiceProcessState
voice_hal_getVoiceProcessStatus
voice_hal_getConfigSoftwareVersion
voice_hal_getCountProfiles
voice_hal_getServiceVersion
voice_hal_getCountServices
voice_hal_getCountLines
voice_hal_getCountPhyInterfaces
voice_hal_setIpAddressFamily
voice_hal_getBoundIfName
voice_hal_setBoundIfName
voice_hal_setIpAddressFamily
voice_hal_getIpAddressFamily
voice_hal_setLinkState
voice_hal_setIpWanAddress
To see the API specification of Voice HAL, please refer - Voice HAL APIs
WAN HAL
All HAL function prototypes and structure definitions are available in wan_hal.h file.
The APIs are:
wan_hal_Init
wan_hal_SetSelfHealConfig
wan_hal_SetWanConnectionEnable
wan_hal_SetSelfHealConfig
wan_hal_GetWanOEUpstreamCurrRate
wan_hal_GetWanOEDownstreamCurrRate
wan_hal_SetQoSConfiguration
wan_hal_RestartWanService
To see the API specification of WAN HAL, please refer - WAN HAL APIs
TR69_TLV HAL
All HAL function prototypes and structure definitions are available in Tr69_Tlv.h file.
Telemetry key fields and data fields are stored in the database as TLV (Tag, Length, Value).
Tag- uniquely identify the field.
Length- gives the size (in number of bytes) of the data associated with the field.
Value- contains the actual data associated with the field stored in network byte ordering.
Common HAL
A common HAL provides the necessary abstraction to all the CCSP components to interface with other common hardware components.
Eg: Platform HAL.
Platform HAL
Platform HAL is an abstraction layer implemented to interact with cable modem devices to get hardware specific details such as firmware name, boot loader version, etc.
This HAL layer is intended to support platform drivers.
platform_hal.c file provides the function call prototypes and structure definitions used for the platform hardware abstraction layer.
Some of the APIs are:
platform_hal_GetDeviceConfigStatus
platform_hal_GetTelnetEnable
platform_hal_GetSSHEnable
platform_hal_SetSSHEnable
platform_hal_GetSNMPEnable
platform_hal_SetSNMPEnable
platform_hal_GetSerialNumber
platform_hal_GetWebUITimeout
platform_hal_SetWebUITimeout
platform_hal_GetWebAccessLevel
platform_hal_SetWebAccessLevel
platform_hal_PandMDBInit
platform_hal_DocsisParamsDBInit
platform_hal_GetModelName
platform_hal_GetFirmwareName
platform_hal_GetHardwareVersion
platform_hal_GetSoftwareVersion
platform_hal_GetBootloaderVersion
platform_hal_GetBaseMacAddress
platform_hal_GetHardware
To see the API specification of Platform HAL, please refer - Platform HAL APIs