RDK Resources

[*ASP Wiki*]

Code Management Facility

Code Releases

RDK Forums

[RDK Conferences]

RDK Support

Archives

Papers & Presentations Archive

In the News!

Skip to end of metadata
Go to start of metadata

Introduction

Raspberry Pi series are low cost credit card sized single board computers. The Raspberry Pi models feature a Broadcom SoC that includes an ARM CPU and an on chip graphics-processing unit (GPU). Raspberry Pi uses SD card that facilitates users to swap out different versions of the operating system or software updates, hence, speeding the development and testing process. This is a great way to develop new applications/software and show these to customers in remote locations or at trade shows. 

The RDK-B gateway stack runs on the Raspberry Pi 2 and 3 devices and provides all the features of gateway.

This document contains set-up and other information to run the RDK-B gateway stack on a Raspberry Pi 2 and Raspberry Pi 3 devices.

Setup

Hardware Requirements

The equipment listed below is required for complete functionality of the standalone environment.

  1. Raspberry Pi 2 or Raspberry Pi 3 device

  2. Standard USB keyboard

  3. Television set/monitor with HDMI input.

  4. HDMI Cable
  5. Ethernet cables

  6. USB-Ethernet Adapter

  7. Micro SD Card(8 GB)

Ubuntu 12.04/14.04 Host Machine
Wi-Fi Dongle (For Raspberry Pi 2)
Bluetooth Dongle (For Raspberry Pi 2)

System Set-up

  1. Connect TV/Monitor to HDMI Video Output.

  2. Connect Ethernet cable to ETH port.

    1. The other end of the Ethernet cable should be connected to the network where DHCP server is running so that the Raspberry Pi device gets assigned an IP address on boot-up.

    2. Connectivity to Internet is required so that the client connected can access the internet via RDK-B gateway.

  3. Connect USB-Ethernet adapter to one of the USB slots present in Raspberry Pi.

  4. Connect Ethernet cable from USB-Ethernet adapter to the client device/machine.

  5. Insert the SD card into Micro SD Card Slot.

  6. Connect Power cable to Micro USB power Input.

Install Ubuntu on a desktop. This is one time setup for downloading & building Raspberry Pi RDK-B source code on a standalone machine.

Host Setup

Refer the RDK-B (Raspberry Pi) Build Instructions section for Host Setup, the essential packages needed for a supported Ubuntu or Debian and Repo setup.


Porting RDK-B to Raspberry Pi

  • Below listed RDK-B Components have to be ported on Raspberry Pi:
    • CcspPsm
    • CcspCr
    • Utopia
    • CcspCommonLibrary
    • CcspPandM
    • CcspLMLite
    • CcspWifiAgent
    • CcspCMAgent
    • CcspDmCli
    • CcspMisc
    • Webui
    • CcspEPONAgent
    • CcspMoCA
    • CcspHomeSecurity
    • CcspMtaAgent
    • CcspSnmpPa
    • CcspTr069Pa
    • CcspXDNS
  • Two Package group recipes in "meta-rdk/receipes-core/packagegroups/" are used for adding required RDK-B components and Open Source components.
    • packagegroup-rdk-oss-broadband.bb
      Open Source components such as dnsmasq, iptables, wireless-tools, etc. will be added to this package group recipe
    • packagegroup-rdk-ccsp-broadband.bb
      RDK-B components such as CcspPandM, CcspPSM, CcspWifiAgent, etc. will be added to this package group recipe

      Above package groups recipe files will be included in the broadband image recipe file, which will be used for building RDK-B final image rdk-generic-broadband-image.bb

  • Enabled Raspberry Pi specific MACROS in meta-cmf-raspberrypi/recipes-ccsp/ccsp/ccsp_common_rpi.inc file.

  • Raspberry Pi related changes for RDK-B CCSP components should be implemented under “_PLATFORM_RASPBERRYPI_” macro

    #ifdef _PLATFORM_RASPBERRYPI_ {
    ...
    }
    #endif
  • Raspberry Pi specific changes for the RDK-B components are done in recipe files as below.
    For Example:

    do_install_append_rpi () {
    ...
    }
    do_configure_append_raspberrypi () {
    ...
    }
    FILES_${PN}_append_rpi = “ \
    ...
    ...
    “
  • Machine configuration is added to set machine configuration in build system.

    meta-raspberrypi/conf/machine/raspberrypi2.conf for Raspberry Pi 2
    meta-raspberrypi/conf/machine/raspberrypi3.conf for Raspberry Pi 3

    SoC Related configuration file is:
    meta-raspberrypi/conf/machine/include/rpi-base.inc

  • For any driver(Wi-Fi dongle) modules to be added for build with yocto, add a new recipe file which builds the driver, inside meta-rdk folder.

  • Component specific HAL APIs should be defined properly based on the architecture such as arm, mips, pc, etc. HAL APIs, which are referring from the data model should be defined and return the valid value.

  • Below WiFi HAL APIs need to be modified specific to Raspberry Pi 2 device for interacting with WiFi driver. 

    INT wifi_getSSIDName(INT apIndex, CHAR *output_string)
    INT wifi_setSSIDName(INT apIndex, CHAR *ssid_string)
    INT wifi_getApSecurityPreSharedKey(INT apIndex, CHAR *output_string)
    INT wifi_setApSecurityPreSharedKey(INT apIndex, CHAR *preSharedKey)
    INT wifi_getRadioChannel(INT radioIndex,ULONG *output_ulong)
    INT wifi_setRadioChannel(INT radioIndex, ULONG channel)

