Skip to end of metadata
Go to start of metadata

 

RDK-B Emulator Build Guide

 

Author

RDK-M

Approver

 

Version

1.0

State

Release version

Date

June 12, 2018

 


Table of Contents

1 Build Setup Instructions

1.1 Setting up the Host Environment

1.1.1 Install OS - ubuntu-12-04.5-desktop-i386.iso

1.1.2 Install the following packages for setting up your host VM

1.1.3 Configure bash as default command interpreter for shell scripts

1.1.4 Configure Git

1.1.5 Configure repo

1.1.6 Setting up .netrc for RDK emulator

1.2 Downloading Source Code & Building

1.2.1 Downloading Source Code

1.2.2 Building

1.3 Bringing RDK-B Emulator on Virtual Box

1.3.1 Installing Virtual Box on Hosts

1.3.2 Steps to bring up RDK Emulator on Virtual Box

1.3.3 Steps to bring up Virtual Debian Client for RDK-B Emulator on Virtual Box

1.4 WebUI Application

1.4.1 Steps to bring up RDK-B WebUI on Browser

1.5 RDK-B Emulator Features

1.5.1 DHCP Gateway Configuration

1.5.2 Connected Devices: Ethernet/Wireless Client

1.5.3 Private Wi-Fi 5GHz Band

1.5.4 Parental Control

1.5.5 Port Forwarding

1.5.6 Port Triggering

1.5.7 Remote Management

1.5.8 De-Militarized Zone

1.5.9 Firewall

1.5.10 Testing SNMP in Emulator

1.5.11 Testing TR069 in Emulator

1.5.12 Testing PSM in Emulator

1.5.13 Testing Xfinity-WiFi-2.4GHz with PSM Support in Emulator

1.5.14 Testing Xfinity-WiFi-5GHz with PSM Support in Emulator

1.5.15 Testing BridgeMode with PSM Support in Emulator: -

1.5.16 Testing Reserved IP with PSM and Dnsmasq Support in Emulator

1.5.17 Test and Diagnostics

1.5.18 Troubleshooting Reset/Restore Gateway

1.5.19 Testing WebPA in Emulator

1.5.20 Bluetooth Functionality support

1.5.21 Lost and Found feature support

1.6 RDK-B Emulator for Developers

1.6.1 Generation of Workspace & Vmdk Image

1.6.2 Jenkins Build

1.6.3 Virtual Box Setup Preparation

1.6.4 Git configuration in Emulator

1.6.5 Build Steps in Emulator

 


1          Build Setup Instructions

 

1.1         Setting up the Host Environment

Pre-Requisites

Requirement

Remarks

Linux

32 bit Ubuntu 12.04 OS

Fee HDD Space

Minimum 100GB Free Memory

Oracle Virtual Box

5.0.40 or higher

Wireless Adapter

Brand Name:Tenda ralink & Model Number:W311MI

TP-Link Archer T4U AC 1200

USB to Ethernet Switch

To connect with Ethernet Switch & Multiple Clients

 

1.1.1          Install OS - ubuntu-12-04.5-desktop-i386.iso

This step is for one time setup for downloading & building RDK-B Emulator in a standalone machine.

  • Download ubuntu-12-04.5-desktop-i386.iso from the link .
  • Install Ubuntu on a desktop using the above image.

 

1.1.2          Install the following packages for setting up your host VM

The instructions provided below are meant to be executed via the command line on an Ubuntu machine:

$         sudo apt-get   install     build-essential gettext bison libfile-slurp-perl gawk libncurses-dev autoconf flex doxygen libtool automake   libpcre3-dev zlib1g-dev libbz2-dev subversion minicom putty libssl-dev rpm python-pexpect python-svn python-argparse vim tofrodos meld dos2unix cmake uuid-dev ruby transfig libglib2.0-dev xutils-dev lynx-cur gperf autopoint   python-dulwich   python-dev curl vim diffstat texinfo chrpath   openjdk-7-jre

 

1.1.3          Configure bash as default command interpreter for shell scripts

$         sudo dpkg-reconfigure dash

Select “No”
To choose bash, when the prompt asks if you want to use dash as the default system shell - select “No”

 

1.1.4          Configure Git

Upgrade your Git version to 1.8.x or higher

On Ubuntu 12.04 LTS, if you are unable to upgrade your git version using apt-get, then follow the below steps in order to upgrade  

$       sudo apt-get install python-software-properties

$       sudo add-apt-repository   ppa:git-core/ppa

$       sudo apt-get update

$       sudo apt-get install git

  Once git is installed, configure your name and email using the below commands

$ git config --global user.email " you@example.com "

$                 git config --global user.name "Your Name"

 

1.1.5          Configure repo

In order to use Yocto build system, first you need to make sure that repo is properly installed on the machine:

$                 mkdir ~/bin

$                 PATH=~/bin:$PATH

$                 curl   https://storage.googleapis.com/git-repo-downloads/repo   > ~/bin/repo

$                 chmod a+x ~/bin/repo

Trivia :   Repo is a repository management tool that is built on top of Git. Its main purpose is to help manage projects that consist of many Git repositories, it can also be used to manage uploads to the CMF Gerrit instance and automate aspects of the development workflow.

Repo does not replace Git, it simply aids management of projects that contain multiple Git repositories into a single local working directory. Git will still be used for local operation such as commits etc.

Repo manages this for you by means of an XML based Manifest file. The Manifest file defines which repositories the project uses and links to appropriate revisions of each git repository, i.e where the upstream repositories reside and where they should be cloned locally. It is the manifest.xml (or default.xml) that determines which Git repositories and revisions repo will manage. This manifest.xml file is hosted in a Git repository along with all the other git repositories.

 

1.1.6          Setting up .netrc for RDK emulator

CMF git uses https. This step prevents the password prompt every now and then during code checkout and build.

Create a file .netrc in home directory.

$ vi .netrc

The contents of the .netrc should be as follows:

machine code.rdkcentral.com

login <YOUR_USERNAME>

password <YOUR_PASSWORD>

 

1.2         Downloading Source Code & Building

 

1.2.1          Downloading Source Code

Following commands fetch the source code of emulator using repo tool

$ mkdir emulator && cd emulator

Please use the following repo init command

 

$ repo init -u https://code.rdkcentral.com/r/manifests -m rdkb.xml -b <branch_name>

(Example 1 : repo init -u https://code.rdkcentral.com/r/manifests -m rdkb.xml -b rdkb-20180527

Example 2 : repo init -u https://code.rdkcentral.com/r/manifests -m rdkb.xml -b master

Example 3 : repo init -u https://code.rdkcentral.com/r/manifests -m rdkb.xml -b morty)

$ repo sync -j4 --no-clone-bundle

 

1.2.2          Building

$ source meta-cmf-rdkb-bsp-emulator/setup-environment

The above step configures and sets up your directory to start an appropriate build for broadband.

There are different kinds of builds listed. Please read the options and select the number of the build you need.

1) meta-rdk-bsp-emulator/conf/machine/qemuarmbroadband.conf
2) meta-rdk-bsp-emulator/conf/machine/qemux86broadband.conf
3) meta-rdk-bsp-emulator/conf/machine/qemux86hyb.conf
4) meta-rdk-bsp-emulator/conf/machine/qemux86mc.conf
5) openembedded-core/meta/conf/machine/qemuarm.conf
6) openembedded-core/meta/conf/machine/qemux86-64.conf
7) openembedded-core/meta/conf/machine/qemux86.conf

  • Select option (option: 2) for qemux86broadband , if you need to build a RDK-B emulator.

Next, you would need to initiate the build using the following command:

$ bitbake rdk-generic-broadband-image

On Successful build,   the ROOTFS   (in vmdk format) would be available at the following reference location based on the build type:

-             ${HOME}/emulator/build-qemux86broadband/tmp/deploy/images/qemux86broadband/rdk-generic-broadband-image-qemux86broadband-<timestamp>.vmdk

 

Example:  

…/build-qemux86broadband/tmp/deploy/images/qemux86broadband/rdk-generic-broadband-image-qemux86broadband-20160217080610.vmdk

 


1.3         Bringing RDK-B Emulator on Virtual Box

 

1.3.1          Installing Virtual Box on Hosts

Use the below command to install virtual box on host

sudo apt-get install virtualbox

 

1.3.2          Steps to bring up RDK Emulator on Virtual Box

 

The client device is connected via USB to Ethernet Adapter use below configuration setup for RDK-B Emulator

  1. Once virtual box is installed, open the virtual box using the command virtual box.

 

  1. Click New -> Enter name -> Select Type 'Linux' -> Select Version 'Other Linux (32 bit)' ->

Click Next .

 

 

 

  1. Select Memory size - 512MB -> Click Next.

 

 

  1. Select option Use an existing virtual hard drive -> Select the image -> Click Create.

For example: Select the generated image from the below path

…/build-qemux86broadband/tmp/deploy/images/qemux86broadband/rdk-generic-broadband-   image-qemux86broadband-20160217080610.vmdk

 

  1. Once Virtual Box is created, Select the new image whose name is given as in step 1 and Click Settings -> Network -> Select Attached to: 'Bridged Adapter' ->Select Name:eth0-> Adapter Type is Intel PRO/1000 T Server(82543 GC) and Promiscuous Mode is Allow All.
  2. Click Ok

 

 

 

  1. Click Settings -> Network -> Select Adapter 2->Select Attached to: 'Bridged Adapter'->Select Name: eth1 (select Interface of USB to Ethernet) -> Adapter Type is Intel PRO/1000 T Server(82543 GC) and Promiscuous Mode is Allow All.
  2. Click Ok

 

 

 

  1. Configure Your VMs USB settings: To access the USB devices in Your guest OS(Virtual box)hosted in Ubuntu, Install following packages into Ubuntu    

$       sudo apt-get install dkms gnome-system-tools open-vm-dkms

$       sudo apt-get –f install

$       sudo usermod -G vboxusers -a $USER

 

  1. Click Settings -> USB ->choose USB 3.0 (xHCI Controller) -> Add Ralink 802.11 n WLAN [0101] (Wireless Adapter Tenda Ralink) ->Click Ok.

 

 

 

  1. Click Start tab. This will bring the emulator up with the initial splash screen as below.

 

After boot-up completed login is asking from user. We can enter through root login.

 

 

1.3.3          Steps to bring up Virtual Debian Client for RDK-B Emulator on Virtual Box

 

Debian virtual client shall be used when the Ethernet clients (Ex: Linux/Windows PCs) are not physical present.

The Following steps are used to setup Virtual RDK-B Emulator Client on virtual box.

  1. Once virtual box is installed, open the virtual box using the command virtual box.

 

  1. Click New -> Enter name -> Select Type 'Linux' -> Select Version 'Debian (64 bit)' ->

Click Next .

 

 

  1. Select Memory size - 512MB -> Click Next.

 

 

 

  1. Select option Use an existing virtual hard drive -> Select the image -> Click Create.

 

 

  1. Configure VMs Host only Networks: Click File->Preferences->Network->Choose Host-only Networks->Add vboxnet0

 

 

 

  1. Edit vboxnet0->Disable DHCP server ->Click Ok.

 

 

  1. Once Virtual Box is created, Select the new image whose name is given as in step 1 and Click Settings -> Network -> Select Attached to: 'Host-only Adapter' ->Select Name:vboxnet0-> Click Ok .

 

 

 

  1. Click Start tab. This will bring the emulator up with the initial splash screen. After boot-up completed login with username & password

 

 

 

  1. In Virtual Box, Select the server image whose name is given as in step 1(RDK_EMULATOR) and Click Settings -> Network -> Select Attached to: 'Bridged Adapter' ->Select Name: eth0->Click Ok.

 

 

 

 

  1. Click Settings -> Network -> Select Adapter 2->Select Attached to: 'Host-only Adapter'->Select Name: vboxnet0 -> Click Ok

 

 

 

  1. Click Start tab. This will bring the emulator up with the initial splash screen as below

After boot-up completed login is asking from user. We can enter through root login.

 

 

 

1.4         WebUI Application

 

1.4.1          Steps to bring up RDK-B WebUI on Browser

 

  1. Open a browser in your client machine(Ethernet Client/ Virtual Debian Client)

 

  1. In the Address Bar Enter the URL as below

 

http://virtualbox ipaddress

 

Steps to find the IP Address in Virtual Box

 

  • Go to Emulator -> In  virtual Box enter the ifconfig command and use the brlan0 address for load the Web UI.  For Example -> http://192.168.7.1

 

 

 

  1. Finally the Login Screen is open in your Client Machine Browser.

Login Details:

Username: admin

Password: password

 

1.5         RDK-B Emulator Features

 

1.5.1          DHCP Gateway Configuration

 

To Configure DHCP Gateway: Select Gateway -> Connection -> Local IP Configuration

Enter Gateway Address, Subnet Mask, DHCP Beginning and Ending Address, DHCP Lease Time

 

  • Gateway Address

Enter the IP address of the Gateway

 

  • Subnet Mask

Select the appropriate subnet mask based on the number of devices that will be connected to your network

 

  • DHCP Beginning and Ending Addresses

The DHCP server in the Gateway allows the router to manage IP address assignment for the connected devices

 

  • DHCP Lease Time

The lease time is the length of time the Gateway offers an IP address to a connected device. The lease is renewed while it is connected to the network. After the time expires, the IP address is freed and may be assigned to any new device that connects to the Gateway

 

 

View and manage the settings for your local IP, Wi-Fi networks: Select Gateway ->Connection -> Status

 

1.5.2          Connected Devices: Ethernet/Wireless Client

View information about devices currently connected to your network. List of connected devices auto discovered via DHCP

  • Online devices are currently connected to your Gateway
  • Offline devices were once connected to your network, but not currently
  • To block internet access to a device connected to your Gateway, click X button
  • RSSI level of wireless client device is displayed in the screen shot
  • Connected Clients are able to access Router Home Page using Gateway Configuration IP Address (In Browser http://192.168.9.1)

 

1.        Ethernet/Wireless Client Connection Status: Select Connected Devices -> Devices

 

 

2.        Select   VIEW CONNECTED DEVICES   to manage devices connected to your network: Select Gateway -> At a Glance

3.        Manage Wi-Fi Connection Settings: Select Gateway -> Connection -> Wi-Fi

 

MAC Filtering module is used to perform ALLOW-ALL/ALLOW/DENY operation on the wireless devices based on their MAC address.

 

  • MAC Filter Setting is specific to each Network Name (SSID). Select a MAC Filtering Mode like Allow All (default), Allow, and Deny

         Allow- All (Default): All wireless client stations can connect to the Gateway; no MAC filtering rules

         Allow: Only the devices in the "Wireless Control List" are allowed to connect to the Gateway

         Deny: Wireless devices in the "Wireless Control List" are not allowed to connect to the Gateway

 

  • Wireless Control List : Displays the wireless devices that were manually added or auto-learned
  • Auto-Learned Wireless Devices are currently connected to the Gateway
  • Manually-Added Wireless Devices:   Enter a unique name and MAC address for the wireless device you want to manually add, then click   ADD.

 

 

  • Click EDIT next to the Network Name you'd like to modify its Wi-Fi network settings : Network Name (SSID), Mode, Security Mode, Channel, Network Password (Key), and Broadcasting feature

 

 

1.5.3          Private Wi-Fi 5GHz Band

          Wi-Fi dual band dongle:

  • Please use the wireless dual band dongle for the 5 GHz band support - TP-Link AC1200 Wireless Dual Band USB Adapter (Archer T4U)               https://www.amazon.com/gp/product/B00JBJ6VG8/ref=ya_st_dp_summary
  • One can choose any dual band dongle provided it has to support the “rtl8812AU” realtek drivers
  • The TP-Link dongle drivers has been integrated with the emulator

          Wi-Fi dual band dongle setup in VB:

  • Please select the wireless dongle in the below way in VB
    • Settings             usb             Tenda Dongle-2.4 GHz ( Represents or maps to wlan0 interface )
    • Settings             usb              TPLink Dongle-5 GHz ( Represents or maps to wlan1 interface )
    • Settings             usb              USB 3.0 (xHCI) Controller

            

          Wi-Fi 5GHz SSID Broadcast:

  • The 5GHz SSID should be broadcasted similar to the below shown connection page in WebUI
  • It displays the type of the band, MAC address of the radios and its security type

 

 

  • The SSID in any client device ( eg Mobile ) should be broadcasted as shown below

 

 

          Wi-Fi 5GHz –Connected Status:

 

  • The below Web UI status page shows the number of connected devices to the Wi-Fi 5GHz band and the supported protocols, security etc

 

          Wi-Fi 5GHz –Connected Devices:

  • The below Web UI connection page shows the number of connected devices to the Wi-Fi 5GHz band, type of connection ( DHCP/ Reserved ) , mode of connection ( Wi-Fi 2.4,5 GHz/Ethernet ), Ipaddress, MAC address, Hostname and RSSI etc
  • The connection mode should be shown as Wi-Fi 5GHz in the connected devices page as shown below

          Wi-Fi 5GHz –Configuration:

  • The Wi-Fi 5GHz configuration can be done in the below shown Web UI Edit page
  • The configurable parameters are Network SSID, Mode, Security Mode, Channel, Password broadcast network name
  • Supported modes in Emulator is 802.11ac  for 5GHz Band
  • Supported security modes in Emulator is WPA-PSK, Open
  • Channel can be selected either as automatic or manual
  • Possible Channels for the 5GHz Band are 36,40,44,48,149,153,157,161,165

 

 

1.5.4          Parental Control

 

Manage Access to specific websites, specific services and applications, specific devices by network

 

Managed Sites

  • Select Enable to manage sites, or Disable to turn off
  • +ADD : Add a new website or keyword
  • Blocked Sites : Deny access to specific websites (URLs)
  • Blocked Keywords : Deny access to websites containing specific words
  • The Gateway will block connections to websites on all untrusted computers, based on the specified rules. If you don't want restrictions for a particular computer, select Yes under Trusted Computers

 

 

Managed Services

  • Select Enable to manage services and applications, or Disable to turn off
  • +ADD : Add to block a new service or application
  • The Gateway will block services and applications on all untrusted computers, based on the specified rules. If you don't want restrictions for a particular computer, select Yes under Trusted Computers

 

 

 

Managed Devices

  • Select Enable to manage network devices, or Disable to turn off
  • Access Type : If you don't want your devices to be restricted, select Allow All. Then select
  • +ADD BLOCKED DEVICE to add only the device you want to restrict
  • If you want your devices to be restricted, select Block All. Click +ADD ALLOWED DEVICE to add the device you don't want to restrict

 

 

 

 

 

1.5.5          Port Forwarding

 

  • Port forwarding permits communications from external hosts by forwarding them to a particular port.
  • Select   Enable   to manage external access to specific ports on your network.

 

  1. Click Advanced -> Select Port Forwarding -> Click Enable Button

 

 

  1. Click   +ADD SERVICE   to add new port forwarding rules

 

 

  1. Select Common Service and Service Type

Common Services : FTP, AIM, HTTP, PPTP, HTTPs, Telnet, SSH, others

Service Type : TCP/UDP, TCP, UDP

  1. Click Connected Device Button and Choose Client Device for Adding Port Forwarding Rule->Click Save

 

 

 

  1. Added Port Forwarding rules by user. Click Edit Button to Modify Port Forwarding Rule and Click “X” Button to Remove Port Forwarding Rule

 

 

1.5.6          Port Triggering

 

  • Port triggering monitors outbound traffic on your network. When traffic is detected on a particular outbound port, the Gateway remembers that computer's IP address, triggers the inbound port to accept the incoming traffic, and directs the communications to the same computer.
  • Select   Enable   to manage external access to specific ports on your network.

 

1.        Click Advanced -> Select Port Triggering -> Click Enable Button

 

 

2.        Click   +ADD PORT TRIGGER   to add new port triggering rules

 

 

 

3.        Enter ->Service Name, Trigger Port From, Trigger Port To, Target Port From, and Target Port To 

 

4.        Select Service Type:TCP/UDP,TCP,UDP->Click Add Button

 

 

 

 

5.        Added Port Triggering rules by user. Click Edit Button to Modify Port Triggering Rule and Click “X” Button to Remove Port Triggering Rule

 

 

1.5.7          Remote Management

 

  • Remote Management can be used via HTTP and HTTPS
  • Enable the HTTP option and enter the value for HTTP Port, then you can access your device from HTTP. For example, if the WAN IP address is 11.22.11.22 and the HTTP port number is 8080, then you would use http://11.22.11.22:8080
  • It's the same way to configure HTTPS
  • Select whether you would like to have Remote Management open to all Internet IP Addresses, an Internet IP Address range, or a single Internet IP Address

 

1.        Click Advanced -> Select Remote Management-> To Enable HTTP option: Click Enable Button -> Enter the value for HTTP Port ->Click Single Computer ->Enter IPV4 Address(ex 192.168.2.20)

 

 

 

2.        To Enable HTTPs option: Click Enable Button ->Enter the value for HTTPs Port ->Click Single Computer ->Enter IPV4 Address(ex 192.168.2.20)

 

 

3.        To Enable HTTP and HTTPs option for Single Computer

 

 

4.        To Enable HTTP option: Click Enable Button -> Enter the value for HTTP Port ->Click Range Of IPs ->Enter Start and End IPV4 Address(ex 192.168.2.20,192.168.2.25)

 

 

 

5.        To Enable HTTPs option: Click Enable Button -> Enter the value for HTTPs Port ->Click Range Of IPs ->Enter Start and End IPV4 Address(ex 192.168.2.20,192.168.2.25)

 

 

6.        To Enable HTTP and HTTPs option for Range Of IPs

 

 

7.        To Enable HTTP for Any computer: Click Enable Button -> Enter the value for HTTP Port ->Click Any Computer

 

 

8.        To Enable HTTPs for Any computer: Click Enable Button -> Enter the value for HTTPs Port ->Click Any Computer

 

 

9.        To Enable HTTP and HTTPs option for Any Computer

 

 

 

1.5.8          De-Militarized Zone

 

  • Configure DMZ to allow a single computer on your LAN to open all of its ports
  • Set up procedure for DMZ : 

              i)  HostPC -> USB2Ethernet Adapter -> Switch -> ConnectedClients( LAN Interface is eth1)

             ii) HostPC -> USB2Ethernet Adapter -> ISP Network (WAN Interface is eth2)

         Choose Three Adapters in VBox Settings,(Settings->Network )

  1. Adapter 1 (eth0) -> Attached to Bridged Adapter
  2. Adapter 2  (eth1) -> Attached to Bridged Adapter ,Adapter Type is Intel PRO/1000 T Server(82543 GC) and Promiscuous Mode is Allow All.
  3. Adapter (eth2) ->  Attached to Bridged Adapter ,Adapter Type is Intel PRO/1000 T Server(82543 GC) and Promiscuous Mode is Allow All.

       1 and 3 is WAN Interfaces and 2 is LAN Interface.

    eth0(for ex : 192.168.2.17) and eth2(192.168.2.80) are having WAN IP.

 

