Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some question about time-related attribute of a client. #636

Open
Asher9977 opened this issue Nov 9, 2021 · 11 comments
Open

Some question about time-related attribute of a client. #636

Asher9977 opened this issue Nov 9, 2021 · 11 comments

Comments

@Asher9977
Copy link

Hi, I'm new here and use the wakaama client and server for testing lwm2m.

Now I'm trying to add time-related attributes(PMIN/PMAX) to get notify on server.

Some problems I don't understand:
(1) If I set the time attribute to /5, it doesn't sending the notify of all the resources under the /5 object.
(2) If I set the time attribute to /5/0/1 then it is not possible to set time attribute to /5. (But it works in reversed way.
(3)If I set /5 to 100/200(PMIN/PMAX) and /5/0/1 to 10/20(PMIN/PMAX), what should be the correct behavior for observing
/5 ?

BTW, how do I set the timeout of writing command on server ?
Thanks in advance.

@sbernard31
Copy link
Contributor

I don't know how it behave in wakaama.
But at a LWM2M specification point of view, I understand that :

(1) I'm not sure I get you but if you mean that "if pmin/pmax is set at /5 level then those attributes are applied to all resources under /5" then it's correct to me.
(2) it should be possible to set pmin/pmax at both level, object (/5) and resource(5/0/1) level in any order. (so looks like a bug)
(3) 100/200(PMIN/PMAX) should be used for /5.

See for more details : http://www.openmobilealliance.org/release/LightweightM2M/V1_1_1-20190617-A/HTML-Version/OMA-TS-LightweightM2M_Core-V1_1_1-20190617-A.html#5-1-1-0-511-Attributes-Definitions-and-Rules

@Asher9977
Copy link
Author

Hi, it is so happy to get your response. : )

(1) I use the time to set PMIN/PMAX to object 5 then observe /5, but it doesn't
send the notify of all resources value under object 5 (/5/0/1, /5/0/3...) as I expected.

One more question, is it possible to clear the time-related attribute of a client ?

Thanks a lot!

@sbernard31
Copy link
Contributor

Still from a specification point of view (I don't know if this is implemented in wakaama), this is possible using an empty attribute with WRITE-ATRIBUTES request.

See : http://www.openmobilealliance.org/release/LightweightM2M/V1_1_1-20190617-A/HTML-Version/OMA-TS-LightweightM2M_Core-V1_1_1-20190617-A.html#6-3-4-0-634-Write-Attributes-Operation

Parameter Required Default Value Notes
<NOTIFICATION> class Attributes Yes   Indicates which Attributes are concerned. When an Attribute is specified without value, it means this Attribute value is unset at the level specified in the operation (Object, Object Instance, Resource, or Resource Instance levels).

@sbernard31
Copy link
Contributor

Just in case that was not clear, to remove pmin/pmax on /5, send : Write-Attributes /5?pmin&pmax

@Asher9977
Copy link
Author

Just in case that was not clear, to remove pmin/pmax on /5, send : Write-Attributes /5?pmin&pmax

Thanks. It seems no way to do that on Wakaama now ? (with which operation ?)

@sbernard31
Copy link
Contributor

sbernard31 commented Nov 9, 2021

I don't know. We must wait from active committers to get more details about Wakaama behavior.

But there are some hint (toClear) which show that maybe this is possible :

@Asher9977
Copy link
Author

Noted, thanks for your reply.

@tuve
Copy link
Contributor

tuve commented Feb 7, 2022

@sbernard31 Maybe I have misunderstood but I am not sure about "(3) 100/200(PMIN/PMAX) should be used for /5." since pmin pmax are attached on resource level even thou they can be assigned on object level.

In the example given by @Asher9977 all resources under /5 except /5/0/1, i.e., /5/0/3, /5/0/5 ... will have 100/200(PMIN/PMAX) attached, whereas /5/0/1 will have 10/20(PMIN/PMAX) attached. So wouldn't an observe on /5 have 10/20(PMIN/PMAX) since one resource will trigger the update more frequently?

@sbernard31
Copy link
Contributor

@tuve to be honest, I'm not sure I still agree with my "me from the past". At least I'm very much less confident.
I totally understand your point and it makes sense.

I try to summarize my confusion here.
Let's agree on some wordings :

  • observation level : is the level (object/object instance / ...) where the notification relationship is established.
  • assignation level : is the level (object/object instance / ...) on which the write attribute is done.
  • attachment level : is the level (object/object instance / ...) on which the attribute is really applied.

(At least this is my understanding)

Following this ☝️, I would say "yes" to 👇. because the assignation level is at object level but should be applied (attachment level) at resource level.

In the example given by @Asher9977 all resources under /5 except /5/0/1, i.e., /5/0/3, /5/0/5 ... will have 100/200(PMIN/PMAX) attached, whereas /5/0/1 will have 10/20(PMIN/PMAX) attached. So wouldn't an observe on /5 have 10/20(PMIN/PMAX) since one resource will trigger the update more frequently?

But reading this : OpenMobileAlliance/OMA_LwM2M_for_Developers#478
I'm now confused again...

I'm not sure if you understand this like me but it seems that :

  1. pmin/pmax attribute assigned to resource level MUST NOT be used for observation relation established at object instance level.
  2. pmin/pmax attribute assigned at object instance level MUST be used for observation relation established at object instance level.

Eventually, I can vaguely understand the 1, but that seems to imply that attributed are never used for observation at Object or Object instance level. (because all have resource attachment level)

The 2 seems to say that the pmin/pmax is applied to object instance level. (but the spec says that pmin/pmax are only attachable at resource level)

So currently, I'm lost... 😅
Did I missed something ?

@tuve
Copy link
Contributor

tuve commented Feb 7, 2022

I have the same understanding of observation, assignation, and attachment. Maybe I have misunderstood assignation and attachment. If the attachment is the same as assignation then the expected behavior would be as described in OpenMobileAlliance/OMA_LwM2M_for_Developers#478 but my understanding is that it is not.

"So currently, I'm lost... 😅", me too

@sbernard31
Copy link
Contributor

@tuve there is some news at OpenMobileAlliance/OMA_LwM2M_for_Developers#478 (but still not clear to me for now), maybe you should watch the issue.

(Maybe already done but) In a more general way, I think it could be a good idea that the whole Wakaama team (@rettichschnidi, @mlasch , @qleisan) watch those github repositories :

I think those are good place to discuss about the specification all together (Wakaama, Leshan, OMA and probably other devs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants