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

Unset Write-Attributes #784

Closed
madhushreegc opened this issue Jan 7, 2020 · 8 comments · Fixed by #785
Closed

Unset Write-Attributes #784

madhushreegc opened this issue Jan 7, 2020 · 8 comments · Fixed by #785
Labels
bug Dysfunctionnal behavior server Impact LWM2M server

Comments

@madhushreegc
Copy link

Hi,

Leshan version : M10

I tired unset the previously enable writeAttribute request by sending Write-Attributes /5/0/7?pmin=&pmax= but leshan expect value to be passed .

Regards,
Madhu.

@madhushreegc
Copy link
Author

How writeAttribute unset is done?

@sbernard31
Copy link
Contributor

It seems that you maybe found a bug, the specification seems to say that :

"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 command (Object, Object Instance or Resource level)." (§5.4.4Write-Attributes)

I will look at this deeper and work on a fix asap.

@sbernard31 sbernard31 added bug Dysfunctionnal behavior server Impact LWM2M server labels Jan 7, 2020
@sbernard31
Copy link
Contributor

§8.2.5Device Management & Service Enablement Interface :

"A Write Attribute command specifies which value is set to which Attribute and at which level (Object / Object Instance / Resource). In a similar way, the same command without value for the specified Attribute, MUST be used to unset this Attribute for the given level; then the precedence rules applies when notification occurs (section 5.1.1Attributes definitions and Rules)

As example:

a) Write-Attributes/3/0/9?pmin=1 means the Battery Level value will be notified to the Server with a minimum interval of 1sec; this value is set at theResource level.

b) Write-Attributes /3/0/9?pmin means the Battery Level will be notified to the Server with a minimum value (pmin) given by the default one (resource 2 of Object Server ID=1), or with another value if this Attribute has been setat another level (Object or Object Instance: see section5.1.1)"

So in your case, to unset this will be more like : /5/0/7?pmin&pmax (without =)

@madhushreegc
Copy link
Author

Yes correct it should /5/0/7?pmin&pmax .

@sbernard31
Copy link
Contributor

I create a PR about that #785. Could you check if this work for you ?

@sbernard31
Copy link
Contributor

(just in case you missed that write attributes is not supported at client side in Leshan : #534)

@sbernard31
Copy link
Contributor

sbernard31 commented Jan 13, 2020

I will release a 1.0.0-M13 version, so I integrated #785 in master, but I'm sill interested by knowing if this fix your issue.

@madhushreegc
Copy link
Author

Hi Simon, I am quite busy now , I will let you the result once I test .

Thank you very much for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Dysfunctionnal behavior server Impact LWM2M server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants