Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wakaama-dev] Why PUT cannot create object?

Hi Sviat,

Wakaama is a LwM2M implementation, where during Device Management & Service Enablement Interface, CoAP PUT is used to Replace existing object's value (LwM2M Write Operation) and on the other hand, COAP POST is used to create an Object Instance (LwM2M Create Operation).

Although during Bootstrap Interface, COAP PUT is used for both i.e. to Replace existing or to Create a new Object Instance (LwM2M Write Operation).

Please refer Section 8.2.3 and 8.2.5 of LwM2M specification document at http://www.openmobilealliance.org/release/LightweightM2M/V1_0_1-20170704-A/OMA-TS-LightweightM2M-V1_0_1-20170704-A.pdf

Thanks,
Manoj


On Tue, Nov 28, 2017 at 6:51 PM, Святослав Турко <luckyrtf@xxxxxxx> wrote:
Hello colleagues,

In function dm_handleReques of core/management.c in case when message->code == COAP_POST, object can be created using object_create, but in case when message->code == COAP_PUT, object cannot be created.
Could you please explain, why for COAP_PUT there is no ability to create object?
 "If no resource exists, then the server MAY create a new resource with that URI, resulting in a 2.01 (Created) Response Code."
I understand, that "MAY" means, that interpretation is free, so if world "MAY" is the only reason why for COAP_PUT there was not implemented possibility to create object, please let me know.
Also if you know some other reasons why for COAP_PUT there was not implemented possibility to create object, please let me know that reasons.

regards, Sviat

_______________________________________________
wakaama-dev mailing list
wakaama-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/wakaama-dev


Back to the top