OpenMobileAlliance / OMA_LwM2M_for_Developers

OMA LightweightM2M public resources.
http://openmobilealliance.github.io/OMA_LwM2M_for_Developers/
Other
238 stars 52 forks source link

Alternate path and discover request. #534

Open sbernard31 opened 3 years ago

sbernard31 commented 3 years ago

The specification define alternate path.

By default, the LwM2M Objects are located under the root path. However, devices might be hosting other CoAP Resources on an endpoint, and there may be the need to place LwM2M Objects under an alternate path.

When registering, or updating its registration, a LwM2M Client MAY include an OMA LwM2M link in addition to the Object links in the registration payload. The link is identified by the RFC 6690 [RFC6690] Resource Type parameter "oma.lwm2m".

I ask msyself if the DISCOVER payload must contains the root path or not ? E.g. if at registration device sends : </lwm2m>;rt="oma.lwm2m",</lwm2m/1/0>,</lwm2m/3/0> On a DISCOVER request on /3 what is the right expected payload :

// no alternate path
</3>;pmin=10,</3/0>,</3/0/1>, </3/0/2>, </3/0/3>
// alternate path with OMA LwM2M link 
</lwm2m>;rt="oma.lwm2m",</lwm2m/3>;pmin=10,</lwm2m/3/0>,</lwm2m/3/0/1>, </lwm2m/3/0/2>, </lwm2m/3/0/3>
//  alternate path without  OMA LwM2M link 
</lwm2m/3>;pmin=10,</lwm2m/3/0>,</lwm2m/3/0/1>, </lwm2m/3/0/2>, </lwm2m/3/0/3>
sbernard31 commented 3 years ago

@dnav, @hannestschofenig any idea about this ?

sbernard31 commented 3 years ago

I guess the question is also relevant for the "CoreLink" data type.

sbernard31 commented 3 years ago

I guess first one (no alternate path) is OK (probably the better one) The second one (alternate path with OMA LwM2M link) could be possible too. The third one (alternate path without OMA LwM2M link) could be problematic to handle as we need the registration to know the root path. So I really hope this is not the right one

Anyway 1) or 2) could be implemented but not at the same time so I would like to be sure which one is the right one.

As the specification says nothing about discover operation in alternate path, I guess this is rather the 1) ?

sbernard31 commented 2 years ago

@dnav, @hannestschofenig (or anyone else) I'm currently refactoring the Link API of Leshan and this will be really helpful to get clarification about this. So if you find time, this will be really appreciated :pray:.

sbernard31 commented 2 years ago

I guess first one (no alternate path) is OK (probably the better one) The second one (alternate path with OMA LwM2M link) could be possible too. The third one (alternate path without OMA LwM2M link) could be problematic to handle as we need the registration to know the root path. So I really hope this is not the right one

Thinking a bit more about this :thinking:, maybe the second one could be annoying too as we need to handle inconsistency between the information giving at registration time and at discover time.

mkgillmore commented 2 months ago

@sbernard31 @dnav I believe this is addressed by CORELINK, please let me know if you still have any concerns

sbernard31 commented 2 months ago

@mkgillmore it's still not clear to me but maybe I missed something.

I believe this is addressed by CORELINK

Could you provide your interpretation and also link to CORELINK which make you think what you think ? :slightly_smiling_face: