|
Re: Connecting Multiple System [message #1637008 is a reply to message #1632321] |
Thu, 26 February 2015 13:44 |
Mahdi Ben Alaya 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 #1641035 is a reply to message #1638596] |
Sat, 28 February 2015 11:09 |
Mahdi Ben Alaya 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
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06002 seconds