Skip to main content

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.

Jump to: navigation, search

Difference between revisions of "OM2M/Configuration"

(GSCL configuration)
(Gateway (GSCL) configuration)
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
__TOC__
 
__TOC__
== NSCL configuration  ==
+
== Server (NSCL) configuration  ==
 
* Go to the NSCL product directory: "om2m/org.eclipse.om2m/org.eclipse.om2m.site.nscl/target/products/nscl/<os>/<ws>/<arch>".
 
* Go to the NSCL product directory: "om2m/org.eclipse.om2m/org.eclipse.om2m.site.nscl/target/products/nscl/<os>/<ws>/<arch>".
 
* Edit the file “configuration/config.ini” to configure the NSCL. '''(You can keep the current configuration for a local demo)'''
 
* Edit the file “configuration/config.ini” to configure the NSCL. '''(You can keep the current configuration for a local demo)'''
Line 12: Line 12:
 
| org.eclipse.equinox.http.jetty.http.port || NSCL listening port || 8080
 
| org.eclipse.equinox.http.jetty.http.port || NSCL listening port || 8080
 
|-
 
|-
| org.eclipse.om2m.sclBaseContext|| NSCL listening context|| /om2m
+
| org.eclipse.om2m.sclBaseContext|| NSCL listening context|| /om2m
 
|-
 
|-
| org.eclipse.om2m.dbFile|| NSCL Embedded database file name|| nscl.db4o
+
| org.eclipse.om2m.dbDriver|| NSCL Database driver || org.h2.Driver
 
|-
 
|-
| org.eclipse.om2m.sclBaseId|| Network SclBase resource id|| nscl
+
| org.eclipse.om2m.dbUrl|| NSCL Database file location || jdbc:h2:./database/db
 
|-
 
|-
| org.eclipse.om2m.reset|| Reset NSCL database after each restart|| true
+
| org.eclipse.om2m.dbUser|| NSCL Database user name || om2m
 
|-
 
|-
| org.eclipse.om2m.sclBaseProtocol.default|| NSCL default communication protocol|| http
+
| org.eclipse.om2m.dbPassword || NSCL Database password || om2m
 
|-
 
|-
| org.eclipse.om2m.maxNrOfInstances|| Maximum number of instances stored in a ContentInstances resource|| 100
+
| org.eclipse.om2m.dbReset || NSCL Database reset when starting || true
 
|-
 
|-
| org.eclipse.om2m.adminRequestingEntity|| Default NSCL admin requesting entity. (username / password)|| admin:admin
+
| org.eclipse.om2m.sclBaseId|| NSCL SclBase resource id || nscl
 
|-
 
|-
| org.eclipse.om2m.guestRequestingEntity|| Default NSCL guest requesting entity. (username / password)|| guest:guest
+
| org.eclipse.om2m.sclBaseProtocol.default|| NSCL Default communication protocol|| http
 +
|-
 +
| org.eclipse.om2m.maxNrOfInstances|| NSCL Maximum number of instances stored in a ContentInstances resource|| 1000
 +
|-
 +
| org.eclipse.om2m.adminRequestingEntity|| NSCL Default admin requesting entity. (username / password)|| admin:admin
 +
|-
 +
| org.eclipse.om2m.guestRequestingEntity|| NSCL Default guest requesting entity. (username / password)|| guest:guest
 
|}
 
|}
  
== GSCL configuration ==
+
== Gateway (GSCL) configuration ==
 
* Go to the GSCL product directory: "om2m/org.eclipse.om2m/org.eclipse.om2m.site.gscl/target/products/gscl/<os>/<ws>/<arch>".
 
* Go to the GSCL product directory: "om2m/org.eclipse.om2m/org.eclipse.om2m.site.gscl/target/products/gscl/<os>/<ws>/<arch>".
 
* Edit the file “configuration/config.ini” to configure the GSCL. '''(You can keep the current configuration for a local demo)'''
 
* Edit the file “configuration/config.ini” to configure the GSCL. '''(You can keep the current configuration for a local demo)'''
Line 43: Line 49:
 
| org.eclipse.om2m.sclBaseContext|| GSCL listening context|| /om2m
 
| org.eclipse.om2m.sclBaseContext|| GSCL listening context|| /om2m
 
|-
 
|-
| org.eclipse.om2m.dbFile|| GSCL Embedded database file name|| gscl.db4o
+
| org.eclipse.om2m.dbDriver|| GSCL Database driver || org.h2.Driver
 
|-
 
|-
| org.eclipse.om2m.sclBaseId|| Gateway SclBase resource id|| gscl
+
| org.eclipse.om2m.dbUrl|| GSCL Database file location || jdbc:h2:./database/db
 
|-
 
|-
| org.eclipse.om2m.reset|| Reset GSCL database after each restart|| true  
+
| org.eclipse.om2m.dbUser|| GSCL Database user name || om2m
 +
|-
 +
| org.eclipse.om2m.dbPassword || GSCL Database password || om2m
 +
|-
 +
