Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

OHF SODA Stepstone

Revision as of 15:01, 19 June 2008 by Lmsurpre.us.ibm.com (Talk | contribs) (Installing The Backend)

Getting Started

The Stepstone Developer Quick Start Guide

Note: If you experience problems with this guide, please check for existing Stepstone bugs . If your problem has not been reported, please open a bug for OHF and assign it to the Stepstone component.

Prerequisites

Java 1.4.2 or above http://java.sun.com/j2se/1.4.2/download.html Eclipse SDK http://www.eclipse.org/downloads/

For Web Services:

For Bluetooth Devices:

Download and Install Device Kit and the Service Activator Toolkit (SAT)

Navigate to the Eclipse Update Manager (Help -> Software Updates -> Find and Install... -> Search for new features to install) and create a New Remote Site for SODA with a URL of http://download.eclipse.org/technology/ohf/soda/dk/update-site/weekly. Select the new site, and proceed to download and install each of the latest SAT and Device Kit features.

Stepstone: The SODA Reference Implementation

Now that you have installed the core components, you are ready to expose service interfaces to a wide variety of devices. The Stepstone subproject is aimed at providing a reference implementation for SODA development. Stepstone features the SODA programming environment for working with devices, an enterprise adapter transport mechanism, and a backend webapp based on Eclipse Equinox for dynamic access to device data.

The Stepstone code is packaged as Eclipse features and can be downloaded and installed directly from the Eclipse Update Manager in much the same way as the SODA core components. [HOW?]

Alternatively, developers wishing to get their hands dirty may opt to download the source from the Eclipse Technology CVS repository. In order to access the repository from Eclipse, switch to the CVS Repository Exploring perspective and create a new location for the eclipse OHF project:

  • hostname: dev.eclipse.org
  • path: /cvsroot/technology

If requested, provide the username “anonymous” and leave the password blank. Stepstone is primarily divided into two separate applications, the edge and the backend. The edge code is designed to run on a device with network connectivity and serves as a gateway for data between the sensor/actuator devices and the backend. The Stepstone backend leverages the Equinox server project to provide a webapp that can be ran in the workspace or built into a .war file and deployed to a standard application server such as Apache Tomcat.

Installing The Edge

Browse to org.eclipse.ohf/plugins/org.eclipse.soda.stepstone/runtime/common and checkout the org.eclipse.soda.stepstone project. This project contains a number of useful launchers and project set (.psf) files. In order to import a project set, switch back to a Java perspective, right-click on the selected .psf file(s) and choose Import Project Set... from the package explorer.

Open the project sets for loading directory and import the following project sets:

  1. stepstone_edge_prereqs.psf
  2. stepstone_edge_core_runtime.psf
  3. stepstone_edge_devices_simulated.psf
  4. stepstone_edge_applications.psf

In order to link the edge to the backend, you must import a set of adapter projects. In its current state, Stepstone contains only one such adapter--a web services adapter implemented using Apache Muse. In order to use the Muse adapter, you must first import the necessary Muse bundles and their prereqs. To do this, unzip the binary Muse release to ${MUSE_HOME} and, from the edge workspace, select File -> Import -> Plug-in development -> Plug-ins and Fragments, click Browse to select a Plug-in Location and browse to ${MUSE_HOME}/lib/eclipse-osgi. Click next and import the following prerequisite plugins:

  • javax.saaj.api
  • org.apache.xalan
  • org.apache.xerces

Follow the same steps to import each of the Muse OSGi bundles from

${MUSE_HOME}/modules/osgi/core and ${MUSE_HOME}/modules/osgi/mini

Alternatively, you could place these bundles in the target platform.

Navigate to the project sets for loading directory in org.eclipse.soda.stepstone once again and this time import:

  1. stepstone_edge_backend_adapter_muse.psf

