skip navigation
URC Consortium Logo

You are here: MyURC.org > Tools & Prototypes > UCHe > Installation Notes

UCHe - Installation Notes


Page Contents:


Introduction

Trace UCHe is a control hub implementation in a closed home/office network. It consists of the following components:

  1. A core UCH module.
  2. A Target Discovery Manager (TDM) that takes care of discovering and discarding target devices as they come on and go off the network.
  3. Target Adapters (TA) for connecting to any controllable (IR, Serial, Relay, LAN, etc.) target device or service in the network.
  4. User Interface Protocol Modules (UIPM) that can be created as per client programming protocol requirement. UCHe comes with a basic UIPM for the URC-HTTP protocol.

Trace UCHe binaries come in two packages for two architectures:

  1. ARM
  2. Intel i386

Two packages for each above mentioned architecture are:

  1. UCHe binary with Apache (cross-compiled version).
  2. UCHe binary without Apache.

Note: It is not recommended to install Apache and UCHe on the internal Flash memory of an embedded device such as Kurobox. Instead one should install it on external hard disk or USB drive.

UCHe installation with Apache

When to install UCHe with Apache

General instruction for complete installation

  1. We will describe ARM based UCHe for installation (an analog procedure is to be used for Intel i386 processors).
  2. Fix the IP address of the machine on which UCHe is to be installed.
  3. From the downloaded zip file, copy file bin/armlinux/armUCHeWithApache.tar.gz to the root '/' directory of your ARM Linux machine.

    This package contains the following:

    • /usr/lib/[libraries_required_by_UCHe] (Required libraries are mentioned in 3rd Party Licenses)
    • /usr/local/lib/[libraries_required_by_UCHe] - same libraries as above, just to make sure all libraries come in the System Path.
    • /usr/local/armapache/[Apache_files]
    • /usr/local/armapache/htdocs/[SampleClients_and_TargetDescription_SocketDescription_files]
    • /usr/local/armapache/cgi-bin/[UCHe_TDM_TA_UIPM_libraries]

    Untar the file using the following command:

    tar -xvzf armUCHeWithApache.tar.gz

  4. Choose a Linux user and group for running the Apache web server. We recommend creating a separate user and group for running Apache, but you may also use user "nobody" and group "nobody", if available on your system.
    • Modify the group and owner of the armapache directory on your system, as follows:

      chown -R [username]:[groupname] /usr/local/armapache

    • Set user and group in the Apache configuration file /usr/local/armapache/conf/httpd.conf (default is user "nobody", group "nobody").

      User [Username]
      Group [Groupname]

  5. Set the server's IP address in the Apache configuration file /usr/local/armapache/conf/httpd.conf:

    ServerName [IPAddress]
  6. Make sure file /usr/local/armapache/cgi-bin/uch.config is properly modified as explained in How to Modify UCHe config file.
  7. Start Apache Server to initialize the UCH:

    /usr/local/armapache/bin/apachectl start

  8. For checking which remote control UIs are made available by UCHe, browse from your Web browser to:
    http://[UCH-IPAddress]/UCH/GetCompatibleUIs.
  9. For using the Webclient for controlling targets, browse to:
    http://[UCH-IPAddress]/Webclient/index.html.

UCHe installation without Apache

When to install UCHe without Apache

  1. Your target UCHe platform already has Apache. This might also be a case that you have already installed UCHe with Apache, and you are upgrading UCHe to the latest version.
  2. UCHe with Apache uses Apache 2.2.6. If you absolutely require a different version, then use UCHe installation without Apache. UCHe has no problems with older versions Apache, even Apache 1.3.x can be used for running UCHe.

Installing Apache

For installing your own Apache webserver, please refer to How to Install Apache Server for UCHe.

If you are going to use your previously installed Apache, then make sure it has the following modules installed:

  1. mod_fastcgi
  2. mod_rewrite (comes with the Apache core)

