Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » OM2M » Connecting Multiple System(Can we connect multiple systems using Om2m)
Connecting Multiple System [message #1632321] Tue, 24 February 2015 07:48 Go to next message
Ravi Teja is currently offline Ravi TejaFriend
Messages: 13
Registered: February 2015
Junior Member
Hi

I want to know wheather we can connect multiple systems using om2m.After building, in configuration folder we have config.ini,for connecting multiple systems how to give different ip addresses there..
Re: Connecting Multiple System [message #1637008 is a reply to message #1632321] Thu, 26 February 2015 13:44 Go to previous messageGo to next message
Mahdi Ben Alaya is currently offline Mahdi Ben AlayaFriend
Messages: 229
Registered: November 2013
Senior Member
Hello Ravi,

Let's consider a simple M2M system composed of a server and two gateways.
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

You can now:
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.

Hope this can help,
Mahdi

[Updated on: Mon, 02 March 2015 10:45]

Report message to a moderator

Re: Connecting Multiple System [message #1638521 is a reply to message #1637008] Fri, 27 February 2015 06:46 Go to previous messageGo to next message
Ravi Teja is currently offline Ravi TejaFriend
Messages: 13
Registered: February 2015
Junior Member
Hi Mahdi

Thankuu for the information...Do we have any possibility of having Om2m in android devices?..Can we connect it through android devices..
Re: Connecting Multiple System [message #1638596 is a reply to message #1638521] Fri, 27 February 2015 07:38 Go to previous messageGo to next message
Ravi Teja is currently offline Ravi TejaFriend
Messages: 13
Registered: February 2015
Junior Member
HI Mahdi

I want to use Raspberry pi board as gateway..for this what should i do..how can i connect devices to this gateway using restful application..actually i am beginner so don't mind as i am asking basic questions..
Re: Connecting Multiple System [message #1641035 is a reply to message #1638596] Sat, 28 February 2015 11:09 Go to previous messageGo to next message
Mahdi Ben Alaya is currently offline Mahdi Ben AlayaFriend
Messages: 229
Registered: November 2013
Senior Member
Hello Ravi,

1) There are two ways to integrate Android devices to OM2M.
a) As Device Application (DA): Implement a simple HTTP or CoAP application on android and then connect it to a gateway (GSCL) or a server (NSCL).
b) As Device SCL (DSCL): Need some development.
First, the integration of OSGi in android isn't straightforward.
Second, OM2M is using the JAXb library which is not included by default in android.
Here, it is better to try a more lightweight library such SimpleXML instead of JAXb.

2) Check the following topic to understand how to connect devices to your Raspberry pi gateway:
https://www.eclipse.org/forums/index.php/t/1017987/

Mahdi

[Updated on: Sat, 28 February 2015 11:10]

Report message to a moderator

Re: Connecting Multiple System [message #1644830 is a reply to message #1641035] Mon, 02 March 2015 07:31 Go to previous messageGo to next message
Ravi Teja is currently offline Ravi TejaFriend
Messages: 13
Registered: February 2015
Junior Member
Hi Mahdi

I have three ip addresses..(10.138.97.142,10.138.97.216,10.138.97.197).I want to take one as server and the other two as gateways.I installed Om2m packages in three systems so that now i have nscl and gscl in three systems.Now how to make this one network and two gateway connections.
Re: Connecting Multiple System [message #1645013 is a reply to message #1644830] Mon, 02 March 2015 09:34 Go to previous messageGo to next message
Ravi Teja is currently offline Ravi TejaFriend
Messages: 13
Registered: February 2015
Junior Member
Hi Mahdi
two gscls( gscl1 and gscl2) are authenticated in tree,but when i am accessing each gscl iam getting internal server error(500).What is this error and how to solve this
Re: Connecting Multiple System [message #1645044 is a reply to message #1645013] Mon, 02 March 2015 09:54 Go to previous messageGo to next message
Mahdi Ben Alaya is currently offline Mahdi Ben AlayaFriend
Messages: 229
Registered: November 2013
Senior Member
Hello Ravi,

Could you send me the config.ini file that you are using for gscl1 ?
Re: Connecting Multiple System [message #1645104 is a reply to message #1645044] Mon, 02 March 2015 10:35 Go to previous messageGo to next message
Ravi Teja is currently offline Ravi TejaFriend
Messages: 13
Registered: February 2015
Junior Member
config.ini for gscl1
org.eclipse.om2m.sclBaseAddress=10.138.97.216
org.eclipse.equinox.http.jetty.http.port=8181
org.eclipse.om2m.remoteNsclId=nscl
org.eclipse.om2m.globalContext=
org.eclipse.om2m.sclType=GSCL
eclipse.p2.profile=DefaultProfile
org.eclipse.om2m.dbFile=gscl.db4o
osgi.framework.extensions=
org.eclipse.om2m.webInterfaceContext=/
osgi.bundles.defaultStartLevel=4
org.eclipse.om2m.reset=true
org.eclipse.om2m.sclBaseId=gscl1
org.eclipse.om2m.maxNrOfInstances=100
osgi.framework=file\:plugins/org.eclipse.osgi_3.10.1.v20140909-1633.jar
org.eclipse.om2m.remoteNsclPort=8080
org.eclipse.om2m.guestRequestingEntity=guest\:guest
org.eclipse.om2m.dbDefragmentPeriod=-1
org.eclipse.om2m.remoteNsclContext=/om2m
org.eclipse.om2m.adminRequestingEntity=admin\:admin
org.eclipse.om2m.remoteNsclAddress=10.138.97.216
eclipse.p2.data.area=@config.dir/../p2
org.eclipse.om2m.sclBaseContext=/om2m
org.eclipse.om2m.sclBaseProtocol.default=http



Re: Connecting Multiple System [message #1645113 is a reply to message #1645104] Mon, 02 March 2015 10:39 Go to previous messageGo to next message
Mahdi Ben Alaya is currently offline Mahdi Ben AlayaFriend
Messages: 229
Registered: November 2013
Senior Member
In this parameter "org.eclipse.om2m.sclBaseAddress" you must set the IP of the gscl1 (not the nscl).

[Updated on: Mon, 02 March 2015 10:40]

Report message to a moderator

Re: Connecting Multiple System [message #1645129 is a reply to message #1645113] Mon, 02 March 2015 10:48 Go to previous messageGo to next message
Mahdi Ben Alaya is currently offline Mahdi Ben AlayaFriend
Messages: 229
Registered: November 2013
Senior Member
For the sake of clarity, I updated the configuration explained in my first response for a real distributed machines as follows:
- Server IP: 192.168.0.2
- Gateway1 IP: 192.168.0.3
- Gateway2 IP: 192.168.0.4
You can check it now.

I added a new section called "multiple gateways configuration" in our OM2M configuration tutorial as well:http://wiki.eclipse.org/OM2M/Configuration



[Updated on: Mon, 02 March 2015 11:09]

Report message to a moderator

Re: Connecting Multiple System [message #1645206 is a reply to message #1645129] Mon, 02 March 2015 11:36 Go to previous message
Ravi Teja is currently offline Ravi TejaFriend
Messages: 13
Registered: February 2015
Junior Member
Thanks Mahdi

It's cool....now i could connect to different gateways....

[Updated on: Mon, 02 March 2015 11:37]

Report message to a moderator

Previous Topic:GSCL with a private IP
Next Topic:Om2m building on Raspberry pi board
Goto Forum:
  


Current Time: Thu Mar 28 08:58:41 GMT 2024

Powered by FUDForum. Page generated in 0.03000 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top