Because Device Kit does not have native bluetooth support, it is necessary to obtain a bundle which exports javax.bluetooth and javax.microedition.io in order to exercise the bluetooth devices properly. Note that it is sometimes possible to simply use OS-level drivers to expose your bluetooth device as a virtual COM port, eliminating the need for this step. There are a number of freely available javax.bluetooth (JSR-82) implementations for various platforms, including Bluecove for Windows XP (SP2) and Mac OS-X (http://code.google.com/p/bluecove) and AvetanaBluetooth for Linux (http://sourceforge.net/projects/avetanabt).

After downloading the necessary project, you may need to compile the native support for your particular OS/architecture. Once you have created a working jar, wrap this jar in an OSGi bundle by creating a new project with File -> New -> Project... and selecting the Plug-in Development -> New Plug-in from Existing JAR Archives wizard. Use the Add External... button to import the necessary jar file and click next. Name the bundle project, change the target platform to a standard OSGi platform and uncheck the Unzip feature. Click finish and navigate to the Runtime tab of the project's META-INF/MANIFEST.MF file to make sure that it exports the necessary javax.bluetooth and javax.microedition.io packages. It may be necessary to append a "uses" attribute to the javax.bluetooth export. This will tell OSGi bundle to use the javax.microedition.io from this bundle whenever they import javax.bluetooth. On Eclipse 3.3 and later, you may simply click the "Calculate Uses" button from the Runtime tab of the MANIFEST.MF editor.

Next, open the project sets for loading directory from the org.eclipse.soda.stepstone project and import the following project sets:

  1. stepstone_edge_bluetooth.psf
  2. stepstone_edge_devices_real.psf
  3. stepstone_edge_devices_real_xtras.psf

Installing The Backend

If you have not already, import org.eclipse.soda.stepstone from the Eclipse Technology CVS at org.eclipse.ohf/plugins/org.eclipse.soda.stepstone/runtime/common. This project contains a number of useful launchers and project set (.psf) files. In order to import a project set, switch back to a Java perspective, right-click on the selected .psf file(s) and choose Import Project Set... from the package explorer.

Open the project sets for loading directory and import the following project sets:

note: due to bug 231929, if you would like to build/export the backend you will need to download the necessary 3rd party bundles from orbit and install them to your target platform (eg. by dropping into your plugins directory)

  1. stepstone_backend_prereqs.psf
  2. stepstone_backend.psf

note: due to bug 237795, you may see errors in the org.eclipse.soda.stepstone.backend.communications.webservices project. As a temporary workaround, please point your workspace to a 1.4 VM by adding it to the list at Preferences->Java->Installed JREs

Verify that there is no red in your workspace and proceed to build the backend by selecting Run -> External Tools... and running the Stepstone backend build – war - STEP 1 launcher. This launcher will run the PDE -> Export Plugins task and will take a minute or two to complete. When the PDE Export is complete, proceed to run the Stepstone backend build – war - STEP 2 launcher. This launcher results in a new war file named stepstone.war which can be found in the build directory of the org.eclipse.soda.stepstone.build project.

Deploy this stepstone.war to your application server (tested with Tomcat 5.5), and if it is not already running, start the server. After a brief startup period, you should see the OSGi prompt in the console from where you launched the server. Although this getting started guide will not teach you to work with the OSGi console, try typing a couple of common commands such as “ss” (short status) to get a feel for the running system. All bundles should be in a state of RESOLVED or ACTIVE. Open a browser and navigate to http://localhost:8080/stepstone/index in order to see the public view of the backend system.

Alternatively, usually for developement, it is better to launch the Backend Server from Eclipse. Note that in the current implementation it is necessary to run the ant (build.xml) script from the communications.webservices project so that the backend service is compiled into a .aar file for axis2. To run, simply open the run dialog and select the Backend Server equinox launcher. Navigate to the Arguments tab and look at the default VM properties. Validate the runtime bundles and select Run. Please note that the build-service.xml file in the communications.webservices bundle--which is executed in the normal build process--must be run prior to a launch. The target URL will lose the "/stepstone" context so that the default index page is at http://localhost:8080/index.

Putting It Together

You are now ready to run the end-to-end Stepstone solution. Be sure that the backend webapp is running properly and open the Run -> Run... dialog. Select the Stepstone Edge – Simulated Devices – Muse Adapter – Targetable Backend launcher and click Validate Plug-in Set to make sure the bundles are resolved correctly. If there are any problems, click the Add Required Plug-ins button. Next, open the Arguments tab to see some of the System configuration details including the target backend URL, patient Id number, and the local service address. Be sure to edit the backend URL to match the URL of your backend launch from the previous section. After verifying the information, click Run and you should see the simulator devices window open.

After generating a few sample readings, open a browser to the Stepstone backend ( http://localhost:8080/stepstone/index by default). Click on the devices in the left hand menu to make sure the readings appear as expected. You have now finished a complete end-to-end run!

Using Real Hardware

Now that you have successfully ran an end-to-end solution, you are ready to integrate actual devices with the backend system. There are a number of example devices within Stepstone, including:

  • The QK145 Temperature Sensor
  • The A and D Medical UC321 Weight Scale (serial)
  • The A and D Medical UA767 Blood Pressure Cuff (serial)
  • The A and D Medical Bluetooth Weight Scale
  • The A and D Medical Bluetooth Blood Pressure Cuff
  • The Nonin Medical PO4100 Bluetooth Pulse Oximeter

It is usually a good idea to run the exerciser launch profile for your device and take a couple of readings. After seeing that the edge is communicating with your devices properly, run the Stepstone Edge - Real Bluetooth Devices - Muse Adapter - Targetable Backend launcher to integrate the devices with the Backend SOA.

Back to the top