General instructions for UCHe installation into existing Apache installation

  1. We will describe ARM based UCHe for installation (an analog procedure is to be used for Intel i386 processors).
  2. Fix the IP address of the machine on which UCHe is to be installed.
  3. From the downloaded zip file, copy file bin/armlinux/armUCHeWithoutApache.tar.gz to the root '/' directory of your ARM Linux machine.

    This package contains the following:

    • /usr/lib/[libraries_required_by_UCHe] (Required libraries are mentioned in 3rd Party Licenses)
    • /usr/local/lib/[libraries_required_by_UCHe] - same libraries as above, just to make sure all libraries come in the System Path.
    • /usr/local/armapache/cgi-bin/[UCHe_executables]
    • /usr/local/armapache/htdocs/[TargetDescription_and_SocketDescription_files]
    • /usr/local/armapache/htdocs/[SampleClient_files]

    Untar the file using the following command:

    tar -xvzf armUCHeWithoutApache.tar.gz

    If your Apache path is different from /usr/local/armapache/, you will have to copy the above Apache files to your appropriate directory.

  4. Make sure the below settings are correctly configured in the Apache configuration file /usr/local/armapache/conf/httpd.conf:
    • Rewrite rules:
      <IfModule mod_rewrite.c>
      RewriteEngine on
      RewriteRule ^/UCH/GetCompatibleUIs$ /usr/local/armapache/cgi-bin/uche?GetCompatibleUIs
      RewriteRule ^/UCH/GetResources$ /usr/local/armapache/cgi-bin/uche?GetResources
      RewriteRule ^/UCH/GetDocument$ /usr/local/armapache/cgi-bin/uche?GetDocument
      </IfModule>
              
    • FastCGI settings:
      #
      # Mod_fastcgi settings
      #
      <IfModule mod_fastcgi.c>
      FastCgiServer cgi-bin/uche
      </IfModule>
              
    • Script Alias for UCHe:
      #
      # ScriptAlias: This controls which directories contain server scripts.
      # ScriptAliases are essentially the same as Aliases, except that
      # documents in the realname directory are treated as applications and
      # run by the server when requested rather than as documents sent to the client.
      # The same rules about trailing "/" apply to ScriptAlias directives as to
      # Alias.
      #
      ScriptAlias /UCH/ "/usr/local/armapache/cgi-bin/"
    • Server Port:
      #
      # Port: The port to which the standalone server listens. For
      # ports < 1023, you will need httpd to be run as root initially.
      #
      Port 80
              
    • User and Group for webserver (default is user "nobody", group "nobody").
      User [Username]
      Group [Groupname]
              
    • As UCHe will run in a local home/office environment, the Apache ServerName property has to be assigned the IP Address of the machine on which UCHe is installed.

      ServerName [IPAddress]

  5. Make sure file /usr/local/armapache/cgi-bin/uch.config is properly modified as explained in How to modify UCHe config file.
  6. Start Apache Server to initialize the UCH:

    /usr/local/armapache/bin/apachectl start

  7. For checking which remote control UIs are made available by UCHe, browse from your Web browser to:
    http://[UCH-IPAddress]/UCH/GetCompatibleUIs.
  8. For using the Webclient for controlling targets, browse to:
    http://[UCH-IPAddress]/Webclient/index.html.

UCHe Compilation

One might have to compile UCHe in two cases:

  1. UCHe has to be installed on a computer which has an architecture other than Intel or ARM, hence you cannot use the provided binaries and have to compile and install UCHe from scratch.
  2. One wants to add features or resolve bugs in UCHe.

For further instructions on UCHe compilations, please read: "How to Compile UCHe"

Developer Notes

A developer can easily create an environment for development after the above installation is over and you have a running version of UCHe.

For further instructions on extending UCHe, please read:

  1. For building a new TDM (Target Discovery Manager), please refer to How to write a TDM.
  2. For building a new UIPM (User Interface Protocol Module), please refer to How to write a UIPM.
  3. For building a new TA (Target Adapter), please refer to How to write a TA.
The current version of UCHe includes the following as samples:
  1. UPnP Target Discovery Manager (TDM). It discovers all UPnP Devices in the network.
  2. URC-HTTP User Interface Protocol Module (UIPM) is the basic protocol for UCH, using which a client can communicate with any device.
  3. SatelliteBox Target Adapter (TA).

Last updates: Gottfried Zimmermann, Parikshit Thakur & Team, 2008-12-03

This site is maintained by the University of Wisconsin Trace Center, a member of the Universal Remote Console Consortium.