Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » OM2M » Using CoAP based applications (Copper vs Erbium)
icon14.gif  Using CoAP based applications (Copper vs Erbium) [message #1464204] Fri, 07 November 2014 09:43 Go to next message
Fesseha Tsegaye is currently offline Fesseha TsegayeFriend
Messages: 10
Registered: October 2014
Junior Member
Hey guys,

First of all much thanks for your hard work. OM2M is a great work.

I was trying to set up a test environment with a CoAP (Erbium) running sensor DA. The problem I have is, I can not successfully pass the Authentication (requestingEntity). While using Copper plugin as CoAP client, I can send a GET request like,
coap :// [2001:bbbb:dddd:0:2ff:ffff:ffff:ffff]<colon>5683/om2m/nscl?authorization=admin:admin
and it works fine. But with Erbium the same request would respond with error like,

osgi> Nov 06, 2014 6:16:45 PM org.eclipse.om2m.core.router.Router doRequest
INFORMATION: RequestIndication [method=RETRIEVE, base=, targetID=/nscl, representation=, requestingEntity=null, protocol=null]
Nov 06, 2014 6:16:45 PM org.eclipse.om2m.comm.coap.CoapMessageDeliverer service
INFORMATION: check point: requestIndication sent and waiting for responseConfirm

Nov 06, 2014 6:16:45 PM org.eclipse.om2m.comm.coap.CoapMessageDeliverer getCoapStatusCode
INFORMATION: The received code is STATUS_AUTHORIZATION_NOT_ADDED
Nov 06, 2014 6:16:45 PM org.eclipse.om2m.comm.coap.CoapMessageDeliverer service
INFORMATION: check point : The code is 4.01
Nov 06, 2014 6:16:45 PM org.eclipse.om2m.comm.coap.CoapMessageDeliverer service
INFORMATION: the responseConfirm: ResponseConfirm [statusCode=STATUS_AUTHORIZATION_NOT_ADDED, representation=<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<om2m:errorInfo xmlns:om2m="link" xmlns:xmime="link">
    <om2m:statusCode>STATUS_AUTHORIZATION_NOT_ADDED</om2m:statusCode>
    <om2m:additionalInfo>Requesting Entity should not be null</om2m:additionalInfo>
</om2m:errorInfo>
, resourceURI=null]
Nov 06, 2014 6:16:45 PM org.eclipse.om2m.comm.coap.CoapMessageDeliverer service
INFORMATION: CoAP Response parameters set
Nov 06, 2014 6:16:45 PM org.eclipse.om2m.comm.coap.CoapMessageDeliverer deliverRequest
INFORMATION: the response= ACK-4.01   MID=26068, Token=[], OptionSet=[], "<?xmlversion="1.0" ".. 22 bytes
Nov 06, 2014 6:16:45 PM org.eclipse.om2m.comm.coap.CoapMessageDeliverer deliverRequest


I know my question is more related to the CoAP client (CoAP header) but if you already have encountered the same problems please let me know.

regards,
Fesseha
Re: Using CoAP based applications (Copper vs Erbium) [message #1464410 is a reply to message #1464204] Fri, 07 November 2014 14:22 Go to previous messageGo to next message
Mahdi Ben Alaya is currently offline Mahdi Ben AlayaFriend
Messages: 229
Registered: November 2013
Senior Member
Hello,

Ok, let's try to investigate this issue.
Technically, I think that all URI parameters goes in the "Uri-Query" option of the CoAP protocol.
So, try to add the option: "Uri-Query" with the value: "authorization=admin:admin" to your CoAP request (instead of adding it as a URI parameter) and let's see.

Mahdi


Re: Using CoAP based applications (Copper vs Erbium) [message #1464423 is a reply to message #1464410] Fri, 07 November 2014 14:40 Go to previous messageGo to next message
Fesseha Tsegaye is currently offline Fesseha TsegayeFriend
Messages: 10
Registered: October 2014
Junior Member
Hey Mahdi,

Yes you are right, it should be set as a uri-query. It worked for me using this function
coap_set_header_uri_query(request, "?authorization=admin:admin");


thanks
Re: Using CoAP based applications (Copper vs Erbium) [message #1516129 is a reply to message #1464423] Thu, 18 December 2014 17:26 Go to previous messageGo to next message
Fesseha Tsegaye is currently offline Fesseha TsegayeFriend
Messages: 10
Registered: October 2014
Junior Member
hey guys,

Ive a small question.

By default in response messages the CoAP engine in OM2M sets the block size to 512bytes. For eg, just right after registering an Application resource, in the response the Application representation is included (as you know this representation is huge for small devices) and for this the first response is sent with szx = 512. Is it by any means possible to reduce this size???? Confused

regards
Re: Using CoAP based applications (Copper vs Erbium) [message #1516143 is a reply to message #1516129] Thu, 18 December 2014 17:39 Go to previous messageGo to next message
Mahdi Ben Alaya is currently offline Mahdi Ben AlayaFriend
Messages: 229
Registered: November 2013
Senior Member
I think that returning the representation of the created resource is useless in constraint environment.
So I suggest you to go to "org.eclipse.om2m.comm.coap" plugin and update the "CoapServer.java".

Update the following code (line 242) :
if(responseConfirm.getRepresentation()!=null){
           //filling in the fields of the Coap response
    	   response.setPayload(responseConfirm.getRepresentation());
}

like this:
if(responseConfirm.getRepresentation()!=null){
       //filling in the fields of the Coap response
      if(statusCode != 2.01){
    	   response.setPayload(responseConfirm.getRepresentation());
       }
}

Tell me is this update meets your need.
If yes, I will push a patch to the git.

cheers

[Updated on: Thu, 18 December 2014 17:40]

Report message to a moderator

Re: Using CoAP based applications (Copper vs Erbium) [message #1517551 is a reply to message #1516143] Fri, 19 December 2014 15:31 Go to previous messageGo to next message
Fesseha Tsegaye is currently offline Fesseha TsegayeFriend
Messages: 10
Registered: October 2014
Junior Member
hallo,

I added that condition and the result was the same. The first message of the response to application registration is still 584bytes long (on the wire) with [Block2: NUM:0, M:8, SZX:512] header. I looked for this default response size even in 'Californium' but without success.

°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
°^°^°^°^°Merry Christmas and Happy 2015°^°^°^°^°
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
regards,
Re: Using CoAP based applications (Copper vs Erbium) [message #1517558 is a reply to message #1517551] Fri, 19 December 2014 15:37 Go to previous messageGo to next message
Mahdi Ben Alaya is currently offline Mahdi Ben AlayaFriend
Messages: 229
Registered: November 2013
Senior Member
Hello,

Could you post the body that you get in the response ?

Mahdi
Re: Using CoAP based applications (Copper vs Erbium) [message #1517560 is a reply to message #1517558] Fri, 19 December 2014 15:40 Go to previous messageGo to next message
Mahdi Ben Alaya is currently offline Mahdi Ben AlayaFriend
Messages: 229
Registered: November 2013
Senior Member
Just to be sure, after updating the coap plugin you should build all the project starting from the parent, in such a way that the new version of the coap plugin is added to your NSCL product.
Re: Using CoAP based applications (Copper vs Erbium) [message #1517677 is a reply to message #1517560] Fri, 19 December 2014 17:22 Go to previous messageGo to next message
Fesseha Tsegaye is currently offline Fesseha TsegayeFriend
Messages: 10
Registered: October 2014
Junior Member
Yea I've done that. I also tried to add the 'protocol' query in the OM2M code if it could help, but it does not have change. Previously the protocol is always shown as null, whether set or unset in requests. I actually talked about this to let you know that I can actually see the effect of the changes I make to the code.

Look at the attached pics.
  • Attachment: OM2M.png
    (Size: 146.41KB, Downloaded 640 times)
  • Attachment: CoAP POST.png
    (Size: 127.42KB, Downloaded 642 times)
Re: Using CoAP based applications (Copper vs Erbium) [message #1517683 is a reply to message #1517677] Fri, 19 December 2014 17:25 Go to previous messageGo to next message
Mahdi Ben Alaya is currently offline Mahdi Ben AlayaFriend
Messages: 229
Registered: November 2013
Senior Member
The problem is clear here, you must use && instead of || in your if condition like this:
if(responseConfirm.getRepresentation()!=null){
       //filling in the fields of the Coap response
       if(statusCode != 2.01 && statusCode != 5.03 ){
    	   response.setPayload(responseConfirm.getRepresentation());
       }
}
Re: Using CoAP based applications (Copper vs Erbium) [message #1522742 is a reply to message #1517683] Mon, 22 December 2014 14:04 Go to previous messageGo to next message
Fesseha Tsegaye is currently offline Fesseha TsegayeFriend
Messages: 10
Registered: October 2014
Junior Member
No, the statusCode can not be both 2.01 and 5.03 at the same time. I used || because both situations had bigger payload in the response message.
Re: Using CoAP based applications (Copper vs Erbium) [message #1522930 is a reply to message #1522742] Mon, 22 December 2014 16:26 Go to previous messageGo to next message
Mahdi Ben Alaya is currently offline Mahdi Ben AlayaFriend
Messages: 229
Registered: November 2013
Senior Member
Trust me, this is not what my code did.
My code says: if the statusCode is different from 2.01 and is also different from 5.03 then set the payload to the response.
In other words the payload will not be set for 2.01 and even 5.03, and this is what you want.
I suggest you to reread carefully my code Wink



[Updated on: Mon, 22 December 2014 16:30]

Report message to a moderator

Re: Using CoAP based applications (Copper vs Erbium) [message #1524448 is a reply to message #1522930] Tue, 23 December 2014 12:46 Go to previous messageGo to next message
Fesseha Tsegaye is currently offline Fesseha TsegayeFriend
Messages: 10
Registered: October 2014
Junior Member
Yea you are right! Thanks for the help. It is not setting the payload now. Is it still possible to know how to change the default block size from 512bytes instead of silencing all the response?
Re: Using CoAP based applications (Copper vs Erbium) [message #1585895 is a reply to message #1524448] Mon, 26 January 2015 14:51 Go to previous messageGo to next message
Fesseha Tsegaye is currently offline Fesseha TsegayeFriend
Messages: 10
Registered: October 2014
Junior Member
hello guys,

Have you noticed a problem on the CoAP message deliverer during block wise transfer?
The situation is like this, an Application sends a request to the NSCL to get a resource of an already registered application (DA). By default the NSCL sends (forwards) a request without setting any CoAP block headers. But the response from the DA holds BLOCK2 header. The message id should be continuous in this case and the NSCL should continue with an incremented mid and the new BLOCK2 header. But the message id jumps to some new random value which makes it difficult for the other side (DA). Take a look at the attached Wireshark screen shot.

Any suggestions?
Re: Using CoAP based applications (Copper vs Erbium) [message #1597821 is a reply to message #1585895] Mon, 02 February 2015 15:32 Go to previous messageGo to next message
Mahdi Ben Alaya is currently offline Mahdi Ben AlayaFriend
Messages: 229
Registered: November 2013
Senior Member
Hello Fesseha,

What i see from the wireshark log is that there is a GET request which is divided in 2 blocks (block 0 and block 1). The error message is a SERVICE UNAVAILABLE (5.03). This means that all the blocks have been assembled but there is no service to respond to the GET request. I don't think there is an issue with the blockwise operation here. However to make sure of this, you should investigate a little deeper and be sure that the request is assembled correctly. i strongly believe it is not the CoAP client problem and you should see in the service part and check if it is available and why it is not responding.

Mahdi & Elvis
Re: Using CoAP based applications (Copper vs Erbium) [message #1740691 is a reply to message #1464410] Wed, 17 August 2016 10:34 Go to previous messageGo to next message
Son Duong is currently offline Son DuongFriend
Messages: 60
Registered: June 2016
Member
Hi Mahdi,

I wonder that in OM2M version 1.0.0, how the authorization will be done. I tried to put the Query parameter: authorization=admin:admin to the request uri: coap://127.0.0.1:5683/~/in-cse/in-name?authorization=admin:admin, but the server responsed with an error 4.03 Unknown or unauthorized originator. Do you have any idea?

Thank you in advanced
Son


Mahdi Ben Alaya wrote on Fri, 07 November 2014 14:22
Hello,

Ok, let's try to investigate this issue.
Technically, I think that all URI parameters goes in the "Uri-Query" option of the CoAP protocol.
So, try to add the option: "Uri-Query" with the value: "authorization=admin:admin" to your CoAP request (instead of adding it as a URI parameter) and let's see.

Mahdi



[Updated on: Wed, 17 August 2016 10:34]

Report message to a moderator

Re: Using CoAP based applications (Copper vs Erbium) [message #1741005 is a reply to message #1740691] Mon, 22 August 2016 10:52 Go to previous messageGo to next message
Klemen Petrovcic is currently offline Klemen PetrovcicFriend
Messages: 34
Registered: November 2015
Member
Hi Son Duong.

The OneM2M version of the OM2M platform uses the Californium library to implement the general protocol binding. For a better
understanding of the binding, you can take a look at the protocols specifications.

I've looked at the two popular CoAP clients: the Copper plugin and the libcoap CLI tool. Both of them are, at this time,
not suitable to be used with this binding, since they do not support multiple custom options (you can read about them in the mentioned specifications).

I built a simple CoAP client, using the Californium library, with the purpose of demonstrating its usage with the general
CoAP binding. The provided examples are analogous to the ones of the HTTP tutorial.

I'd also like to mention the changed usage of the name attribute. In previous releases of the platform,
there was a special field (X-M2M-NM in HTTP), which was used for specifying the name of the resource, which was to be created.
In the latest version, this field is replaced, by a suitable attribute ("rn" or "nm"). This change is also included in the provided client.

I changed the default platform CoAP port to 5683, in the config.ini file of the suitable CSE unit, since the plugin doesn't use
the TLS encryption yet. The attached "coapmonitor.jar" application uses the 5685 port instead (just as an example).

[Updated on: Mon, 22 August 2016 10:53]

Report message to a moderator

Re: Using CoAP based applications (Copper vs Erbium) [message #1741030 is a reply to message #1741005] Mon, 22 August 2016 13:01 Go to previous messageGo to next message
Son Duong is currently offline Son DuongFriend
Messages: 60
Registered: June 2016
Member
Hi Klemen,

this is exactly what I am looking for, thank you very much! Smile

Klemen Petrovcic wrote on Mon, 22 August 2016 10:52
Hi Son Duong.

The OneM2M version of the OM2M platform uses the Californium library to implement the general protocol binding. For a better
understanding of the binding, you can take a look at the protocols specifications.

I've looked at the two popular CoAP clients: the Copper plugin and the libcoap CLI tool. Both of them are, at this time,
not suitable to be used with this binding, since they do not support multiple custom options (you can read about them in the mentioned specifications).

I built a simple CoAP client, using the Californium library, with the purpose of demonstrating its usage with the general
CoAP binding. The provided examples are analogous to the ones of the HTTP tutorial.

I'd also like to mention the changed usage of the name attribute. In previous releases of the platform,
there was a special field (X-M2M-NM in HTTP), which was used for specifying the name of the resource, which was to be created.
In the latest version, this field is replaced, by a suitable attribute ("rn" or "nm"). This change is also included in the provided client.

I changed the default platform CoAP port to 5683, in the config.ini file of the suitable CSE unit, since the plugin doesn't use
the TLS encryption yet. The attached "coapmonitor.jar" application uses the 5685 port instead (just as an example).

Re: Using CoAP based applications (Copper vs Erbium) [message #1741143 is a reply to message #1741030] Tue, 23 August 2016 10:41 Go to previous messageGo to next message
Son Duong is currently offline Son DuongFriend
Messages: 60
Registered: June 2016
Member
Hallo Klemen,

I tried your Coap client and it works fine, thank you once again. May I ask you another question? In the OM2M package, there is already a LAMP example (plugin number 30) and I would like to switch on the lamp using Coap request. Based on your Coap client example, I created another request function, called: returnCreatePostRequestString() which is used to create the POST request to switch on the LAMP, and I post this request to the address: coap://127.0.0.1:5683/~/mn-cse/mn-name/LAMP_0?op=setOn&lampid=LAMP_0.

Here is my returnCreatePostRequestString() function to create the POST request:

public static Request returnCreatePostRequestString() {
		// TODO Auto-generated method stub
		// Used to POST something
		
		Request createSrc = new Request(Code.POST);
		byte[] b10 = new byte[8];
		new Random().nextBytes(b10);
		createSrc.setToken(b10); 
		createSrc.getOptions()
		   .setContentFormat(MediaTypeRegistry.APPLICATION_XML)
		   .setAccept(MediaTypeRegistry.APPLICATION_XML)
		   .addOption(new Option(256, "admin:admin"));
		return createSrc;
	}


In the request I just added the option authorization admin:admin, and it works fine with HTTP (tested using Simple REST Client) but unfortunatelly not for the CoAP, the Coap response show Error Code 4.00. It stacked with this Error Log:
[2016-08-23 12:40:44,580 INFO] - org.eclipse.om2m.core.router.Router 
Received request in Router: RequestPrimitive [operation=5,
 to=/mn-cse/mn-name/LAMP_0,
 from=admin:admin,
 returnContentType=application/xml,
 requestContentType=application/xml,
 queryStrings={}]
[2016-08-23 12:40:44,581 INFO] - org.eclipse.om2m.core.router.Router 
Request handling in the current CSE: /mn-cse/mn-name/LAMP_0
[2016-08-23 12:40:44,582 INFO] - org.eclipse.om2m.core.redirector.Redirector 
Sending notification to IPE: sample

May you help me where did I do wrong?

Thank you very much
Son
Re: Using CoAP based applications (Copper vs Erbium) [message #1741276 is a reply to message #1741005] Wed, 24 August 2016 10:17 Go to previous messageGo to next message
Muhammad Shoaib is currently offline Muhammad ShoaibFriend
Messages: 21
Registered: March 2016
Junior Member
Hi Klemen,
Could you direct me how to use the CoAP files you gave? I am kinda stuck here.

Thanks for help.

[Updated on: Wed, 24 August 2016 10:20]

Report message to a moderator

Re: Using CoAP based applications (Copper vs Erbium) [message #1741283 is a reply to message #1741276] Wed, 24 August 2016 10:39 Go to previous messageGo to next message
Son Duong is currently offline Son DuongFriend
Messages: 60
Registered: June 2016
Member
Hi Muhammad,

for sending the CoAP request, you should run the CoAP_Client package. For receiving the CoAP response, in this case is the notification, you should run the CoAP_Monitor package. Just download the files and import them to Eclipse or Netbean and run.

Regards,
Son
Re: Using CoAP based applications (Copper vs Erbium) [message #1741634 is a reply to message #1741005] Fri, 26 August 2016 13:25 Go to previous messageGo to next message
Son Duong is currently offline Son DuongFriend
Messages: 60
Registered: June 2016
Member
hi Klemen,

I have another question about the CoAP Monitor server.

I tried to run the CoAP monitor jar file under port 5685. And I created a subscription container in my AE which set the notification uri (nu) as coap://127.0.0.1:5685/monitor. However when I run the plugin, it was not able to create the subscription container and it show the 5001 error:

[2016-08-26 15:17:03,149 INFO] - org.eclipse.om2m.core.router.Router 
ResourceController to be used [SubscriptionController]
[2016-08-26 15:17:03,164 INFO] - org.eclipse.om2m.core.notifier.Notifier 
Sending notify request to: coap://127.0.0.1:5685/monitor
[2016-08-26 15:17:03,164 INFO] - org.eclipse.om2m.core.comm.RestClient 
the requestIndication RC: RequestPrimitive [operation=5,
 to=coap://127.0.0.1:5685/monitor,
 from=/mn-cse,
 content=<?xml version="1.0" encoding="UTF-8"?>
<m2m:sgn xmlns:m2m="http://www.onem2m.org/xml/protocols">
   <vrq>true</vrq>
   <sud>false</sud>
</m2m:sgn>
,
 returnContentType=application/xml,
 requestContentType=application/xml,
 ]
[2016-08-26 15:17:03,164 INFO] - org.eclipse.om2m.core.router.Router 
OM2M exception caught in Router: No RestClient service found for protocol: coap
[2016-08-26 15:17:03,164 INFO] - org.eclipse.om2m.core.router.Router 
Response in Router= ResponsePrimitive [responseStatusCode=5001,
 content=No RestClient service found for protocol: coap,
 to=admin:admin,
 from=/mn-cse,
 contentType=text/plain,
]


I think the problem because it can not find the coap binding in the RestClient class.

Do you have any idea how to fix this problem. Did the coap monitor server work in your system?

Thank you
Son
Re: Using CoAP based applications (Copper vs Erbium) [message #1742555 is a reply to message #1741634] Mon, 05 September 2016 06:11 Go to previous messageGo to next message
Muhammad Shoaib is currently offline Muhammad ShoaibFriend
Messages: 21
Registered: March 2016
Junior Member
Hi Son Duong,
Thank you alot for helping me out earlier. I downloaded the files and imported it to Eclipse neon (this is a separate eclipse ide which does not deal with OM2M project at all). Attached with reply is an image please have a look and guide.
Thank you for your help.
  • Attachment: Untitled.png
    (Size: 140.28KB, Downloaded 484 times)
Re: Using CoAP based applications (Copper vs Erbium) [message #1742562 is a reply to message #1742555] Mon, 05 September 2016 08:23 Go to previous messageGo to next message
Son Duong is currently offline Son DuongFriend
Messages: 60
Registered: June 2016
Member
Hi Muhammad,

I think you miss the californium libraries. You can download them here: https://mvnrepository.com/artifact/org.eclipse.californium/californium-core and here https://mvnrepository.com/artifact/org.eclipse.californium/element-connector . After downloading, just add them to your project and everything will work fine again.

Regards,
Son
Re: Using CoAP based applications (Copper vs Erbium) [message #1743381 is a reply to message #1742562] Wed, 14 September 2016 18:19 Go to previous messageGo to next message
Trung Luu is currently offline Trung LuuFriend
Messages: 32
Registered: June 2016
Member
Hi all,
I'm trying to apply CoAP into the subscribe/notify scenario with sensor create value and send to the actuator. I did with Http and it works normally; however, when I apply the coap monitor in the actuator, the actuator receives the value from sensor but the Response Status code in sensor console is 5000. I use the CoAPMonitor which provided above. Anyone has solution for this? Thanks in advanced!!
Re: Using CoAP based applications (Copper vs Erbium) [message #1743578 is a reply to message #1743381] Fri, 16 September 2016 14:05 Go to previous messageGo to next message
Klemen Petrovcic is currently offline Klemen PetrovcicFriend
Messages: 34
Registered: November 2015
Member
Hi Trung Luu,

the 5000 response is probably due to an incorrect return coap code. In the HTTP monitor.jar, the application returns a response code 204 (no content). I didn't find a suitable corresponding code for the coap protocol, so I returned a hardcoded string, which is incorrect.
Re: Using CoAP based applications (Copper vs Erbium) [message #1743745 is a reply to message #1743578] Mon, 19 September 2016 12:03 Go to previous messageGo to next message
Son Duong is currently offline Son DuongFriend
Messages: 60
Registered: June 2016
Member
Hi Klemen,

I have one more question. When I tried to capture the traffic using wireshark, I searched for coap but it showed udp instead, do you know why this happed`?

Thank you!
Re: Using CoAP based applications (Copper vs Erbium) [message #1743764 is a reply to message #1743745] Mon, 19 September 2016 13:50 Go to previous messageGo to next message
Klemen Petrovcic is currently offline Klemen PetrovcicFriend
Messages: 34
Registered: November 2015
Member
Son Duong wrote on Mon, 19 September 2016 12:03
Hi Klemen,

I have one more question. When I tried to capture the traffic using wireshark, I searched for coap but it showed udp instead, do you know why this happed`?

Thank you!


This is correct. HTTP uses TCP, while CoAP is implemented on the UDP protocol stack.
Re: Using CoAP based applications (Copper vs Erbium) [message #1786289 is a reply to message #1741005] Mon, 30 April 2018 00:46 Go to previous messageGo to next message
soyong kim is currently offline soyong kimFriend
Messages: 4
Registered: April 2018
Junior Member
Hi Klemen Petrovcic.

First of all, thank you for uploading the sample application.

I tried to send CoAP message using your application. but null pointer exception appeared like a picture i uploaded when any message arrived to IN-CSE. so your application tried to send again but after time to live, it closed without explicit answer message.

how do i miss it?

  • Attachment: nullerror.png
    (Size: 79.36KB, Downloaded 205 times)
Re: Using CoAP based applications (Copper vs Erbium) [message #1786747 is a reply to message #1786289] Thu, 10 May 2018 14:33 Go to previous messageGo to next message
Paulo Araújo is currently offline Paulo AraújoFriend
Messages: 8
Registered: March 2017
Junior Member
Hi Soyong Kim, do you already know how to solve it?
Re: Using CoAP based applications (Copper vs Erbium) [message #1787502 is a reply to message #1786747] Sun, 27 May 2018 12:38 Go to previous message
soyong kim is currently offline soyong kimFriend
Messages: 4
Registered: April 2018
Junior Member
Hi Paulo

i solved the problem by modifying CoAPServer class in OM2M source code

i think the problem was "to=coap://localhost/~/in-cse" in the picture i uploaded.

so i modified requestPrimitive.setTo(request.getURI())
to request.Primivice.setTo(request.getOptions().getURIString()) in CoAPServer class

I think this way is not good,
but i don't know how do i solve the problem without modifying the code..

if anyone knows any other way, let me know.

Thanks


  • Attachment: null.png
    (Size: 83.73KB, Downloaded 191 times)
Previous Topic:CoAP between App and in-cse
Next Topic:A nullpointerException occur when i send CoAP message to IN-CSE
Goto Forum:
  


Current Time: Thu Apr 18 11:56:58 GMT 2024

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

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

Back to the top