Interactive Cell Phone Interface to OpenNMS
Subscribe

From OpenNMS

Jump to: navigation, search


Contents

Preparation

  1. Download Sun Java Wireless Toolkit from http://java.sun.com/products/sjwtoolkit/download.html
  2. Install the Sun JWTK
  3. Set the path $WTK_HOME to your WTK installation directory
  4. Install EclipseME, for detail instructions please refer to http://eclipseme.org/docs/installEclipseME.html


OpenNMS Installation

  • Checkout the code:
     svn co http://opennms.svn.sourceforge.net/svnroot/opennms/opennms/branches/gsoc/interactive-cell-phone-interface
  • Go to your local working copy of OpenNMS and build the code:
     ./build.sh install assembly:directory-inline
  • Go to directory target/opennms-1.7.0-SNAPSHOT/bin/ and execute following instructions:
      ./runjava -s
      ./install -disU
      sudo ./opennms start

Invoking REST from browser

  1. Open the browser, access http://localhost:8980/opennms
  2. Login as admin.
  3. Type http://localhost:8980/opennms/rest/notification/admin/list At this point there should be XML response to the browser showing a list of notifications.
  4. To acknowledge a particular notification whose notification ID is NNNN: http://localhost:8980/opennms/rest/notification/admin/NNNN/ack

Invoking REST from JME Client

  1. Import all the projects to Eclipse. For details see here http://www.opennms.org/index.php/Eclipse_and_OpenNMS
  2. Go to Window-> Preferences -> J2ME - > Device Management
  3. Click import
  4. Specify the search directory to your WTK installation directory
  5. Click finish. Several devices should appear on the list.
  6. Right click in the opennms-mobile-client project
  7. Select J2ME-> Convert to J2ME project
  8. Select the MobileClient.java
  9. Right click, Run as emulated J2ME Midlet.
  10. The application should be loaded to emulator.
  11. In the emulator, select CheckNotification menu.
  12. List of notifications will appear on the screen.
  13. Select details of one of the notification will show the description of the notification.
  14. Select acknowledge of one of the notification will acknowledge the notification to the server.