RiExerciser is an xlet with interactive options to demonstrate Home Networking and DVR features of the underlying OCAP stack.  This page describes running RiExerciser on a PC platform to demonstrate the features of the Reference Implementation (RI) .

Quick Start  

If you do not have the RI running on your Windows 7 PC, please refer to the instructions found in Installing the RI.  To learn about the project see OCAP-RI Public.

 A Digital Media Server, a RUI server, and a Digital Media Player automatically are running as part of RiExerciser. For many tests only one PC is needed as it will act as both a server and a player.

 The only configuration is to stipulate which IP address RiExerciser should use. There is no default value.

Setting up RiExerciser

    1. Config Files/Locations

      There are many optional parameters which allow you to modify the choices made by the OCAP stack.  The full list is in the file named:
      "$OCAPROOT/java/src/hn/hn.properties". 

      An important parameter specifies the network interface to use.  It is named "OCAP.hn.multicast.iface" and is set in $OCAPROOT/bin/$OCAPTC/env/final.properties. It has the value of "ethN" where N is a digit. The value of N for a specific interface must be determined through "trial and error" as Windows lists the interfaces to Cygwin in an arbitrary manner. For example, in the interface listing below, the first interface is not necessarily "eth0".      

      $ ipconfig
      
      Windows IP Configuration
      
      Ethernet adapter Local Area Connection:
         Connection-specific DNS Suffix  . : cablelabs.com
         Link-local IPv6 Address . . . . . : fe80::1de2:99c7:d61e:d9ce%10
         IPv4 Address. . . . . . . . . . . : 192.168.0.102
         Subnet Mask . . . . . . . . . . . : 255.255.255.0
         Default Gateway . . . . . . . . . : 192.168.0.1
      Wireless LAN adapter Wireless Network Connection:
         Connection-specific DNS Suffix  . : cablelabs.com
         Link-local IPv6 Address . . . . . : fe80::b152:463e:30ed:da31%9
         IPv4 Address. . . . . . . . . . . : 10.252.1.149
         Subnet Mask . . . . . . . . . . . : 255.255.254.0
         Default Gateway . . . . . . . . . : 10.252.0.1
      Tunnel adapter isatap.cablelabs.com:
         Media State . . . . . . . . . . . : Media disconnected
         Connection-specific DNS Suffix  . : cablelabs.com
      Tunnel adapter Local Area Connection* 11:
         Connection-specific DNS Suffix  . :
         IPv6 Address. . . . . . . . . . . : 2001:0:4137:9e76:829:34af:3f57:ff99
         Link-local IPv6 Address . . . . . : fe80::829:34af:3f57:ff99%31
         Default Gateway . . . . . . . . . : ::
      Tunnel adapter 6TO4 Adapter:
         Media State . . . . . . . . . . . : Media disconnected
         Connection-specific DNS Suffix  . :
      
      

      An example final.properties files is shown below.

      $ cat final.properties
      OCAP.hn.multicast.iface=eth0
      OCAP.xait.ignore=true
      OCAP.hn.server.name=MyTestMachine

      The full list is in the file "$OCAPROOT/java/src/hn/hn.properties".  

    2. Using Custom MPEG-2 Transport Stream videos for playback in RiExerciser (Optional)

      By default, the RiExerciser uses MPEG-2 Transport Stream files located in the $RICOMMONROOT/resources/tunedata directory for broadcast services. However, any MPEG-2 TS files can be used in the RiExerciser. To setup custom videos in the RiExerciser, follow these steps:

      1. Edit $PLATFORMROOT/platform.cfg to include the desired video source(s). See Tuner Support Configuration for details.
      2. Edit $RICOMMONROOT/resources/tunedata/config.properties. The existing file should provide a template for how a channel map should be setup. The following is an example of how a channel with frequency 493 MHz would be setup:

        #Freq=493MHz  QAM=256  ProgramNum=1 Tornado
        gen_channel_freq_0=493000000
        gen_channel_program_number_0=1
        gen_channel_qam_0=16
        gen_channel_name_0=Tornado

        It's important to note that the frequency should match a video source as specified in platform.cfg (see step i. above), and that the arg numbers should start with 0 (i.e, gen_channel_freq_0) and increase from there as more channels are defined.

      3. Start RiExerciser using the -setup option. This will copy the config.properties file to the appropriate directory to be used by the xlet when a channel map is created. If the steps above were done correctly, the RiExerciser should start up playing the first channel defined in the config.properties channel map.

    3. RiExerciser setup

      To execute RiExerciser the first time,  run the shell script named "runRI.sh" found in the "$PLATFORMROOT" directory.

      $ cd $PLATFORMROOT
      $ ./runRI.sh -setup -xlet RiExerciser

      Subsequent runs may use

      $cd $PLATFORMROOT
      ./runRI.sh

      To see all options for runRI.sh enter the "?" parameter.

    4. Terminating

