Testing OS-IoT for Linux with Eclipse OM2M

The Eclipse OM2M Version 1.0.0 CSE can be a convenient platform for testing the OS-IoT demonstration application. These instructions can help make initial tests.

Install Eclipse OM2M Version 1.0.0

Create a directory you with to contain Eclipse OM2M. We recommend this is a different directory from (and not contained in) the atis-os-iot directory. Using a web browser, download OM2M version 1.0.0 from https://www.eclipse.org/downloads/download.php?file=/om2m/releases/1.0.0/OM2M-1.0.0.zip. Move the downloaded file in to the directory (the precise nature of these steps will depend on your browser and local configuration). Navigate to the directory in a terminal window and issue the following commands:

# Enter the OM2M directory 
$ cd <Your OM2M Directory Name>
# Install Java $ sudo apt-get update
$ sudo apt-get install java-common default-jre
# Unzip OM2M zip file $ unzip OM2M-1.0.0.zip
# This will create directories called ‘IN-CSE’ and ‘MN-CSE’
# Enter the IN-CSE directory
$ cd IN-CSE
# Make start.sh executable
$ sudo chmod a+x start.sh

Run the Eclipse OM2M IN-CSE Server

# Enter the OM2M directory (skip if already there) 
$ cd [Your OM2M Directory Name]
# Enter the IN-CSE directory (skip if already there)
$ cd IN-CSE
# Run the CSE $ sudo ./start.sh

Once OM2M is running you can view its resource tree by going to the following page in a local web-browser and using the username ‘admin’ and password ‘admin’:

 Test OS-IoT against the Local Eclipse OM2M Server

On the same machine as the OM2M server is running open a new terminal window. Note that no address or credentials need to be specified in these tests as the default values used by the application correspond to a locally running version of OM2M.

# Navigate to the directory containing the osiotcmd executable 
$ cd <os iot directory>

# Retrieve the CSE-Base information from OM2M
$ ./osiotcmd -r
# Create an AE/Container/Content Instance on the CSE
$ ./osiotcmd -c
# At this point you can use the web interface to OM2M to verify the creation of the resources.
# you may need to click on the root of the resource tree on the OM2M web page to force it
# to update.

# Delete the resources previously created
$ ./osiotcmd -d
# You can verify resource deletion on the OM2M web interface.
# you may need to click on the root of the resource tree on the OM2M web page to force it
# to update.

Testing with InterDigital Chordant™ Platform (formerly oneMPOWER)

NOTE: This section does not provide full details of the installation steps and options used. It does provide some notes to help navigate the process and overcome some problems that may be encountered. The Chordant Platform can be run on Ubuntu 64bit. Begin by installing and registering the platform from http://www.chordant.io/ (use the ‘Evaluate Platform’ button). When registered, download the executable “Chordant™ MN-CSE Release 11.0.2 – Ubuntu 14.04 (64 bit)” from https://app.interdigital.com/m2mconfig/downloads#builds. Installation instructions are in the readme. In addition to the installation instructions in the readme you will need to do the following:

$ sudo apt-get install librabbitmq-dev libssl-dev

Further, if you are using Ubuntu version 16 or later you will need to do:

$ sudo ln -s /usr/lib/x86_64-linux-gnu/librabbitmq.so.4 librabbitmq.so.1

Prior to running the platform, update the configuration file (reference provided in the readme). Set the platform to run as an IN (rather than an MN) and configure any other parameters to your preferences. Note details of parameters that must be used to configure the osiotcmd application:

  • Host address and port (default
  • Root CSE-ID
  • Root AE ID to use in ‘From’ parameter (default SAE01 ??)