LAB-6
2024101084- Manik Bansal Room no- 125
2024101091 – Kartik Gupta Table no-30
EXPERIMENT-1:
AIM: Setting up Postman, OM2M Server, and Jupyter Notebook Resources
Introduction:
The Internet of Things (IoT) ecosystem relies on seamless connectivity and interoperability between
devices and applications. OneM2M is a global initiative aimed at establishing standardized protocols
and service functions to enable such interoperability. Eclipse-OM2M is an open-source
implementation of these standards, facilitating device communication over HTTP/HTTPS with JSON
data formatting. In this experiment, the focus is on setting up the necessary software tools—Postman
REST client, OM2M server, and Jupyter Notebook—to construct and observe an OM2M resource
tree, which forms the backbone for subsequent IoT experiments.
Objectives:
To install and configure the Postman REST client for testing RESTful APIs.
To download, configure, and launch the OM2M server.
To set up the Python environment and Jupyter Notebook for interfacing with OM2M.
To create the OM2M resource tree by sending a series of API requests through
Postman and observe the server’s response.
Materials Required:
Software Tools
Postman REST-API Client: For sending HTTP requests.
OM2M Server: Open-source platform to manage IoT resources.
Java – JDK 1.8: Required for running the OM2M server.
Python: For executing scripts in Jupyter Notebook.
Jupyter Notebook: For running the mock device code.
Git Repository: (As referenced in the lab document for necessary files).
Hardware Tools
Laptop/PC: To run the Postman client, OM2M server, and Jupyter Notebook.
Stable Wi-Fi Connection: For network connectivity.
Basic Peripherals: (Keyboard, mouse, etc. as needed for operation).
Procedure:
Installing Postman REST Client
Step 1: Visit the provided download link for Postman.
Step 2: Download the desktop application based on your operating system.
Step 3: Install Postman and launch the application.
Setting Up the OM2M Server
Step 1: Download the OM2M 1.4.1 package from the provided link.
Step 2: Extract the downloaded zip file to access the “in-cse” and “mn-cse” folders.
Step 3: Navigate to the “in-cse/configuration” folder, open config.ini with a text editor, and
change the port number to 5089.
Step 4: Open the command prompt or terminal, verify the Java version with java -version
(ensuring it is JDK 1.8), and run start.bat (or start.sh for Linux/Mac) to launch the OM2M
server.
Step 5: Once the server is running, open a browser and navigate to
http://127.0.0.1:5089/webpage. Log in with the default credentials (username: admin,
password: admin) to view the OM2M resource tree.
Python and Jupyter Notebook Setup
Step 1: Install Python following the instructions provided in the lab document.
Step 2: Create and activate a virtual environment (e.g., using py -m venv <env_name> for
Windows or equivalent commands for Linux/Mac).
Step 3: Install required packages by running pip install -r requirements.txt (or pip3 for
Linux/Mac).
Creating the OM2M Resource Tree Using Postman
Step 1: Open Postman and import the JSON file named “OM2M REST APIs.postman
collection.json” by selecting the “Import” option.
Step 2: With the OM2M server running, send the series of API requests one by one to
construct the resource tree. The typical sequence includes:
1. Creating an Application Entity.
2. Creating a container for the device (e.g., Node-1).
3. Creating a descriptor container.
4. Creating a data container.
5. Creating descriptor and data content instances.
6. Retrieving content instances (latest, oldest, or all) and updating container attributes.
Step 3: Monitor the OM2M server via the web interface to verify that each request updates
the resource tree as expected.
Observations:
Postman Installation: Upon installation, the Postman homepage was displayed, confirming a
successful setup.
OM2M Server Launch: After modifying the configuration file and starting the server, the
OM2M login page appeared at http://127.0.0.1:5089/webpage, and logging in with default
credentials revealed a default resource tree.
Resource Tree Construction: As API requests were sent from Postman, the OM2M resource
tree was updated in real-time. Each API call (e.g., creating an Application Entity, containers,
and content instances) resulted in visible changes in the resource tree, validating the correct
configuration and communication between the Postman client and the OM2M server.
Jupyter Notebook Environment: The Python environment was successfully set up, and the
Jupyter Notebook was ready for further experiments involving data publishing.
Conclusion:
The experiment successfully demonstrated the integration and setup of key IoT tools—Postman,
OM2M server, and Jupyter Notebook. The hands-on process of configuring the OM2M server, setting
up the Python environment, and constructing the OM2M resource tree provided a clear
understanding of how different components in an IoT ecosystem interact. This foundational setup is
critical for subsequent experiments involving data publishing and remote monitoring, ensuring that
students can effectively work with real-world IoT applications.