Press ctrl-c in the shell window to terminate.  If you attempt to terminate the emulator window a dialog box will prompt you to enter ctrl-c.

    1. Channel Map for HD Home Run (Optional)

      Pressing the channel up and channel down buttons on the simulator remote control causes RiExerciser to go to the next channel.  But what does "the next channel" mean?  Configuration files specify a channel map for RiExerciser.  If you are using a HD Home Run (HDHR) as the video source then the channel map is specified in the file config.properties.  If you are using the canned videos supplied by RiExerciser then the map is specified by both platform.cfg and config.properties. 

RiExerciser loops canned video as the default video streams. Live cable streams may also be used. Setup is described on
Using HDHomeRun without a cable feed and HDHomeRun Setup

Network Setup

The simplest configuration is a single PC running one RiExerciser. It acts as both a server and player. 

Or, two PCs can be networked together and one act as the server and the other the player. The physical connection may or may not use a switch and rely on link-local IP addresses. Alternatively the PCs may be connected through a hub and DHCP addresses used. 

IP Addresses

RiExerciser should work with either link-local addresses (169.254.xxx.xxx) or DHCP assigned addresses (192.168.xxx.xxx).  It is common for PCs to have more than one network interface. You tell RiExerciser which adapter to use for home networking messages.

In the simplest case two PCs are host to the RI.  One acts as a DMS and the other as a DMP.  Windows assigns link-local addresses to each host.  The connection is an Ethernet cable between the two hosts.

The RI is a DMS supporting third party devices as players

This is a common network configuration for testing.  The router, acting as a DHCP server, assigns IP addresses to the RI host PC and to each of the third party devices, such as gaming consoles.  DLNA messages advertise and discover content on this simple LAN.

Two RI Hosts with two HDHRs for streaming live channels

This is also common network configuration for testing.  The router, acting as a DHCP server, assigns IP addresses to each RI host PC and to each HDHR.    One RI acts as the server and the other as the player.

Using the Menus in RI Exerciser

Navigation and choices in RiExerciser are through its hierarchical menu system. 
Tips: 

  • A common mistake is to press on the menus themselves, as you do in PC applications. Instead, you press buttons on the simulator's remote control. Or, you can usually press the equivalent button on your PC keyboard. 
  • Pressing the "0' button on the remote control will always return you to the previous menu. 
  • Some options will present you with a list of choices, such as media server or content.  It is necessary when selecting from a list to first activate the list. This is done by pressing "Select" on the remote control. You will see the first line in the menu boxed. At this point the up and down arrows on the remote allow you to navigate between choices.  Finally, you leave the dialog box by pressing "Enter" on the keyboard or by pressing "Select" on the remote control when the first item in the list is boxed. When another choices is boxed, it is selected when "Enter" or "Select" is pressed.
  • There is no "Help" feature but questions may be posted to the OCAP RI Forum at http://www.java.net/forums/mobile-embedded/ocap-ri-users

When RI Exerciser starts the first menu choice is between its two functional areas: DVR and Home Networking. Under the DVR menus you may create many types of recordings, play them back and delete them. Under the Home Networking menu you publish contents and, if you are a player, select a server from those found on your network. As a player you can play back content published by a DMS.

Using the RI as a Digital Media Server (DMS)

When the RI starts, a media server with a content server (CDS) and a RUI server are always started. No special configuration is needed to start these servers. However, no content is published automatically. Whenever you restart RiExerciser you must re-publish any content.

Publishing a channel

To publish one of the streams, either one of the looping, canned videos provided by the RI or a stream from HDHR, the navigation sequence is:

  • Display Home Networking Menu
  • HN Server Options
  • Display Publish Channel Menu

...  and a list of optional ways to publish channels is presented. 

Publishing a recording

Create a recording. Starting from the "RIExerciser General Menu", select "Display DVR Menu". Then, select "Start a Recording" and select one of the options for recordings of different lengths.

To publish a recording, start from the initial menu and select "Display Home Networking Menu". Next, select "HN Server Options" since it is the server that publishes content. Select the option "Display Publish Recording Menu". Several options will appear. Choose desired option to publish or unpublish recording(s).

