Closed giuseppe-melis closed 5 years ago
In fact the spec is coherent :-) , but the confusion comes from the fact you mix 2 entities which are different in LwM2M : the Path in the command and the Payload/Data/value which could be present in the LwM2M command. . Yes a) & b) : the path in the CREATE command, accepts the Object ID only . the context of the request you are refering to, is the TLV or JSON payload or value (not the path) . so in that structured TLV or JSON data, other LwM2M entities can be present, but all refering to the Object ID provided in the path of the command. So yes in that Structured Data, Object Instance ID can appear but " If Object Instance is not listed at the request, the LwM2M Client MUST assign ID..." (as in the usual case). If Server during TestFest sent CREATE /2/4 they are providing bad request; (good !! who is manipulating the Access Control Object ?) . your d) shows that section 8.2.5 (mapping) and 5.4.6 are coherent to each other's :-) good :-) As example, even limited one, in the ETS Test 1630 you have one ; did you pass it ?
Hope it clarifies your view Th
thank you Thierry, now it's clearer: a) and b): ONLY Obj ID in the path, Instance ID is optional in the payload, data of resources is mandatory in the payload.
if optional Instance ID is not present in the payload, it should be assigned by the client.
I don't find the trace for CREATE 2/4 now: anyway I have the trace for CREATE 16/1 into the path (it's forbidden according to a) so the response of my client was 4.05; it could be a negative test...
I have also some negative cases: CREATE 3 with content-type and payload as text --> 4.00 (4.15 because The specified format is not supported or 4.05 because ID3 is not allowed) CREATE 3 without content-type --> 4.00 (4.00 because Content Format is not specified or 4.05 because ID3 is not allowed) CREATE 3 with content-type as TLV but without payload --> 4.05 (4.00 because Mandatory Resources are not specified or 4.05 because ID3 is not allowed) CREATE 6/1 with payload --> 4.00 (maybe 4.15 because Instance ID in URI cannot be specified) CREATE 7/1 without payload --> 4.05 (maybe 4.15 because Instance ID in URI cannot be specified; 4.05 cannot be returned for obj ID different from 3) CREATE 16 without payload --> 4.00 (4.00 because Mandatory Resources are not specified) CREATE 16/1 with payload --> 4.05 (maybe 4.15 because Instance ID in URI cannot be specified; 4.05 cannot be returned for obj ID different from 3) (maybe the error codes should be tuned...)
Hope this summary could help to clarify everyone Regards Giuseppe
Hi Giuseppe, thanks for all that illustrations; As it is now clarified, issue can be closed :-) Th
OMA-TS-LightweightM2M-V1_0_1-20170704-A
:5.4.6 and 8.2.5
:Some issues or point not so clear in CREATE feature description: a) from table 15 and figures 11 and 12, it seems that "Object Instance ID" parameter mustn't be present in the request (refer to table 16 and table 11 for comparison);
b) Furthermore, from figure 11, it seems that instance ID is not included in the path so the client provided the first available (12/2).
c) Anyway, from section 8.2.5, it seems that instance ID can be present in the request (in the path?): "If Object Instance is not listed at the request, the LwM2M Client MUST assign ID..." some servers during the TestFest sent CREATE 2/4 command
d) Furthermore, from section 5.4.6, it seems that instance ID could be present into the payload: "When there is no reference to Object Instance in the TLV/JSON payload"
Could someone clear these dubts? are some improvements in spec needed, maybe some examples? Thanks