
You are here: MyURC.org > Tools & Prototypes > UCHj > Installation Notes
UCHj - Installation Notes
Page Contents:
Introduction
Trace UCHj is a control hub implementation for a closed home/office network. It consists of the following components:
- A core UCH module.
- Target Discovery Modules (TDMs) that take care of discovering and discarding target devices as they come on and go off the network.
- Target Adapters (TA) for connecting to any controllable (IR, Serial, Relay, LAN, etc.) target device or service in the network.
- User Interface Protocol Modules (UIPM) that can be created as per client-side user interface protocol requirements. UCHj comes with a basic UIPM for the URC-HTTP protocol.
The UCHj Web Archive can be easily deployed on any Server supporting Java e.g. Apache Tomcat and JBoss. Also, because of the nature of Java code running on JRE, UCHj can run on any OS for which JRE is available e.g. Windows, Linux, Mac.
UCHj Installation
UCHj uses Apache Tomcat 6.0+ as host Server Container. First download Apache Tomcat 6.0+ (available at http://tomcat.apache.org/) and install it.
- Modifications in Apache Tomcat configuration:
- Modify the port from 8080 to 80 in [TOMCAT_HOME]/conf/server.xml,
as follows:
Original -
<Connector port="8080" maxThreads="150" minSpareThreads="25" maxSpareThreads="75"enableLookups="false" redirectPort="8443" acceptCount="100"connectionTimeout="20000" disableUploadTimeout="true" />Modified -
<Connector port="80" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" /> - Add to [TOMCAT_HOME]/conf/web.xml within the <web-app> node,
and after the other <mime-mapping> elements, as follows:
<mime-mapping> <extension>td</extension> <mime-type>application/urc-targetdesc+xml</mime-type> </mime-mapping> <mime-mapping> <extension>uis</extension> <mime-type>application/urc-uisocketdesc+xml</mime-type> </mime-mapping> <mime-mapping> <extension>pret</extension> <mime-type>application/urc-pret+xml</mime-type> </mime-mapping> <mime-mapping> <extension>rsheet</extension> <mime-type>application/urc-ressheet+xml</mime-type> </mime-mapping> <mime-mapping> <extension>rdir</extension> <mime-type>application/urc-resdir+xml</mime-type> </mime-mapping>
- Modify the port from 8080 to 80 in [TOMCAT_HOME]/conf/server.xml,
as follows:
- Copy bin/UCH.war to the [TOMCAT_HOME]/webapps directory of your Apache Tomcat installation.
- Restart Tomcat, so that the WAR (Web Archive) unpacks itself. On Linux, sometimes 'shutdown.sh' does not work, instead one has to look at processes using: 'ps -ax | grep java' and then kill the relevant Tomcat Java process.
- Change the following in [TOMCAT_HOME]/webapps/UCH/WEB-INF/web.xml
- UCHj detects the IP address of the machine on which it is running,
but in certain special cases depending on the setup of the machine,
one might have to setup the IP for UCHj manually. So if needed, then
setup the fixed IP for UCHj by modifying the following uncomment XML
tag in web.xml and enter a static IP address:
<context-param> <param-name>ipAddress</param-name> <param-value>192.168.0.10</param-value> </context-param>
For changed Log mode, Modify [Level] to numeric value, e.g.:
- 0 meaning OFF - No logging.
- 1 meaning SEVERE - Only log Severe events.
- 2 meaning WARNING - Only log Warning level events + Severe events.
- 3 meaning INFO - Heavy logging needed for debugging Informative
Logging + Warning events + Severe events.
<context-param> <param-name>debugLevel</param-name> <param-value>[Level]</param-value> </context-param>- If you made any changes in web.xml, restart Tomcat Server to apply the changes to the UCH.
- UCHj detects the IP address of the machine on which it is running,
but in certain special cases depending on the setup of the machine,
one might have to setup the IP for UCHj manually. So if needed, then
setup the fixed IP for UCHj by modifying the following uncomment XML
tag in web.xml and enter a static IP address:
- For checking which Compatible UIs are available, browse from your Web
browser to: http://192.168.0.10/UCH/GetCompatibleUIs.
NOTE: Replace "192.168.0.10" with the IP address of your computer that runs the UCH. - For testing with the Webclient, browse to: http://192.168.0.10/UCH/webclient/index.html. Note that Webclient does not support all types of sockets.
Developer Notes
UCHj Compilation
You might have to compile UCHj for your own development of UCHj. For further instructions on UCHj compilation, please refer to ANT Usage.
UCHj Configuration
UCHj modules are configured via a configuration file. Please refer to UCHj Configuration.
Module Development for UCHj
For further instructions on extending UCHj, the following documents may be useful:
- For building a new TDM (Target Discovery Manager), please refer to How to write a TDM.
- For building a new TA (Target Adapter), please refer to How to write a TA.
- For building a new UIPM (User Interface Protocol Module), please refer to How to write a UIPM.
Generic Target Adapter Module
UCHj contains a Generic Target Adapter, which has the capability to generate simulated Targets which can be used for testing Controllers. For adding a new simulated Target, please refer to Generic Target Adapter Readme.
Global Cache GC-100 Target Discovery Module
Trace UCHj provides a TDM for devices connected to the Global Cache GC-100 Network Adapters. Currently only IR and Serial devices are tested. For configuring your GC-100 with UCHj and adding devices, please read GC100-Tutorial.
Trouble Shooting
If discovery of targets doesn't work:
- Check if TOMCAT is running. If you direct your browser to http://192.168.0.1/, the Tomcat server
page should appear. (Replace "192.168.0.1" with the ip address of your
computer.)
- If TOMCAT is not running, check if any other program is occupying port 80. For example, Skype may occupy port 80 for incoming connections. Make sure that in Skype the option "Use port 80 and 443 as alternatives for incoming connections" is unchecked (under "Tools > Advanced > Connections").
- Check if the targets are advertised in the UCH's UIList, by going to http://192.168.0.1/UCH/GetCompatibleUIs.
- Check if the IP address advertised as URIs in the UIList is the right one for your network. If you have multiple networks going, e.g. an internal network for synchronizing your PDA, the IP address for this internal network may get advertised by the UIList. In this case you need to close the internal network and make sure there is only one network running.
- Make sure that your personal firewall does not block Tomcat or the servlet. (Tomcat is using port 80 for HTTP, and the UCHj servlet is using other ports for a update channels according to URC-HTTP protocol.) It is recommended that you launch Tomcat directly by starting the executable file (e.g. "tomcat6.exe" in TOMCAT_HOME/bin), which will possibly allow you to unblock the ports in your firewall application that the servlet is using.
- If Windows Media Player (UPnP MediaServer) does not show up in UPnP
Entertainment System sockets, then it might be that 'Media Sharing' is
not enabled in Windows Media Player. For enabling sharing, open up
Windows Media Player and select 'Media Sharing' under 'Library'. You can
do one of the following:
- Enable the 'Share my media to:' and then you can Allow devices to access the library. UCH shows up as 'Unknown Device', hence you have to allow by selecting that device.
- If you wish to share the library without any restrictions, then in 'Media Sharing' select 'Settings' and enable 'Allow new devices and computers automatically'.
Also please see the troubling shooting sections of the targets and client applications you are using, including:
- Satellite Box Applet trouble shooting
- DragIt trouble shooting
- PlayIt trouble shooting
- Webclient trouble shooting
Last update: Gottfried Zimmermann, Parikshit Thakur, 2008-11-17