1.        Click Advanced -> Select DMZ -> Click Enable Button

 

 

2.        Configure DMZ : Enter DMZ v4 Host(Ex : IP address of one the Client Network 192.168.9.20)

 

 

1.5.9          Firewall

 

A firewall has a set of rules which are applied to each packet. The rules decide if a packet can pass, or whether it is discarded. Usually a firewall is placed between a network that is trusted, and one that is less trusted

Select a security level like Minimum Security (Low), Typical Security, Minimum Security and Custom Security

 

Security Levels:

         Maximum Security(High)

         Typical Security(Medium)

         Minimum Security(Low)

         Custom Security

 

Default Security Level: Select Gateway -> Firewall -> IPV4

 

 

Maximum Security:

  • Select Gateway -> Firewall -> IPV4 ->Select Maximum Security->Click save Settings
  • Blocks all applications, including voice applications (such as Gtalk, Skype) and P2P applications, but allows Internet, email, VPN, DNS, and iTunes services

 

 

 

 

Typical Security:

  • Select Gateway -> Firewall -> IPV4 ->Select Typical Security->Click save Settings
  • Blocks P2P applications and pings to the Gateway, but allows all other traffic

 

 

Minimum Security:

  • Select Gateway -> Firewall -> IPV4 ->Select Minimum Security->Click save Settings
  • No application or traffic is blocked. (Default setting)

 

 

Custom Security:

  • Select Gateway -> Firewall -> IPV4 ->Select Custom Security->Enable Specific Services-> Click save Settings
  • Block specific services like HTTP,ICMP,Multicast,P2P applications, IDENT

 

Disable Entire Firewall:

  • Select Gateway -> Firewall -> IPV4 ->Select Custom Security->Enable Disable entire firewall option->Click save Settings

 

 

1.5.10      Testing SNMP in Emulator

 

SNMP can be tested from either host machine using any mib browser or from the VM console itself.

 

To test from the VM console:

  • Boot the VM and do ssh in to the VM to get the console

  Ex: ssh root@eth0Ip

  • Type the following command to get object values:

Ex: To get SSID info:

snmpget -OQ -Ir -v 2c -c public 127.0.0.1 1.3.6.1.4.1.17270.50.2.2.2.1.1.3.10001

 

To set SSID:

snmpset -OQ -Ir -v 2c -c private 127.0.0.1 1.3.6.1.4.1.17270.50.2.2.2.1.1.3.10001 s New_SSID

 

It will update the existing SSID to new SSID and will broadcast the new one. You can confirm the same by running snmpget command again or by checking in /etc/hostapd.conf file.

 

To test using MIB browser from host machine

  • Download iReasoning MIB browser personal Edition which is a free version from the below link.

               http://www.ireasoning.com/downloadmibbrowserfree.php

  • After extracting the MIB browser code, copy RDKB-RG-v1.mib which is used by emulator to "mibs" directory of ireasoning folder. Generally all the mibs used by emulator are available in "/usr/share/snmp/mibs".
  • Now start the browser using "sh browser.sh" from the ireasoning folder.
  • Now go to the ireasoning mib browser and in Advanced tab, add the ipaddress (eth0IP of Emulator) and port number (161) and select SNMP version as 2. You can use localhost IP also (127.0.0.1) if running in NAT mode.

 

C:\Users\drawat003c\Downloads\iReasoning_conf.png

 

  • After adding the ip and Port, now load any mib file by clicking on File and LoadMibs, then a dialogue box will appear as shown below from that select the RDKB-RG-v1 MIB file to test.

 

C:\Users\drawat003c\Pictures\Capture.PNG

 

  • Now select any parameter which modules are integrated in image and click get for retrieving the value of that parameter as shown below.

 

1.5.11      Testing TR069 in Emulator

 

TR069 for Emulator can be tested from ACS server https://hdmapp-dt-ai-vip.comcast.net/hdm/welcome/welcome.do using below steps:

 

  • Boot up the Emulator.
  • Login to above mentioned ACS server.
  • Go to Devices->Find Devices by Serial Number and Enter Emulator’s Serial Number as below

  • Click on manage Device and Device Page will be displayed as below:

  • Select Any function (e.g. GetParameterValues) from queue Function:

  • select the attribute as below and save:

  • Once Query is successful, response from the device can be seen in Communication logs as below:

1.5.12      Testing PSM in Emulator

 

PSM

PSM is a software component that stores and retrieves information on behalf of other components. To prevent system configuration file from becoming corrupted or lost when the device is suddenly rebooted or power loss conditions.

PSM properties files

 

Configuration files are saved as below on the device:

  • /config/bbhm_def_cfg.xml – Default configuration file. This file should be used for initial boot up stage.
  • /nvram/bbhm_bak_cfg.xml- Back up configuration file.
  • /nvram/bbhm_cur_cfg.xml – Current configuration file.

First copy the current system file into the backup file.Then flush the configuration into the current file.(bbhm_bak_cfg.xml and bbhm_cur_cfg.xml are having  same copy).

 

Reading Configuration Structure of PSM:

 

 

    

 

 

 

PsmSysroCfmReadCurConfig function is used to read the current data from the memory.

Get values from PSM:

                                              

 

 

 

Set values from PSM:

 

 

 

 

 

 

