RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
This page describes the bring-up of RdkWanManager on Raspberry-pi platform using rdk-next branch. Also, we captured list of the issues that are faced during bring up and resolution for the same.
The following components are newly introduced for Porting of RdkWanManager in RPI Target Platform ,
The following are the dependent components & meta-layers which are modified,
Please refer the below link for host environment set-up & flashing procedure for yocto build ,
Dunfell :
RPI 3B/3B+ Model Reference Platform
Morty:
To build, follow below instructions
$ mkdir <workspace dir> $ cd <workspace dir> $ repo init -u https://code.rdkcentral.com/r/manifests -b dunfell -m rdkb-extsrc.xml $ repo sync -j`nproc` --no-clone-bundle
$ mkdir <workspace dir> $ cd <workspace dir> $ repo init -u https://code.rdkcentral.com/r/manifests -b rdk-next -m rdkb-extsrc.xml $ repo sync -j`nproc` --no-clone-bundle
$ MACHINE=raspberrypi-rdk-broadband source meta-cmf-raspberrypi/setup-environment $ bitbake rdk-generic-broadband-image
Following diagram depicts the flow of control among the components,
<project name="rdkb/components/opensource/ccsp/RdkWanManager" revision="rdk-next"/> <project name="rdkb/components/generic/json-rpc" revision="rdk-next"/>
We enabled WanManager CFLAGS in below file in rpi(meta-cmf-raspberrypi) layer,
CFLAGS_append += "${@bb.utils.contains('DISTRO_FEATURES', 'rdkb_wan_manager', ' -DFEATURE_RDKB_WAN_MANAGER ', '', d)}"
We are using the following distro features to enable rdkb wanmanager in RPI machine configuration file,
DISTRO_FEATURES_append = " rdkb_wan_manager"
Also , we need to disable the GwProvapp-EthWan component in ccsp packagegroup .
GWPROVAPP = ""
To enable the RDKB Wanmanager components, added those components into the final build target. So, We have added those components into the ccsp packagegroup(58865),
RDEPENDS_packagegroup-rdk-ccsp-broadband_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'rdkb_wan_manager', ' rdk-wanmanager json-hal-lib hal-json-ethsw', '', d)} "
CFLAGS_append += "${@bb.utils.contains('DISTRO_FEATURES', 'rdkb_wan_manager', ' -D_WAN_MANAGER_ENABLED_', '', d)}"
For wanmanager, the default configurations are stored in PSM. As of now, we have 1 interfaces defined for WAN in wanmanager modules (i,e) wanoe.
For WANOE, by default we are using `eth0 `port for WAN connection.
|
<!-- rdk-wanmanager records --> <Record name="dmsb.wanmanager.wanenable" type="astr">1</Record>
|
---|
S.No | Recipe / Component Names | Layer | Error/Warning/challenges | Root Cause | Action |
---|---|---|---|---|---|
1 | ccsp-cr.bbappend | CcspEthAgent will start once it gets the signal status from CR but CR is taking long time to send the Signal status . | CR is waiting to get the MTA System_Ready Signal but MTA is not supported for RPI. | ||
2 | ccsp-psm.bbappend | meta-cmf-raspberrypi | WanManager DM parameters are not getting the default values from PSM DB | Need to add wanmanager default DM values in PSM database | https://code.rdkcentral.com/r/c/rdk/components/generic/rdk-oe/meta-cmf-raspberrypi/+/58559/1/recipes-ccsp/ccsp/ccsp-psm.bbappend |
3 | utopia.bbappend | meta-cmf-raspberrypi | Below gaps needs to be filled in rpi,
|
| https://code.rdkcentral.com/r/c/rdk/components/generic/rdk-oe/meta-cmf-raspberrypi/+/58554/1/recipes-ccsp/util/utopia.bbappend |
4 | system_defaults (utopia recipe) | meta-cmf-raspberrypi | Added WanManager default values to syscfg.db | These default values are used by PAM | https://code.rdkcentral.com/r/c/rdk/components/generic/rdk-oe/meta-cmf-raspberrypi/+/58567/1/recipes-ccsp/util/utopia/system_defaults |
5 | ccsp-p-and-m.bbappend | meta-cmf-raspberrypi | 210629-12:11:47.500509 [mod=PAM, lvl=WARN] [tid=8164] Found an unresolved api: Client_GetEntryCount | PandM DM was not loading after the WanManager Integration Device.DHCPv6.Client.{i} and Device.DHCPv4.Client.{i}. was | https://code.rdkcentral.com/r/c/rdk/components/generic/rdk-oe/meta-cmf-raspberrypi/+/58681/2/recipes-ccsp/ccsp/ccsp-p-and-m.bbappend |
6 | RdkWanManager | RdkWanManager fails to build with the folloiwing errors: | ../../../git/source/WanManager/wanmgr_interface_sm.c:720:62: error: macro LOG_CONSOLE passed 3 arguments, but takes just 0 | 720 | LOG_CONSOLE(%s Wan_init_complete:%d\n,buffer,uptime); | | ^ | In file included from ../../../git/source/WanManager/wanmgr_interface_sm.c:31: | ../../../git/source/WanManager/wanmgr_platform_events.h:48: note: macro LOG_CONSOLE defined here | 48 | #define LOG_CONSOLE() | | | ../../../git/source/WanManager/wanmgr_interface_sm.c:720:9: error: LOG_CONSOLE undeclared (first use in this function) | 720 | LOG_CONSOLE(%s Wan_init_complete:%d\n,buffer,uptime); | | | LOG_CONSOLE () api is not defined | https://code.rdkcentral.com/r/c/rdkb/components/opensource/ccsp/RdkWanManager/+/58500 | |
7 | ccsp-common-library.bbappend | meta-cmf-raspberrypi | ccsp-gwprov-app starts initialization scripts utopia_init.sh | Added utopia.service to call utopia_init.sh utopia_init.sh needs to be started before starting of the RdkWanManager executable | https://code.rdkcentral.com/r/c/rdk/components/generic/rdk-oe/meta-cmf-raspberrypi/+/58899 |
8 | hal | hal | Device.X_RDK_WanManager.CPEInterface.1.Wan.LinkStatus is getting Incorrect value . |
| |
9 | hal | hal | ../../../../../../../../../../rdkb/components/opensource/ccsp/CcspEthAgent/source/TR-181/board_sbapi/cosa_ethernet_apis.c:651: error: undefined reference to 'GWP_GetEthWanLinkStatus' collect2: error: ld returned 1 exit status Makefile:423: recipe for target 'CcspEthAgent' failed | GWP_GetEthWanLinkStatus() is not defined in eth hal. Earlier, it was defined in GWP-EthWan | https://code.rdkcentral.com/r/c/rdkb/devices/raspberrypi/hal/+/58785/1/source/hal-ethsw/ccsp_hal_ethsw.c |
10 | rdk-logger | rdk_logger | WANMANAGERLog.txt is not created in /rdklogs/logs folder | rdkb_debug.ini and rdkb_log4crc files needs to be updated | https://code.rdkcentral.com/r/c/rdk/components/generic/rdk_logger/+/58885 |
11 | CcspEthAgent | CcspEthAgent | Device.X_RDK_WanManager.CPEInterface.1.Wan.LinkStatus , Device.X_RDK_WanManager.CPEInterface.1.Phy.Path & Device.X_RDK_WanManager.CPEInterface.1.Phy.Status is getting Incorrect values . | 1.Fix for erouter0 interface bring up 2.Notifying EthAgent for the link event based on wan_physical_ifname 3.Fix to avoid CR ready check which is causing 1min delay in the ip-assignment flow for ETH. 4.Parameter instance correction for subscribeEvent | https://code.rdkcentral.com/r/c/rdkb/components/opensource/ccsp/CcspEthAgent/+/58898 |
12 | CcspPandM | CcspPandM | ../../../../../../../../../../rdkb/components/opensource/ccsp/CcspPandM/source-arm/TR-181/board_sbapi/cosa_dhcpv6_apis.c:8411:56: error: 'hub4_preferred_lft' undeclared (first use in this function) 8411 dhcpv6_data.prefixPltime = hub4_preferred_lft; ^~~~~~~~~~~~~~~~~~ ../../../../../../../../../../rdkb/components/opensource/ccsp/CcspPandM/source-arm/TR-181/board_sbapi/cosa_dhcpv6_apis.c:8411:56: note: each undeclared identifier is reported only once for each function it appears in ../../../../../../../../../../rdkb/components/opensource/ccsp/CcspPandM/source-arm/TR-181/board_sbapi/cosa_dhcpv6_apis.c:8412:56: error: 'hub4_valid_lft' undeclared (first use in this function) 8412 dhcpv6_data.prefixVltime = hub4_valid_lft; ^~~~~~~~~~~~~~ | hub4_preferred_lft , hub4_valid_lft are not declared properly in pam | https://code.rdkcentral.com/r/c/rdkb/components/opensource/ccsp/CcspPandM/+/58951 |
erouter0 should have valid IP based on the wan configuration (Eg 192.168.0.11/24)
brlan0 IPv4 should be 10.0.0.1 ( i,e Default IP Address )
ssh from WAN to eRouter IP should be successful
Lan clients should get IPv4 address in the range of 10 series(i,e default DHCP server pool range) and captive portal page should be loaded.
All ccsp process should be Up and corresponding DataModel parameters should be loaded properly.
WanManager logs will be generated in /rdklogs/logs folder in RPI
Following systemd service file's status needs to be verfiy,
Using dmcli commands to verify the LinkStatus(CcspEthAgent will pass the LinkStatus to WanManager )
WebUI should be loaded in Webbrowser by using erouter0 IPv4 Address(i,e erouter0ip:8080) and login should be successful
Internet check should be successful,
Known Issues
Sometimes , erouter0 interface is not getting the WAN IP .
1 Comment
Chandra sekhar
documented well and very useful