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.
The equipment listed below is required for complete functionality of the standalone environment.
Raspberry Pi 2 or Raspberry Pi 3 device
Standard USB keyboard
Television set/monitor with HDMI input.
- HDMI Cable
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)
Connect TV/Monitor to HDMI Video Output.
Connect Ethernet cable to ETH port.
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.
Connectivity to Internet is required so that the client connected can access the internet via RDK-B gateway.
Connect USB-Ethernet adapter to one of the USB slots present in Raspberry Pi.
Connect Ethernet cable from USB-Ethernet adapter to the client device/machine.
Insert the SD card into Micro SD Card Slot.
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.
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:
- Two Package group recipes in "meta-rdk/receipes-core/packagegroups/" are used for adding required RDK-B components and Open Source components.
Open Source components such as dnsmasq, iptables, wireless-tools, etc. will be added to this package group recipe
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
Raspberry Pi specific changes for the RDK-B components are done in recipe files as below.
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:
- 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.
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
Steps to boot Raspberry Pi with RDK-B image:
- Insert the micro SD card with the flashed RDK-B image in the SD card slot of Raspberry Pi board
- Connect a keyboard to one of the USB port of Raspberry Pi board
- Using HDMI cable connect the Raspberry Pi board to TV/monitor
- Connect an Ethernet cable to Raspberry Pi board
- Plug in the power cable to boot up the Raspberry Pi device
- After booting, you will be prompted with a login.
- Type “root” when the login prompt is displayed
- Once powered on, RPI should be able to list interfaces erouter0,brlan0 and wlan0 after boot up
- Logs can be verified under /rdklogs/logs folder
- Now, client pc should be able to get private ip in the rage 10.0.0.x range
- Two radios are supported by RPI (2.4 and 5 GHz) respectively.
- By default following SSID's are broadcasted by RPI under respective radio.
13. Also, by default when RDK-B CCSP components will be up.
Device parameters can be queried as below via Dmcli
$ dmcli eRT getv Device.
$ dmcli eRT getv Device.WiFi.
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 to launch the Xfinity home page.
WebUI From WAN Side:
http://<WAN IP Address of RaspberryPi>:8080
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.
For further information on RaspberryPi please refer : RDK-B RaspberryPi