To Test from VM Console:

 

         Type the following command to get the parameter values from /nvram/bbhm_cur_cfg.XML.

                  Example to get SSID info:-

                    1. dmcli simu psmget eRT.com.cisco.spvtg.ccsp.Device.WiFi.Radio.SSID.1.SSID

                                                                                    (or)

                   2.psmcli nosubsys get eRT.com.cisco.spvtg.ccsp.Device.WiFi.Radio.SSID.1.SSID

 

        Type the following command to set the parameter values to /nvram/bbhm_cur_cfg.XML

                 Example to set SSID info:-

                   1. dmcli simu psmset eRT.com.cisco.spvtg.ccsp.Device.WiFi.Radio.SSID.1.SSID

                                                                                    (or)

                   2.psmcli nosubsys set eRT.com.cisco.spvtg.ccsp.Device.WiFi.Radio.SSID.1.SSID

 

1.5.13      Testing Xfinity-WiFi-2.4GHz with PSM Support in Emulator

 

XFINITY-WIFI :-

               Xfinity-Wi-Fi is a feature through which customer can connect to internet (not Home Device) using their Comcast account from anywhere. For example, suppose we are in a restaurant which has Xfinity with hotspot enabled (by default all Xfinity Boxes have hotspot enabled), that Restaurant Xfinity Box will broadcast Xfinity Wi-Fi SSID. We can connect your Mobile/Device to that Xfinity SSID but once you connect it will ask your Comcast account details and verify the same. Once verified, we can browse the internet with your account.

              By default Xfinity-Wi-Fi should be Up in Emulator.

 

DMCLI Commands:-

             By using the Below Commands to Enable/Disable the Xfinity Wifi in Emulator:-

 

  1. dmcli simu setvalues Device.X_COMCAST-COM_GRE.Tunnel.1.DSCPMarkPolicy int 44

                                   This Command is used to change the DSCPMarkPolicy value in mangle table for IP packets priority.

  1. dmcli simu setvalues Device.X_COMCAST-COM_GRE.Tunnel.1.PrimaryRemoteEndpoint string 68.85.15.238.

                                  This Command is used to update the PrimaryRemoteEndpoint in syseventd and PSM.

  1. dmcli simu setvalues Device.X_COMCAST-COM_GRE.Tunnel.1.SecondaryRemoteEndpoint string 68.85.6.243

                                  This Command is used to update the SecondaryRemoteEndpoint in syseventd and PSM

  1. dmcli simu setvalues Device.WiFi.SSID.5.Enable bool true

                                  If It's true  -Xfinity-wifi SSID should be broadcasting

                                  If It's false – Xfinity-wifi SSID shouldn't be broadcasting(SSID Value should be changed as OutOfService)              

  1. dmcli simu setvalues Device.WiFi.SSID.5.SSID string Xfinity-wifi-2.4G  

                                 This Command is used to change the Xfinity-Wifi Broadcast SSID name(Hotspot name).

  1. dmcli simu setvalues Device.DeviceInfo.X_COMCAST_COM_xfinitywifiEnable bool true

                                 If It's true - Hotspot should be up and Xfinity-Wifi SSID should be Broadcast.

                                 If It's false - Hotspot shouldn't be up(wlan0_0 interface should be down) and Xfinity-Wifi SSID shouldn't be Broadcast.

  1. dmcli simu getvalues Device.WiFi.SSID.5.BSSID

 

                                  It shows the Xfinity-wifi(wlan0_0) mac address.

 

  1. dmcli simu getvalues Device.WiFi.AccessPoint.5.Security.ModeEnabled

 

                                  It shows the security mode for XfinityWifi(It should be always None(open security mode)).

 

Xfinity-Wifi Logs Details : -

  1. /var/tmp/hotspotfd.log
  2. /var/tmp/dhcp_snoopered.log

 

 

 

 

Once client should be connected through Broadcast Xfinity-wifi SSID.That client details should be listed in var/tmp/dhcp_snooperd.log.

 

 

 

 

 

 

 

 

 

 

 

Verifying the Xfinity-Wifi Status :-

Xfinity- wifi connected clients IP Address always should be 172.20.20.20.

 

 

 

 

 

 

 

 

 

 

 

Xfinity-wifi Login Page :-

                    RDKB or client does not do anything to get the URL. Once client is connected to hotspot SSID and try to browse any URL, it’s request will be redirected to COMCAST server(just like Captive Portal scenario) and Server will display Authentication page.

 

 

 

1.5.14      Testing Xfinity-WiFi-5GHz with PSM Support in Emulator

 

          Wi-Fi dual band dongle:

  • Please use the wireless dual band dongle for the 5 GHz band support - TP-Link AC1200 Wireless Dual Band USB Adapter (Archer T4U)               https://www.amazon.com/gp/product/B00JBJ6VG8/ref=ya_st_dp_summary
  • One can choose any dual band dongle provided it has to support the “rtl8812AU” realtek drivers
  • The TP-Link dongle drivers has been integrated with the emulator

          Wi-Fi dual band dongle setup in VB:

  • Please select the wireless dongle in the below way in VB
    • Settings             usb             Tenda Dongle-2.4 GHz ( Represents or maps to wlan0 interface )
    • Settings             usb              TPLink Dongle-5 GHz ( Represents or maps to wlan1 interface )
    • Settings             usb              TPLink Dongle-5 GHz ( Represents or maps to wlan2 interface )
    • Settings             usb              USB 3.0 (xHCI) Controller

 

DMCLI Commands:-

             By using the Below Commands to Enable/Disable the Xfinity Wifi in Emulator:-

  1. dmcli simu setvalues Device.X_COMCAST-COM_GRE.Tunnel.1.DSCPMarkPolicy int 44

>>This Command is used to change the DSCPMarkPolicy value in mangle table for IP packets priority.

  1. dmcli simu setvalues Device.X_COMCAST-COM_GRE.Tunnel.1.PrimaryRemoteEndpoint string 68.85.15.238

>>This Command is used to update the PrimaryRemoteEndpoint in syseventd and PSM.

  1. dmcli simu setvalues Device.X_COMCAST-COM_GRE.Tunnel.1.SecondaryRemoteEndpoint string 68.85.6.243

>>This Command is used to update the SecondaryRemoteEndpoint in syseventd and PSM

  1. dmcli simu setvalues Device.WiFi.SSID.6.Enable bool true

>>If It's true  -Xfinity-wifi SSID should be broadcasting

              >>If It's false – Xfinity-wifi SSID shouldn't be broadcasting(SSID Value should be changed as OutOfService)              

  1. dmcli simu setvalues Device.WiFi.SSID.6.SSID string Xfinity-wifi-5G  

>>This Command is used to change the Xfinity-Wifi Broadcast SSID name(Hotspot name).

  1. dmcli simu setvalues Device.DeviceInfo.X_COMCAST_COM_xfinitywifiEnable bool true

>>If It's true - Hotspot should be up and Xfinity-Wifi SSID should be Broadcast.

             >>If It's false - Hotspot shouldn't be up(wlan0_0 interface should be down) and Xfinity-Wifi SSID shouldn't be Broadcast.

  1. dmcli simu getvalues Device.WiFi.SSID.6.BSSID

>>It shows the Xfinity-wifi(wlan0_0) mac address.

 

  1. dmcli simu getvalues Device.WiFi.AccessPoint.6.Security.ModeEnabled

>>It shows the security mode for XfinityWifi(It should be always None(open security mode)).