Building

Refer RDK-B (Raspberry Pi) for Build Instructions


Image Flashing on SD Card


  • Install “GParted Partition Editor” tool on Linux PC from Ubuntu Software Center.
  • Insert a SD card through a card reader to a Linux PC. Format the SD card using “GParted Partition Editor” tool so that a single "unallocated" chunk of memory is created on the SD card following the below steps:
    • Open “GParted Partition Editor” tool and select sdcard(/dev/sdb) from top right corner
    • Unmount and delete all existing sdcard partitions (Select the partition->Right click -> Unmount/Delete)


  • Click on the green colour tick icon in the “GParted Partition Editor” tool to apply all the operations. After applying, the tool will display a single unallocated partition as below



  • Flash the image to the sdcard as below: 

    $ cd <workspace dir>/<build dir>/tmp/deploy/images/<raspberrypi rdk broadband dir>
    $ sudo dd if=<rpi-sdimg> of=/dev/sdb


Basic Configuration

Steps to boot Raspberry Pi with RDK-B image:

  1. Insert the micro SD card with the flashed RDK-B image in the SD card slot of Raspberry Pi board
  2. Connect a keyboard to one of the USB port of Raspberry Pi board
  3. Using HDMI cable connect the Raspberry Pi board to TV/monitor
  4. Connect an Ethernet cable to Raspberry Pi board
  5. Plug in the power cable to boot up the Raspberry Pi device
  6. After booting, you will be prompted with a login.
  7. Type “root” when the login prompt is displayed
  8. Once powered on, RPI should be able to list interfaces erouter0,brlan0 and wlan0 after boot up 
  9. Logs can be verified under /rdklogs/logs folder 
  10. Now, client pc should be able to get private ip in the rage 10.0.0.x range
  11. Two radios are supported by RPI (2.4 and 5 GHz) respectively.
  12. By default following SSID's are broadcasted by RPI under respective radio.



2.4GHz (Private WiFi)

SSID name - "RPI3_RDKB-AP0"

Password - "rdk@1234"

5 GHz (Xfinity WiFi)

SSID name - "RPI3_RDKB-AP1"

Password - "rdk@1234"

13.  Also, by default when RDK-B CCSP components will be up.

Dmcli

Device parameters can be queried as below via Dmcli

 $ dmcli eRT getv Device.
$ dmcli eRT getv Device.WiFi.


WebUI

WebUi can be accessed by both the LAN clients and from the WAN Side.

WebUI For Lan Clients:
In internet browser on the LAN client/machine give the url http://10.0.0.1 to launch the Xfinity home page.

WebUI From WAN Side:

http://<WAN IP Address of RaspberryPi>:8080
Example: http://192.168.1.35:8080

Login Credentials:
Username: admin
Password: password

Once the login is successful, the user can verify and control various aspects of the Network Connection (like the SSID of the network, password of the network etc.).

LAN clients can access the internet through RDK-B gateway.

Useful Links:

For further information on RaspberryPi please refer : RDK-B RaspberryPi


  • No labels