
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 or 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
Windows Installer
- Windows Installer package, which includes UCHj 2.0 and checking of Tomcat installation, is available on Sourceforge at: http://sourceforge.net/projects/traceurcsdk/
- Also a Video Tutorial is available for guidance on Youtube: UCHj Installer Video
Manual Installation (Mac/Windows/Linux)
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:
- It is advisable (not mandatory) to 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" />NOTE: If other service is running on the port 80 then don't make this configuration. Instead update the value of context-param 'portNo' of web.xml (read tutorial)
- 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>
- It is advisable (not mandatory) to 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.
- Make change UCH configuration as per the UCH Configuration Tutorial. After making changes in web.xml, restart Tomcat Server to apply the changes to the UCH.
- For checking which UIPM Clients are available, browse from your Web browser to: For checking which Compatible UIs are available, browse from your Web browser to: http://[IP Address]/UCH (NOTE: Replace "[IP Address]" with the IP address of your computer that runs the UCH). If Bonjour is installed on your system (which is mostly the case), then browse to http://uch.local./UCH on any PC or phone in your local area network and the home page of UCH will appear.
- For testing with the Webclient, browse to: http://[IP Address]/UCH/Webclient/index.html (or http://uch.local./UCH/Webclient/index.html). Note that Webclient does not support all types of sockets.
- iUCH available on iTunes App Store for iPhone/iPod Touch users is also available to connect to UCH.
UCHj Resources Management
UCH searches TDMs only from local resources. Local resources are available at [TOMCAT_HOME]/webapps/UCH/resources.
UCHj modules are configured via a UCH Configuration File (extension .ucf). Please refer to How to add Local Resource for more information.
When UCH gets request for resource(s) from any of the UCH components then it first searches resource(s) from local resources and then searches the Resource Server.
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.
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.
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/ or http://uch.local./, 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 & Team, 2010-04-30