Xfinity-Wifi Logs Details : -

  1. /var/tmp/hotspotfd.log
  2. /var/tmp/dhcp_snoopered.log

Once client should be connected through Broadcast Xfinity-wifi SSID.That client details should be listed in var/tmp/dhcp_snooperd.log.

 

Verifying the Xfinity-Wifi Status :-

Xfinity- wifi connected clients IP Address always should be 172.20.20.20.

Xfinity-wifi Login Page :-

                    RDKB or client does not do anything to get the URL. Once client is connected to hotspot SSID and try to browse any URL, it’s request will be redirected to COMCAST server(just like Captive Portal scenario) and Server will display Authentication page.

 

 

 

1.5.15      Testing BridgeMode with PSM Support in Emulator: -

 

BridgeMode_Connection_SetUp   : 

              i)  HostPC -> USB2Ethernet Adapter -> Switch -> External Router -> connected clients .   (LAN                 interface is eth1).

             ii) HostPC -> USB2Ethernet Adapter -> ISP Network (WAN Interface is eth2)

 

         Choose Three Adapters in VBox Settings,(Settings->Network )

  1. Adapter 1 (eth0) -> Attached to Bridged Adapter
  2. Adapter 2  (eth1) -> Attached to Bridged Adapter ,Adapter Type is Intel PRO/1000 T Server(82543 GC) and Promiscuous Mode is Allow All.
  3. Adapter (eth2) ->  Attached to Bridged Adapter ,Adapter Type is Intel PRO/1000 T Server(82543 GC) and Promiscuous Mode is Allow All.

                 1 and 3 is WAN Interfaces and 2 is LAN Interface.

 

  1. RouterMode to BridgeMode :

In WebUI,Go to  Gateway -> At A Glance -> BridgeMode should be Enable.

               Once BridgeMode is ON ,

i) Below Scenarios are disabled in RDKB Emulator.

  1. Private Wifi Should be OFF.
  2. Parental control , firewall,local_ip_configuration,dmz,port triggering,port forwarding,connected_clients are disabled

 

                             ii)  Xfinity_WIFI should be ON

                             iii)  After reboot also, Emulator should come up in Bridge Mode if it was in Bridge Mode before reboot.

iv)  We should have access to webpage using eth0 IP if Remote Management is enabled.

v)  In WebUI,  Go to  Reset/Restore Gateway -> RESTORE FACTORY SETTI NGS is enabled, if it’s in BridgeMode, Emulator should come up in Router Mode.

 

BridgeMode Screenshots are ,

 

BridgeMode Enable :

 

Connected Clients are disabled in WebUI :

 

 

Private Wifi Should be OFF in WebUI :

DHCPv4 Details are disabled in WebUI :

 

 

 

Remote Management are Enabled in WebUI :

Reset/Restore Gateway in BridgeMode :

 

 

 

2.BridgeMode to RouterMode :

RouterMode_Connection_SetUp : HostPC -> USB2Ethernet Adapter -> Switch -> Connected Clients.

                   In WebUI, Go to Gateway -> At A Glance -> BridgeMode should be disabled.

Once RouterMode is ON ,

i)                      Below Scenarios are Enabled in RDKB Emulator,

  1. Private WiFi should be ON.
  2. Parental Control,Firewall,Port Forwarding,Port Triggering,DMZ,Local_IP_Configuration,Connected Clients .

ii)                    Xfinity_WiFI should be ON

iii)                  After reboot also, Emulator should come up in Router Mode if it was in Router Mode before reboot.

iv)                  We should have access to webpage using eth0 IP if Remote Management is enabled.

v)                    In WebUI,  Go to  Reset/Restore Gateway -> RESTORE FACTORY SETTI NGS is enabled, if it’s in RouterMode, Emulator should come up in Router Mode.

RouterMode Screenshots are ,

RouterMode Enabled :

 

1.5.16      Testing Reserved IP with PSM and Dnsmasq Support in Emulator

 

Change the IP address assignment method for Online Devices.

i)                      If DHCP is selected, the Gateway's DHCP server will automatically assign the IP address.

ii)                    If Reserved IP is selected, the IP address will be fixed without DHCP operation and you'll need to manually enter the IP address. The IP address must be within the DHCP IP address pool. To find your IP address range, go to Gateway > Connection > Local IP Network.

Reserved IP addresses can be assigned to any device that acts as a server or that requires a fixed IP address.

 

It consists of below scenarios :-

  1. DHCP->DHCP
  2. DHCP->Reserved
  3. Reserved->Reserved
  4. Reserved->DHCP
  5. Add New device with Reserved IP

 

  1.DHCP -> DHCP :

This scenario should be used to update comments.

 

 

Updating Comment :

 

After updating Comment :

2.DHCP -> Reserved :-

                            This scenario should be used to change the IP Address from DHCP to Reserved (Update static Entry in Static Table).

After Saving :

 

 

 

 

3.Reserved -> Reserved :-

                                   This scenario should be used to change the IP Address from Reserved to Reserved(changed Static Entry in Static Table).

 

After Saving :

 

 

4.Reserved -> DHCP :

                                   This scenario should be used to change the IP Address from Reserved to DHCP(delete the static Entry in Static Table).

After Saving:

 

 

5.Add New Device with Reserved IP :

Connect a Device using a Reserved IP address.

Host Name : Name of the Device being added.

MAC Address : MAC address of the Device being added.

Reserved IP address : The IP address of the device being added must be within the Gateway's range of the DHCP IP address pool.To find your IP address range, go to Gateway > Connection > Local IP Network.

 

After Saving:

Connection Status Should Be unknown because it doesn’t know the connection status(whether it’s Ethernet or wifi) . Once It gets connected with DHCP Server,then only it knows.

1.5.17      Test and Diagnostics

 

This features enables the user to troubleshoot the issues related to network connectivity

Path in WebUI, Troubleshooting              Diagnostic Tools

  • Test Connectivity Results: Checks your connectivity to the Internet.

 

 

  • Check IPv4 and IPv6 Address Results: Identifies accessibility to specific IP addresses.

 

  • Traceroute Results: Displays the route of packets across an Internet Protocol (IP) network.

 

  • Self-heal:

This feature revokes any process if it is killed or crashed by any chance during runtime through systemd

The below command enables the self-heal module if there is any issue in the dns resolving & pinging the external world (for example default router IP). This will result in rebooting of the emulator if there is any issue in the aforementioned functionalities

  • dmcli simu setv Device.SelfHeal.X_RDKCENTRAL-COM_Enable bool true

 

  • RDK Logger:

The logger file would be present in the following path /rdklogs/logs

 

 

 

1.5.18      Troubleshooting Reset/Restore Gateway

 

If you're having problems with the Gateway, click RESET to restart or RESTORE to the default factory settings.

RESTORE will erase all your settings (passwords, parental controls, firewall).

 

RESET:

To Click Troubleshooting->Reset/Restore Gateway->Press “Reset” button to restart the Gateway

After Reboot, Emulator Maintains Previous iptables Rules and Webui Entries and Password

 

 

 

RESET Wi-Fi MODULE:

To Click Troubleshooting->Reset/Restore Gateway->Press “Reset Wi-Fi Module” to restart just the WiFi module only

