Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » OM2M » sending CoAP Get request to OM2M one by using Copper
sending CoAP Get request to OM2M one by using Copper [message #1758091] Thu, 23 March 2017 12:54 Go to next message
Kuan Lin Chen is currently offline Kuan Lin ChenFriend
Messages: 1
Registered: March 2017
Junior Member
Hello ,

I am trying to create and get resources by sending CoAP request.
First, I started the in-cse, and the CoAP listend on port 5683.
I used the Copper, a Firefox plugin, to send CoAP Get request to in-cse : coap://localhost:5683/~/in-cse. But it responded the error message :Unknown or unauthorized originator.
I guess that it is because we don't configure the account and password in the CoAP request. For example, when I used postman to send a HTTP request, I can add X-M2M-Origin: admin:admin in header. But I have no idea how to set the account and password in the CoAP request by using Copper.

Thank you!
Luke
Re: sending CoAP Get request to OM2M one by using Copper [message #1758100 is a reply to message #1758091] Thu, 23 March 2017 14:25 Go to previous messageGo to next message
Mahdi Ben Alaya is currently offline Mahdi Ben AlayaFriend
Messages: 229
Registered: November 2013
Senior Member
Hello,
You have to use CoAP options. It is option 256 to set the originator.
You are welcome
Re: sending CoAP Get request to OM2M one by using Copper [message #1758101 is a reply to message #1758100] Thu, 23 March 2017 14:27 Go to previous message
Mahdi Ben Alaya is currently offline Mahdi Ben AlayaFriend
Messages: 229
Registered: November 2013
Senior Member
// Standard CoAP Options
public static final int LOCATION = 8;
public static final int CONTENT_FORMAT = 12;
public static final int ACCEPT = 17;

// oneM2M Specific Options
public static final int ONEM2M_FR = 256;
public static final int ONEM2M_RQI = 257;
public static final int ONEM2M_OT = 259;
public static final int ONEM2M_RQET = 260;
public static final int ONEM2M_RSET = 261;
public static final int ONEM2M_OET = 262;
public static final int ONEM2M_RTURI = 263;
public static final int ONEM2M_EC = 264;
public static final int ONEM2M_RSC = 265;
public static final int ONEM2M_GID = 266;
public static final int ONEM2M_TY = 267;
Previous Topic:Regarding Subscription(onem2m)
Next Topic:Communication between MNs (Middle nodes) without the help of IN (Infrastructure Node)
Goto Forum:
  


Current Time: Wed Oct 09 14:15:47 GMT 2024

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

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

Back to the top