Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "OM2M/one/Configuration"
(Created page with "__TOC__ == Server (IN-CSE) configuration == * Go to the IN-CSE product directory: "om2m/org.eclipse.om2m/org.eclipse.om2m.site.in-cse/target/products/in-cse/<os>/<ws>/<arch>"...") |
|||
Line 61: | Line 61: | ||
| org.eclipse.om2m.dbReset || MN-CSE Database reset when starting || true | | org.eclipse.om2m.dbReset || MN-CSE Database reset when starting || true | ||
|- | |- | ||
− | | org.eclipse.om2m.cseBaseId|| | + | | org.eclipse.om2m.cseBaseId|| MN-CSE cseBase resource id|| mn-cse |
|- | |- | ||
| org.eclipse.om2m.cseBaseName || MN-CSE Base Name || mn-name | | org.eclipse.om2m.cseBaseName || MN-CSE Base Name || mn-name |
Revision as of 07:12, 16 December 2015
Contents
Server (IN-CSE) configuration
- Go to the IN-CSE product directory: "om2m/org.eclipse.om2m/org.eclipse.om2m.site.in-cse/target/products/in-cse/<os>/<ws>/<arch>".
- Edit the file “configuration/config.ini” to configure the IN-CSE. (You can keep the current configuration for a local demo)
Parameter | Description | Example |
org.eclipse.om2m.cseType | CSE type | IN |
org.eclipse.om2m.cseBaseAddress | IN-CSE ip address | 127.0.0.1 |
org.eclipse.equinox.http.jetty.http.port | IN-CSE listening port | 8080 |
org.eclipse.om2m.cseBaseContext | IN-CSE listening context | / |
org.eclipse.om2m.dbDriver | IN-CSE Database driver | org.h2.Driver |
org.eclipse.om2m.dbUrl | IN-CSE Database file location | jdbc:h2:./database/db |
org.eclipse.om2m.dbUser | IN-CSE Database user name | om2m |
org.eclipse.om2m.dbPassword | IN-CSE Database password | om2m |
org.eclipse.om2m.dbReset | IN-CSE Database reset when starting | true |
org.eclipse.om2m.cseBaseId | IN-CSE cseBase resource id | in-cse |
org.eclipse.om2m.cseBaseName | IN-CSE Csebase resource name | in-name |
org.eclipse.om2m.cseBaseProtocol.default | IN-CSE Default communication protocol | http |
org.eclipse.om2m.maxNrOfInstances | IN-CSE Maximum number of instances stored in a ContentInstances resource | 1000 |
org.eclipse.om2m.adminRequestingEntity | IN-CSE Default admin requesting entity. (username / password) | admin:admin |
org.eclipse.om2m.guestRequestingEntity | IN-CSE Default guest requesting entity. (username / password) | guest:guest |
Gateway (MN-CSE) configuration
- Go to the MN-CSE product directory: "om2m/org.eclipse.om2m/org.eclipse.om2m.site.mn-cse/target/products/mn-cse/<os>/<ws>/<arch>".
- Edit the file “configuration/config.ini” to configure the MN-CSE. (You can keep the current configuration for a local demo)
Parameter | Description | Example |
org.eclipse.om2m.cseType | Cse type | MN |
org.eclipse.om2m.cseBaseAddress | MN-CSE ip address | 127.0.0.1 |
org.eclipse.equinox.http.jetty.http.port | MN-CSE listening port | 8181 |
org.eclipse.om2m.cseBaseContext | MN-CSE listening context | / |
org.eclipse.om2m.dbDriver | MN-CSE Database driver | org.h2.Driver |
org.eclipse.om2m.dbUrl | MN-CSE Database file location | jdbc:h2:./database/db |
org.eclipse.om2m.dbUser | MN-CSE Database user name | om2m |
org.eclipse.om2m.dbPassword | MN-CSE Database password | om2m |
org.eclipse.om2m.dbReset | MN-CSE Database reset when starting | true |
org.eclipse.om2m.cseBaseId | MN-CSE cseBase resource id | mn-cse |
org.eclipse.om2m.cseBaseName | MN-CSE Base Name | mn-name |
org.eclipse.om2m.cseBaseProtocol.default | MN-CSE default communication protocol | http |
org.eclipse.om2m.maxNrOfInstances | Maximum number of instances stored in a ContentInstances resource | 1000 |
org.eclipse.om2m.adminRequestingEntity | Default MN-CSE admin requesting entity. (username / password) | admin:admin |
org.eclipse.om2m.guestRequestingEntity | Default MN-CSE guest requesting entity. (username / password) | guest:guest |
- The MN-CSE configuration file contains 4 additional parameters to specify the remote IN-CSE to which the MN-CSE should be authenticated.
Parameter | Description | Example |
org.eclipse.om2m.remoteCseId | Remote IN-CSE Id | in-cse |
org.eclipse.om2m.remoteCseName | Remote IN-CSE Name | in-name |
org.eclipse.om2m.remoteCseAddress | Remote IN-CSE ip address | 127.0.0.1 |
org.eclipse.om2m.remoteCsePort | Remote IN-CSE listening port | 8080 |
org.eclipse.om2m.remoteCseContext | Remote IN-CSE listening context | / |
- You can configure MN-CSE and IN-CSE to work on distributed machines.
- You can configure multiple MN-CSEs by setting different identifiers.
Multiple gateways configuration
- Let's consider a simple M2M system composed of a server and two gateways as follows:
- Server IP: 192.168.0.2
- Gateway1 IP: 192.168.0.3
- Gateway2 IP: 192.168.0.4
- Of course, you can test the system locally in one machine by using the IP 127.0.0.1 for all products.
- After building the OM2M project normally, you will obtain 1 IN-CSE product and 1 MN-CSE product.
- You can configure the IN-CSE with the default configuration like this:
IN-CSE config.ini file:
org.eclipse.om2m.cseBaseId=IN-CSE org.eclipse.om2m.cseBaseName=in-name org.eclipse.om2m.cseBaseAddress=192.168.0.2 org.eclipse.equinox.http.jetty.http.port=8080
- Now, copy the MN-CSE product in another folder. You have now two separate MN-CSEs.
- Configure the first MN-CSE with the following configuration:
MN-CSE1 config.ini file:
org.eclipse.om2m.cseBaseId=MN-CSE1 org.eclipse.om2m.cseBaseName=mn-name1 org.eclipse.om2m.cseBaseAddress=192.168.0.3 org.eclipse.equinox.http.jetty.http.port=8181 org.eclipse.om2m.remoteCseId=IN-CSE org.eclipse.om2m.remoteCseName=in-name org.eclipse.om2m.remoteCseAddress=192.168.0.2 org.eclipse.om2m.remoteCsePort=8080
- Then, configure the second MN-CSE with the following configuration:
MN-CSE2 config.ini file:
org.eclipse.om2m.cseBaseId=MN-CSE2 org.eclipse.om2m.cseBaseName=mn-cse2 org.eclipse.om2m.cseBaseAddress=192.168.0.4 org.eclipse.equinox.http.jetty.http.port=8282 org.eclipse.om2m.remoteCseId=IN-CSE org.eclipse.om2m.remoteCseName=in-name org.eclipse.om2m.remoteCseddress=192.168.0.2 org.eclipse.om2m.remoteCsePort=8080
- If you don't know how to start OM2M please check this tutorial: OM2M startup
- You can start the system as follows:
- Start the IN-CSE product.
- Start the MN-CSE1 product.
- Start the MN-CSE2 product.
- Open the IN-CSE web interface on http://192.168.0.2:8080/webpage. You will find MN-CSE1 and MN-CSE2 authenticated.
- You can access now each authenticated MN-CSE by clicking on the MN-CSE (eg. /IN-CSE/in-name/MN-CSE1).
- Click on the "link" button to access remotely the gateway resource tree.