WiFi will be unavailable for at least 30 seconds. Reboot wifi module Only. Do not restore to default

 

 

 

 

RESET Wi-Fi ROUTER:

To Click Troubleshooting->Reset/Restore Gateway-> Press “Reset Wi-Fi Router” to restart Wi-Fi and Router Module

Reboot Wi-Fi and Router Module should not restore to default. iptables rules , SSID should not restore

to default.

 

 

RESTORE Wi-Fi SETTINGS:

To Click Troubleshooting->Reset/Restore Gateway->Press “Restore Wi-Fi Settings” to activate your Gateway Default Settings for Wi-Fi only

Only your Wi-Fi Settings will be lost. In WebUI Restored default Wi-Fi configuration

Just restore Wi-Fi module settings to default

 

RESTORE FACTORY SETTINGS :

To Click Troubleshooting->Reset/Restore Gateway->Press “Restore Factory Setting” to activate your Gateway Default Settings.

All your previous settings will be lost. Default Settings Activated after Reboot Emulator

Reboot and restore all settings to default with password and iptables rules to default.

1.5.19      Testing WebPA in Emulator

Websocket based protocol hence bi-directional asynchronous communication is possible between gateway and WEBPA Server in real-time. This is similar to SNMP-PA and TR069-PA.

Cloud PA will be implemented as a RDK-B component which would register with RDKB-CR (Component Registry). Server PA would act like an interface between Cloud UI and RDK-B stack for faster real time communication. Persistent websocket connection is established between Cloud PA and Server PA during the client boot up. This would eliminate initial connection handshake overhead but would have an impact on the scalability aspects on the server side.

Data communication and messaging format will be based on JSON format.

1.5.19.1.1      Prerequisites for WebPA Testing:

 

  • Secret token generation Steps
  1. Download POSTMAN from below link as per your system OS:

https://www.getpostman.com/

  1. Open Postman and get secret code everyday by running below query with get command as below:

In Header tab give your X-client-Id and X-client-Secret(which will be generated once you get approval by clicking generate secret in SAT request page).

 

Give query as https://sat-prod.codebig2.net/getSAT and click send .

 

After send it will generate secret token as below:

 

3. Copy only highlighted part(secret Token).

4.Click on the + tab for new query for Get/Patch

5.Add your query as below in highlighted field:

6. Then click on Headers field and Authorization header as below :

In Value field of Authorization header, Add Bearer secret_token generated above.

7.Then click send.

8.You should get output as below:

 

1.5.19.1.2      Testing Procedure in console

 

         Below data needs to be furnished in the Curl Get & Set commands

 

URL: https://api.webpa.comcast.net:8090                  

               MAC: 080027D7C5A7 (eth0 MAC of Emulator)

               SECRET TOKEN: Needs to be generated on daily basis from SAT Portal

 

GET Command Example: Get Request in Console to get RadioNumberofEntries

Curl -X GET   'URL/api/v2/device/mac:DEVICE MAC/config?names=Device.WiFi.RadioNumberOfEntries' -H 'authorization: Bearer SECRET TOKEN'

 

 

Output Of the above command in Console

 

{"parameters":[{"name":"Device.WiFi.RadioNumberOfEntries","value":"6","dataType":2,"parameterCount":1,"message":"Success"}],"statusCode":200}

 

GET Request Console Screenshot:

SET Command Example : Set Request in Console to set Wifi SSID for Privatewifi 2.4Ghz

1. curl -X PATCH     URL/api/v2/device/mac:DEVICE MAC/config -d '{"parameters": [ {"dataType": 0, "name": "Device.WiFi.SSID.10001.SSID", "value": "Testing"}]}' -H 'authorization: Bearer      SECRETTOKEN'                                                                                                                                                                                                                                                                                  2. curl -X PATCH     URL/api/v2/device/mac:DEVICE MAC/config -d '{"parameters": [ {"dataType": 3, "name": "Device.WiFi.Radio.10000.X_CISCO_COM_ApplySetting", "value": "true"}]}' -H 'authorization: Bearer SECRET TOKEN'      

 

Output of the above command in Console :

:{"parameters":[{"name":"Device.WiFi.SSID.10001.SSID","message":"Success"}],"statusCode":200}                          2. {"parameters":[{"name":"Device.WiFi.Radio.10000.X_CISCO_COM_ApplySetting","message":"Success"}],"statusCode":200}

SET Request Console Screenshot:

 

1.5.20      Bluetooth Functionality support

 

The Bluetooth in RDK-B Emulator supports the use cases of pairing, file transferring with mobile devices and scanning the neighbor available Bluetooth devices. The Bluetooth utilities are provided by bluez5 components through which the functionalities shall be validated using the command line terminal in Emulator.

 

 

 

 

 

 

 

 

                               

 

 

 

Picture:  System Diagram showing Bluetooth connectivity

Below is the required testing information to validate the Bluetooth functionality in Emulator.

1.5.20.1.1                  Bluetooth Dongle Information:

 

  • Bluetooth Dongle Url:

      https://www.amazon.in/dp/B0117H7GZ6/ref=pd_lpo_sbs_dp_ss_1?pf_rd_p=cd818f9c-142a-4b42-ad2c-f0421857aaf5&pf_rd_s=lpo-top-stripe&pf_rd_t=201&pf_rd_i=B00WCXUV5M&pf_rd_m=A1VBAL9TL5WCBF&pf_rd_r=KR3XDY19FV8PGBVR3S9F&pf_rd_r=KR3XDY19FV8PGBVR3S9F&pf_rd_p=cd818f9c-142a-4b42-ad2c-f0421857aaf5

  • Dongle Info:
    1. Please check the dongle using the below command in Emulator
    2. root@qemux86/#lsusb

Bus 003 Device 027: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

 

 

 

 

 

 

 

1.5.20.1.2                  Bluetooth VB Settings:

In VB, please select the “Settings -- > USB -- > USB Device Filters -- > 0001 Cambridge Silicon Radio, Ltd CSR8510 A10 [8891]”

1.5.20.1.3                  Bluetooth Dongle Detection in Emulator:

The below command shows the Bluetooth dongle detection in Emulator, by default the dongle status would read as in UP state.

In General, the hciconfig command is used to configure the Bluetooth and displays the basic info of the same.

root@qemux86broadband:/# hciconfig -a

 

 

1.5.20.1.4                  Bluetooth Scanning in Emulator:

The “hcitool”   is used to configure Bluetooth connections and send some special command to Bluetooth devices

root@qemux86broadband:/# hcitool scan

 

 

1.5.20.1.5                  Bluetooth Pairing in Emulator:

 

Automation Pairing:

  1. Please execute the script present in the path ~/lib/rdk/bluetooth_pairing.sh
  2. To pair a client device please run the script as follows
    1. root@qemux86broadband:/lib/rdk# ./bluetooth_pairing.sh <client device MAC address>

 

 

Manual Pairing:

  1. The bluetoothctl utility is used to pair a client device with Emulator
  2. To pair a client device please run the below commands
    1. root@qemux86broadband:/# bluetoothctl
    2. [bluetooth]# power on
    3. [bluetooth]# default-agent
    4. [bluetooth]# discoverable on
    5. [bluetooth]# pairable on
    6. [bluetooth]# scan on
    7. [bluetooth]# scan off (scan can be made off once the required client device detection occurs )
    8. [bluetooth]# pair <Client device MAC address>
    9. [bluetooth]# trust <Client device MAC address>
    10. [bluetooth]# info <Client device MAC address>

 

 

 

 

 

