Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » OM2M » Is the CoAP binding protocol not fully supported in OM2M?(CoAP Rest Client can not be found in mn-cse)
Is the CoAP binding protocol not fully supported in OM2M? [message #1741763] Mon, 29 August 2016 11:00 Go to next message
yoshida takuma is currently offline yoshida takumaFriend
Messages: 16
Registered: August 2016
Junior Member
Hi everyone,

I tried to create resources in OM2M using both HTTP and CoAP requests. For me HTTP worked fine, no Problem, but I am still confused about the CoAP protocol. And I have three questions, related to CoAP:

1) When I tried to send request directly to the address of mn-cse: coap://127.0.0.1:5684/......, I got an request failed, and I found that in mn-cse there is no server running coap port 5684. Is that the coap not fully supported in mn-cse?

2) My in-cse running coap port 5683 and mn-cse running coap port 5684 (based on the config file). I tried to send the coap request to create the contentInstance under DATA container: coap://127.0.0.1:5683/~/mn-cse/mn-name/APP/DATA. What I figured out is: The request first will come to in-cse because request send to port 5683, then the in-cse will process the request using CoAP Server class and Forward this request to mn-cse. At this Point, the poa address of mn-cse which using HTTP will be used as the Redirect URL for the retarget request to mn-cse, then the request will be sent to http://127.0.0.1:8282/~/mn-cse........ and when request comes to mn-cse, the process will be done using RestHttpServlet class, and resource will be created.
So what make me confused here is: I sent at the beginning coap request, but then the request was done using http because mn-cse is not able to receive coap request. Can anyone clarify me this point? If mn-cse not able to receive coap request, then I can not create the subscription under mn-cse using CoAP. Is it true?

3) Can I change the protocol using in poa address, default is http, and is it possible to change to coap?

Thank you in advanced!
Yoshida

[Updated on: Mon, 29 August 2016 11:00]

Report message to a moderator

Re: Is the CoAP binding protocol not fully supported in OM2M? [message #1741904 is a reply to message #1741763] Tue, 30 August 2016 14:17 Go to previous messageGo to next message
Francois AissaouiFriend
Messages: 38
Registered: April 2015
Member
Hi Yoshida

For your questions:

1) Since we have a plugin architecture, if CoAP is not available in the mn-cse it means the plugin is not present in the mn-cse product. You just have to add it into the "om2m.product" file into the "org.eclipse.om2m.site.mn-cse" project.

2) The communication between the in-cse and mn-cse is based on RemoteCSE resources. The in-cse has a RemoteCSE representing the MN in its resource tree. This RemoteCSE resource contains a PointOfAccess (poa) attribute which determine the URL to access the RemoteCSE.
The basic configuration uses the HTTP endpoint for the mn-cse, it means, if the IN has to send a request to the middle node, it will check the POA attribute and depending of it, will send the request in HTTP or whatever is the protocol (if it is available into the platform).

3) As said in 2, yes you can make an Update request on the RemoteCSE to change to coap://.... URL. Then the IN will send request to the MN using CoAP.

Hope this can help,
Regards,
François
Re: Is the CoAP binding protocol not fully supported in OM2M? [message #1741923 is a reply to message #1741904] Tue, 30 August 2016 15:12 Go to previous messageGo to next message
yoshida takuma is currently offline yoshida takumaFriend
Messages: 16
Registered: August 2016
Junior Member
Hello François,

thank you very much for the response. I still have some questions:

1) I tried to add the coap plugin to mn-cse product by: open the om2m.product in the mn-cse plugin and add the coap plugin to it. Then I saved and Run As Maven Install to compile the project, but I was not successful to ping to the coap port 5684 which is running in the mn-cse. Did I do some mistake here?
2) I am not quite clear about your answer here but regarding your answer: How can I change the attribute in the RemoteCSE resources, such as poa attribute?

I am looking forward for your response
Thank you
Yoshida
Re: Is the CoAP binding protocol not fully supported in OM2M? [message #1742565 is a reply to message #1741923] Mon, 05 September 2016 09:01 Go to previous messageGo to next message
yoshida takuma is currently offline yoshida takumaFriend
Messages: 16
Registered: August 2016
Junior Member
Hi François,

for the 1st question I already can fix it. I add the coap plugin to the mn-product but I forget to start it when running the mn-product. After starting it, it working fine. Thank you and looking forward for your response on my question 2.

Best regards,
Yoshida
Re: Is the CoAP binding protocol not fully supported in OM2M? [message #1742567 is a reply to message #1742565] Mon, 05 September 2016 09:09 Go to previous messageGo to next message
Francois AissaouiFriend
Messages: 38
Registered: April 2015
Member
Hi Yoshida,

You can make the mn product to auto start the CoAP plugin to make it more convenient.

For your second question, you can perform an UPDATE request with the HTTP PUT operation for instance.
Here is an example of modification of a RemoteCSE poa.

PUT /~/in-cse/in-name/mn-cse HTTP/1.1
Host: localhost:8080
Content-Type: application/xml
X-M2M-Origin: admin:admin
X-M2M-RI: 123456

<m2m:csr xmlns:m2m="http://www.onem2m.org/xml/protocols">
   <poa>coap://new-ip:12345</poa>
</m2m:csr>


Regards,
François
Re: Is the CoAP binding protocol not fully supported in OM2M? [message #1742568 is a reply to message #1742567] Mon, 05 September 2016 09:51 Go to previous messageGo to next message
yoshida takuma is currently offline yoshida takumaFriend
Messages: 16
Registered: August 2016
Junior Member
Hi François,

ah I see. Thank you so much François!

Regards,
Yoshida
Re: Is the CoAP binding protocol not fully supported in OM2M? [message #1743099 is a reply to message #1742568] Mon, 12 September 2016 09:28 Go to previous message
Son Duong is currently offline Son DuongFriend
Messages: 60
Registered: June 2016
Member
Hi Francois,

I also have same question here. So this mean everytime I want to change the poa address, I have to send PUT message. Are there any possibility that I change it in the configuration so that I dont need to send PUT message everytime when I run the application

Thank you
Son
Previous Topic:Does end-user applications can interact directly with MN-CSE ?
Next Topic:How to start the plugin which not located in CSE
Goto Forum:
  


Current Time: Mon Dec 30 15:56:02 GMT 2024

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

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

Back to the top