| org.eclipse.om2m.dbReset || GSCL Database reset when starting || true
 +
|-
 +
| org.eclipse.om2m.sclBaseId|| Gateway SclBase resource id|| gscl
 
|-
 
|-
 
| org.eclipse.om2m.sclBaseProtocol.default|| GSCL default communication protocol|| http
 
| org.eclipse.om2m.sclBaseProtocol.default|| GSCL default communication protocol|| http
 
|-
 
|-
| org.eclipse.om2m.maxNrOfInstances|| Maximum number of instances stored in a ContentInstances resource|| 100
+
| org.eclipse.om2m.maxNrOfInstances|| Maximum number of instances stored in a ContentInstances resource|| 1000
 
|-
 
|-
 
| org.eclipse.om2m.adminRequestingEntity|| Default GSCL admin requesting entity. (username / password)|| admin:admin
 
| org.eclipse.om2m.adminRequestingEntity|| Default GSCL admin requesting entity. (username / password)|| admin:admin
Line 62: Line 74:
 
| Parameter|| Description|| Example
 
| Parameter|| Description|| Example
 
|-
 
|-
| org.eclipse.om2m.remoteNsclId|| Remote Network SCL Id|| nscl
+
| org.eclipse.om2m.remoteNsclId|| Remote NSCL Id|| nscl
 
|-
 
|-
| org.eclipse.om2m.remoteNsclAddress|| Remote Network SCL ip address|| 127.0.0.1
+
| org.eclipse.om2m.remoteNsclAddress|| Remote NSCL ip address|| 127.0.0.1
 
|-
 
|-
| org.eclipse.om2m.remoteNsclPort|| Remote Network SCL listening port|| 8080
+
| org.eclipse.om2m.remoteNsclPort|| Remote NSCL listening port|| 8080
 
|-
 
|-
| org.eclipse.om2m.remoteNsclContext|| Remote Network SCL listening context|| /om2m
+
| org.eclipse.om2m.remoteNsclContext|| Remote NSCL listening context|| /om2m
 
|}
 
|}
  
 
* You can configure GSCL and NSCL to work on distributed machines.
 
* You can configure GSCL and NSCL to work on distributed machines.
 
* You can configure multiple GSCLs by setting different identifiers.
 
* You can configure multiple GSCLs 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 NSCL product and 1 GSCL product.
 +
* You can configure the NSCL with the default configuration like this:
 +
 +
NSCL config.ini file:
 +
<pre>
 +
org.eclipse.om2m.sclBaseId=nscl
 +
org.eclipse.om2m.sclBaseAddress=192.168.0.2
 +
org.eclipse.equinox.http.jetty.http.port=8080
 +
</pre>
 +
 +
* Now, copy the GSCL product in another folder. You have now two separate GSCLs.
 +
 +
* Configure the first GSCL with the following configuration:
 +
 +
GSCL1 config.ini file:
 +
<pre>
 +
org.eclipse.om2m.sclBaseId=gscl1
 +
org.eclipse.om2m.sclBaseAddress=192.168.0.3
 +
org.eclipse.equinox.http.jetty.http.port=8181
 +
org.eclipse.om2m.remoteNsclId=nscl
 +
org.eclipse.om2m.remoteNsclAddress=192.168.0.2
 +
org.eclipse.om2m.remoteNsclPort=8080
 +
</pre>
 +
 +
* Then, configure the second GSCL with the following configuration:
 +
 +
GSCL2 config.ini file:
 +
<pre>
 +
org.eclipse.om2m.sclBaseId=gscl2
 +
org.eclipse.om2m.sclBaseAddress=192.168.0.4
 +
org.eclipse.equinox.http.jetty.http.port=8282
 +
org.eclipse.om2m.remoteNsclId=nscl
 +
org.eclipse.om2m.remoteNsclAddress=192.168.0.2
 +
org.eclipse.om2m.remoteNsclPort=8080
 +
</pre>
 +
 +
* If you don't know how to start OM2M please check this tutorial: [https://wiki.eclipse.org/OM2M/Starting OM2M startup]
 +
 +
* You can start the system as follows:
 +
** Start the NSCL product.
 +
** Start the GSCL1 product.
 +
** Start the GSCL2 product.
 +
 +
*Open the NSCL web interface on 192.168.0.2:8080.
 +
*Go to the "nscl/scls" resource to see the authenticated gateways. You will find gscl1 and gscl2 authenticated.
 +
 +
*You can access now each authenticated GSCL by clicking on the GSCL (eg. nscl/scls/gscl1).
 +
 +
*Click on the "link" button to access remotely the gateway resource tree.

Latest revision as of 05:14, 29 March 2015

Server (NSCL) configuration

  • Go to the NSCL product directory: "om2m/org.eclipse.om2m/org.eclipse.om2m.site.nscl/target/products/nscl/<os>/<ws>/<arch>".
  • Edit the file “configuration/config.ini” to configure the NSCL. (You can keep the current configuration for a local demo)
