What product/components do you use and which version/fix level are you on?
LwM2M Protocol Integration, 10.15.0.
Is your question related to the free trial, or to a production (customer) instance?
What are you trying to achieve? Please describe it in detail.
Recently we updated a client’s development Cumulocity tenant from 10.11.0 to 10.15.0.
10.15.0 adds support for LwM2M 1.1 and obviously has some major backend changes to the LwM2M agent. I assume its based on Eclipse Leshan?
Anyway, this client’s LwM2M devices rely on an Object’s execute command to update device settings (of a energy meter).
Essentially a parameter query is provided to the execute command which looks like this:
On 10.14.0 and below this would work fine, but now I receive the error:
Invalid Execute request : [Unable to parse Arguments [2?channel=1&format=1&kfactor=1&id=“OMITTED”&count=26995&units=“L”] : [,] separator expected at index 1 after ]
So it’s clear the input validation has changed, but when I replace the query string with commas, I get errors with an unexpected character. The format has changed and I can’t find any documentation as to what it should be now.
Do you get any error messages? Please provide a full error message screenshot and log file.
Invalid Execute request : [Unable to parse Arguments [2?channel=4&mdl=1&format=1&kfactor=1&id=“OMITTED”&count=26995&units=“m3”] : [,] separator expected at index 1 after ]
Have you installed all the latest fixes for the products and systems you are using?
Thanks for the detailed information. We will investigate this on our side and will update here with the findings.
Thanks, we are migrating production to 10.15 in the very near future (i.e. next week). So hopefully we can get some feedback on this issue fairly soon.
Here are our findings.
The LWM2M Agent with 10.15 version comes with an updated Leshan library and this library now is more compliant to the OMA LWM2M specification.
In the OMA LWM2M specification (OMA-TS-LightweightM2M_Core-V1_1_1-20190617-A_full),
it states that execute operation argument with plain text must follow the following syntax:
arglist = arg *( "," arg )
arg = DIGIT / DIGIT "=" "'" *CHAR "'"
DIGIT = "0" / "1" / "2" / "3" / "4" / "5" / "6" / "7" / "8" / "9"
CHAR = "!" / %x23-26 / %x28-5B / %x5D-7E
Since the execute argument does not follow this syntax, the operation fails.
Although this execute operation argument does not follow the specification, we still want to enable a way for the devices that worked with LWM2M Agent 10.14 and earlier versions. In order to do that we would like to introduce an execute-legacy shell command. We will backport this feature to 1015.
Thank you, I appreciate the addition of a execute-legacy shell command and attempts to aid backwards compatibility.
I wanted to notify that the solution is already public and included in our user documentation.
You can search for “executelegacy” operation here: LWM2M - Cumulocity IoT Guides
The change is available if you have equal or higher versions than 10.15.0.345, 10.16.0.202.