1.5.20.1.6                  Bluetooth File Transfer in Emulator:

 

File Transferring:

  1. Please execute the script present in the path ~/lib/rdk/bluetooth_send_files.sh
  2. To transfer files to client device please run the script as follows
    1. root@qemux86broadband:/lib/rdk# ./ bluetooth_send_files.sh <client device MAC address> <Path of File>

 

 

 

 

 

 

 

 

For Receiving the files from any client device to emulator the files will be stored by default in the the root path /bluetooth

 

 

 

 

 

1.5.21      Lost and Found feature support

 

Lost and Found feature in Emulator supports pairing of RDK-V Media client devices with Emulator’s WiFi using LNF SSID. To connect Media Client devices to LNF SSID, We will be using LNF Test certificates for Emulator.

1.5.21.1.1      Requirements:

 

               5GHz TP-Link Dongle -- 2 Nos

Pace-Xi5 -- 1 Nos

 

1.5.21.1.2      LNF Test Bed Setup:

 

 

 

1.5.21.1.3      Procedure to obtain LNF Test Certificates:

 

Raise a JIRA ticket for PACEXi5 project to obtain LNF Test Certificates as below for example:

https://ccp.sys.comcast.net/browse/PACEXI5-2632?filter=-2

These certificates will be shared in Comcast OneDrive (Previously Comcast Box App) as these are not encrypted. Download these certificates and place them in Emulator as mentioned in below test procedure.

1.5.21.1.4      Testing procedure:

 

  1. Before boot up, insert a single Wi-Fi dongle 5GHz in the host PC where the emulator runs
  2. Once you get the console root prompt, after say some 20 to 30 secs insert another Wi-Fi dongle 5GHz
  3. In the Virtual Box, select the device tab in top of the VB console and then choose USB

             Device --- > USB --- > Realtek driver

  1. In the console root prompt, check for the wlan1 interface up by giving the “ifconfig” command
  2. Place the test certificates in the path “/tmp/lnf/certs”.
  3. In /etc/lnf/authserver.conf, edit the following lines according to the test certificates received

             ca_cert=/tmp/lnf/certs/ca-chain.cert.pem

             server_cert=/tmp/lnf/certs/radiussrv.cert.pem

             private_key=/tmp/lnf/certs/radiussrv.key.pem

 

  1. Starting the radius server and client:

             Start the radius server and client by executing the command “sh /lib/rdk/lnf.sh”

             To confirm this please check with the commands:

  • iwconfig wlan1 ---- > check for the essid name
  • ifconfig wlan1  ----- > check for the running label
  • systemctl status radiusauthd --- > should be active (running status)

 

  1. To Confirm Media Client is connected to Private SSID using LNF SSID, Please check following:

wl status

ifconfig wlan0_0

 

 

 

1.6         RDK-B Emulator for Developers

Emulator for developers feature supports the developer to build the CCSP or open source components in the emulator itself. The dev image of emulator is bundled with the meta-toolchains, dev tools for the build process of any component.  Thus any component can be built and run in the emulator since the emulator provides the support of both compile time and run time environment.

 

An emulator broadband dev image needs to be created by the developer by following the below steps (1.6.1) and shall be deployed in the Virtual Box to bring up the Emulator. Alternatively the emulator broadband dev image shall be directly fetched from the Jenkins build portal, in this case the developer need not to access the open stack –Vms or any host machine for the build process.

 

Thus this features eases the way of development & testing by providing an integrated approach in the emulator

 

1.6.1          Generation of Workspace & Vmdk Image

 

  • Below are the steps are the steps to generate the vmdk dev image.
    • repo init -u ssh://gerrit.teamccp.com:29418/rdk/yocto_oe/manifests/rdkemulator-manifest -b master -m rdkemulator.xml -g all
    • repo sync
    • source meta-rdk/setup-environment

meta-rdk-bsp-emulator/conf/machine/qemuarmbroadband.conf  5) openembedded-core/meta/conf/machine/qemuarm.conf

meta-rdk-bsp-emulator/conf/machine/qemux86broadband.conf  6) openembedded-core/meta/conf/machine/qemux86-64.conf

meta-rdk-bsp-emulator/conf/machine/qemux86hyb.conf        7) openembedded-core/meta/conf/machine/qemux86.conf

meta-rdk-bsp-emulator/conf/machine/qemux86mc.conf

 

  • Please enter your choice of machine [1..7]: 2
  • bitbake rdk-generic-broadband-dev-image

 

  • The Vmdk image shall be found in the below path
    • build-qemux86broadband/tmp/deploy/images/qemux86broadband/rdk-generic-broadband-dev-image-qemux86broadband.vmdk

1.6.2          Jenkins Build

  • Instead of building the development image from the open stack-VM machine or any host machine alternatively the dev image can be fetched from the Jenkins build portal

 

  • The development broadband image “rdk-generic-broadband-dev-image-qemux86broadband” has been coupled with the nightly build “X86EMLTRBB-Yocto-Build” job

 

 

1.6.3          Virtual Box Setup Preparation

  • Creation of Instance Name & OS Type, Versions in VB

 

  • RAM Memory selection

It’s better to have the maximum amount of supported RAM for the build process which is to be carried in the dev image.

 

  • Vmdk Dev Image selection
    • Copy the build-qemux86broadband/tmp/deploy/images/qemux86broadband/rdk-generic-broadband-dev-image-qemux86broadband.vmdk from open stack PC to Host system
    • Choose the image as show below

 

     

 

  • Network settings in VB
    • For eth0 wan interface support

 

 

  • For LAN clients through USB->Ethernet adapter support

 

 

  • For Wireless clients through USB Wi-Fi adapter support

 

 

1.6.4                    Git configuration in Emulator

 

  • Create a file netrc in the home directory
    • vi  ~/.netrc

   machine gerrit.teamccp.com login xxxxx password xxxxx

   machine nexus.teamccp.com login  xxxxx password xxxxx

   machine code.rdkcentral.com login xxxxx password xxxx

  •    Create git config .gitconfig in the home directory
    • git config --global user.email you@example.com
    • git config --global user.name "yourname"

   cat ~/.gitconfig  ---> should ideally look like below

   [user]

           name = yourname

           email = you@example.com

   [color]

           ui = auto

   [review "https://gerrit.teamccp.com"]

           username = yourname

   [http]

           sslverify = false

   [gitreview]

          username = yourname

 

1.6.5                    Build Steps in Emulator

 

  • The script “build_ccsp_devscript.sh” in the path /lib/rdk will be used to build the ccsp components
  • Below shows the usage build_ccsp_devscript.sh

 

 

 

 

 

 

 

 

 

 

 

  • Building an CCSP Component :
    • sh build_ccsp_devscript.sh rnarayanan ccsp-commonlib

  • An Workspace would be created in the path
    • “/build-qemux86broadband/source/ccsp-commonlib”
  • Final images would be generated in the path
    • “/build-qemux86broadband/source/ccsp-commonlib/image”

 

 

 

 

 

 

 

 

  • No labels