VPOP

View Primary Output Port services and streaming are created automatically by RiExerciser when VPOP is enabled.  To enable VPOP edit $OCAPROOT/bin/$OCAPTC/env/final.properties to include OCAP.hn.server.vpop.enabled=true.

Using the RI as a Digital Media Player (DMP)

Selecting a media server

In order to navigate to the Digital Media Player menu. From the RiExerciser General Menu, select option 2, "Display Home Networking Menu," then select option 2, "HN Player Options." Before searching for content to play (Remote Service, JMF, Live Streaming), a media server must be selected. Select option 1, "Display list of all Media Servers on a network." The list of media servers should look similar to the following: 


Once a media server has been selected, the media server name should be displayed, similar to the following:

Searching vs Browsing

The HN Player Options menu gives the user the choice of either browsing for content or searching for content. The current option is indicated in parenthesis and can be changed by pressing the up/down arrows on the keyboard or the on screen remote control.

Playback  a service

To play content as a Remote Service, choose option 3 from the HN Player Options Menu (Select Remote Service for Playback)

JMF Playback

To play content using a JMF Player, choose option 2 from the HN Player Options Menu (Select Content Item for JMF Playback)

VPOP Playback

To play VPOP content, choose option 4 from the HN Player Options Menu (VPOP Test Menu Page)

Trick Modes

Trick modes can be used with any of the above playback types, but only if the DVR extension is enabled.

Configurations

Number of Tuners

Additional tuners may be added by changing the property RI.Platform.numTuners in the file $PLATFORMROOT/platform.cfg.  Note that testing with more that four tuners enabled may yield unpredictable results.

# The number of tuners (live pipelines) that the platform should provide
RI.Platform.numTuners = 1

Configuring RiExerciser with args in hostapp.properties

###############################################
## Application 1 - RiExerciser
##
## Standard tuning Xlet.  Channel map can
## be specified in a channel file or read
## dynanically from JavaTV.
##
## Args:
##   - config_file -- file with channel definitions
##   - java_tv_channel_map -- define this argument
##     with any value to have the Xlet read the
##     channel map dynamically from JavaTV
###############################################
app.0.application_identifier=0x0000000016001
app.0.application_control_code=AUTOSTART
app.0.visibility=VISIBLE
app.0.priority=200
app.0.application_name=RiExerciser
app.0.base_directory=/syscwd/qa/xlet
app.0.initial_class_name=org.cablelabs.xlet.RiExerciser.RiExerciser
app.0.args.0=config_file=config.properties
#app.0.args.1=local_server_timeout_secs=25
#app.0.args.2=player_timeout_secs=16
#app.0.args.3=hn_action_timeout_ms=30000

Running other xlets at the same time as RiExerciser

The OCAP execution model allows for many xlets to be run simultaneously.  The OCAP diagnostics APIs allow an application to sniff all incoming and outgoing messages from the OCAP stack (if the application has permissions).  An application that echos incoming and outgoing messages at the same time RiExerciser is run uses the following hostapp.properties file.  See:

$OCAPROOT/apps/qa/org/cablelabs/xlet/hn/UPnPDiagnostics

################################################################################
#
################################################################################
###############################################
## Application 0 - UPnPMessageControlXlet
###############################################
app.0.application_identifier=0x000000017202
app.0.application_control_code=AUTOSTART
app.0.visibility=VISIBLE
app.0.priority=220
app.0.application_name=UPnPMessageControlXlet
app.0.base_directory=/syscwd/qa/xlet
app.0.initial_class_name=org.cablelabs.xlet.hn.UPnPDiagnostics.UPnPMessageControlXlet
###############################################
###############################################
## Application 2 - RiExerciser
###############################################
#app.2.application_identifier=0x0000000016001
#app.2.application_control_code=AUTOSTART
#app.2.visibility=VISIBLE
#app.2.priority=200
#app.2.application_name=RiExerciser
#app.2.base_directory=/syscwd/qa/xlet
#app.2.initial_class_name=org.cablelabs.xlet.DvrExerciser.RiExerciser
#app.2.args.0=config_file=config.properties

Windows 7 Configuration

In order to avoid problems discovering the local media server, it is recommended that all Windows Media Center services be disabled. This can be done by going
to Start Menu -> Control Panel -> Administrative Tools -> Services, and then disabling the following: Windows Media Center Receiver Service, Windows Media
Center Scheduler Service, and Windows Media Player Network Sharing Service. A Service can be disabled by right-clicking on the Service name, choosing
Properties, and then choosing "Disabled" from the Startup Type dropdown list.

Running Tests With RiScriptlet

Running our scriptlets

The RiScriptlet tests demonstrate popular home networking features. These tests executes Bean shell scripts to run tests without any manual intervention.  The RiScriplet xlet can be found at:

$OCAPROOT/apps/qa/org/cablelabs/xlet/RiScriptlet

The RiScriplet tests are located in:

$OCAPROOT/apps/qa/org/cablelabs/lib/rxscripts

To run the RiScriplet smoke tests:

> cd $PLATFORMROOT
> ./runRI.sh -xlet RiScriptlet -setup

Manual Home Networking Spreadsheets - Examples of Tests

Many home networking scenarios already have tests designed and test procedures written.  These scenarios are too complicated for simple unit tests.  Often the success of the test depends on inspecting the video.  Test steps are written in spreadsheets grouped by functional areas.  All spreadsheets are included with the OCAP code and may be found at:

$OCAPROOT/apps/qa/hn/HNIntegrationTests

ConnectionStalling.xls - A simple demonstration of this feature

ContentTransformation.xls - Demonstrates format and bitrate transformation of recordings and channels

DIAGE.xls - Demonstrates implemented Ping, Traceroute and NSLookup functionality.

DTCPInitialization.xls - Demonstrates DTCP-IP initialization for various key configurations.

NetAuthorizationHandler2.xls - Demonstrations of enabling and disabling authorizations

OCVET-75PlatformPerformanceTuning.xls - Demonstrates system logging for Performance.Tuning and Performance.ServiceSelection

OCVET-202InterlacedInput.xls - Determines whether input video is interlaced.

OCVET-236LPE.xls - Verifies enabling of energy management within RiExerciser. 

OCVET-255VPOPClarifications.xls - Demonstrates implementation of clarifications to VPOP streaming and service defined in OCVET-255.

ResourceContentionHandler.xls - Scenarios to cause and remedy contention for tuner resources

ServiceResolutionHandler.xls - Scenarios to cause and view the operation of this handler

StreamingAndRecording.xls - Demonstrate creating recordings, playing them over home networking, and using trick modes

ViewPrimaryOutuptPort.xls - Demonstrating the services

UPnP Diagnostics APIs

Load in your own UIs into the RI RUI server

When RiExerciser starts a RUI server is created as well as a Media Server.  Ruis, specified via an xml file, may be offered by the RUI server.  The steps are:

  • Create the xml file describing the RUi services
  • Load the file.  This is not done through the RiExerciser GUi but instead through a scriptlet.
  • In the file $OCAPROOT/apps/qa/org/cablelabs/lib/utils/oad/hn/OcapAppDriverHN.java  see the method named "setUIList(Sting XMLDescription) for an example.

Device Spy as a way to understand the details of DLNA

For more information, see: http://software.intel.com/en-us/articles/intel-software-for-upnp-technology-technology-overview/

Device Spy can invoke services on a DMS. This is a handy way to intervene in the RiExerciser DMS when no RiExerciser interface is available. Device Spy invokes actions on a service by a GUI.  For example, to search through the CDS, here are the steps to take:

  • Start RiExerciser. Populate the CDS with content.
  • From any PC on the same network as RiExerciser start Device spy.
  • Select the OCAP media server from the list of media servers discovered by Device Spy.
  • Click on the plus next to  "um:schemas-upnp-org:serviceContentDirectory:3" in order to drop down the list of services.
  • Double click on "Search(string ContainerID, string Search ....)  Then enter these values to return a full search on the CDS:
    • 0 for ContainerID
    • asterisk  for SearchCriteria
    • asterisk for Filter
  • Results of the search are printed in the "Result" pane of the GUI.

WireShark to monitor messages

For more information, see: http://www.wireshark.org/

A handy command in wireshark is to filter only those messages sent from the DMS. Use the same IP address as was set for the property, OCAP.hn.multicast.iface.  In the filter pane, enter either src for the sender of the message or dst for the destination. 

ip.src == 169.254.115.81
ip.dst == 192.168.0.100
(ip.src == 169.254.115.81) and (ip.dst == 169.254.115.80)

Note the wireshark may reset this filter if you select a message dialog to follow.

Note the RI media server periodically send a series of SSDP NOTIFY messages.

  • No labels