Parameter Description Example
org.eclipse.om2m.sclType SCL type NSCL
org.eclipse.om2m.sclBaseAddress NSCL ip address 127.0.0.1
org.eclipse.equinox.http.jetty.http.port NSCL listening port 8080
org.eclipse.om2m.sclBaseContext NSCL listening context /om2m
org.eclipse.om2m.dbDriver NSCL Database driver org.h2.Driver
org.eclipse.om2m.dbUrl NSCL Database file location jdbc:h2:./database/db
org.eclipse.om2m.dbUser NSCL Database user name om2m
org.eclipse.om2m.dbPassword NSCL Database password om2m
org.eclipse.om2m.dbReset NSCL Database reset when starting true
org.eclipse.om2m.sclBaseId NSCL SclBase resource id nscl
org.eclipse.om2m.sclBaseProtocol.default NSCL Default communication protocol http
org.eclipse.om2m.maxNrOfInstances NSCL Maximum number of instances stored in a ContentInstances resource 1000
org.eclipse.om2m.adminRequestingEntity NSCL Default admin requesting entity. (username / password) admin:admin
org.eclipse.om2m.guestRequestingEntity NSCL Default guest requesting entity. (username / password) guest:guest

Gateway (GSCL) configuration

  • Go to the GSCL product directory: "om2m/org.eclipse.om2m/org.eclipse.om2m.site.gscl/target/products/gscl/<os>/<ws>/<arch>".
  • Edit the file “configuration/config.ini” to configure the GSCL. (You can keep the current configuration for a local demo)
Parameter Description Example
org.eclipse.om2m.sclType SCL type GSCL
org.eclipse.om2m.sclBaseAddress GSCL ip address 127.0.0.1
org.eclipse.equinox.http.jetty.http.port GSCL listening port 8181
org.eclipse.om2m.sclBaseContext GSCL listening context /om2m
org.eclipse.om2m.dbDriver GSCL Database driver org.h2.Driver
org.eclipse.om2m.dbUrl GSCL Database file location jdbc:h2:./database/db
org.eclipse.om2m.dbUser GSCL Database user name om2m
org.eclipse.om2m.dbPassword GSCL Database password om2m
org.eclipse.om2m.dbReset GSCL Database reset when starting true
org.eclipse.om2m.sclBaseId Gateway SclBase resource id gscl
org.eclipse.om2m.sclBaseProtocol.default GSCL default communication protocol http
org.eclipse.om2m.maxNrOfInstances Maximum number of instances stored in a ContentInstances resource 1000
org.eclipse.om2m.adminRequestingEntity Default GSCL admin requesting entity. (username / password) admin:admin
org.eclipse.om2m.guestRequestingEntity Default GSCL guest requesting entity. (username / password) guest:guest
  • The GSCL configuration file contains 4 additional parameters to specify the remote NSCL to which the GSCL should be authenticated.
Parameter Description Example
org.eclipse.om2m.remoteNsclId Remote NSCL Id nscl
org.eclipse.om2m.remoteNsclAddress Remote NSCL ip address 127.0.0.1
org.eclipse.om2m.remoteNsclPort Remote NSCL listening port 8080
org.eclipse.om2m.remoteNsclContext Remote NSCL listening context /om2m
  • You can configure GSCL and NSCL to work on distributed machines.
  • You can configure multiple GSCLs 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 NSCL product and 1 GSCL product.
  • You can configure the NSCL with the default configuration like this:

NSCL config.ini file:

org.eclipse.om2m.sclBaseId=nscl
org.eclipse.om2m.sclBaseAddress=192.168.0.2
org.eclipse.equinox.http.jetty.http.port=8080
  • Now, copy the GSCL product in another folder. You have now two separate GSCLs.
  • Configure the first GSCL with the following configuration:

GSCL1 config.ini file:

org.eclipse.om2m.sclBaseId=gscl1
org.eclipse.om2m.sclBaseAddress=192.168.0.3
org.eclipse.equinox.http.jetty.http.port=8181
org.eclipse.om2m.remoteNsclId=nscl
org.eclipse.om2m.remoteNsclAddress=192.168.0.2
org.eclipse.om2m.remoteNsclPort=8080
  • Then, configure the second GSCL with the following configuration:

GSCL2 config.ini file:

org.eclipse.om2m.sclBaseId=gscl2
org.eclipse.om2m.sclBaseAddress=192.168.0.4
org.eclipse.equinox.http.jetty.http.port=8282
org.eclipse.om2m.remoteNsclId=nscl
org.eclipse.om2m.remoteNsclAddress=192.168.0.2
org.eclipse.om2m.remoteNsclPort=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 NSCL product.
    • Start the GSCL1 product.
    • Start the GSCL2 product.
  • Open the NSCL web interface on 192.168.0.2:8080.
  • Go to the "nscl/scls" resource to see the authenticated gateways. You will find gscl1 and gscl2 authenticated.
  • You can access now each authenticated GSCL by clicking on the GSCL (eg. nscl/scls/gscl1).
  • Click on the "link" button to access remotely the gateway resource tree.

Back to the top