Hi David and Kraus,
Thanks for your response. That is good to hear.
We are using the most recent default Leshan and Wakaama projects.
We are using resource 1 of the test object 1024 on the client for testing. We have defined a model for this object on the server using the json format below, specifying resource 1 as
an integer.
When we write a ‘1’ from Leshan, we get the output on the wakaama console below (it is being interpreted as type 'LWM2M_CONTENT_TLV_OLD') and we get a 4_06 error on Leshan.
Thanks for your help,
John
//----------------------------------------------------------------------------------------------
./lwm2mclient -4 -n z3 -h 10.4.0.98
Trying to bind LWM2M Client to port 56830
LWM2M Client "z3" started on port 56830
> Opening connection to server at 10.4.0.98:5683
-> State: STATE_REGISTERING
22 bytes received from [10.4.0.98]:5683
64 41 19 D4 D4 19 0A 3C 82 72 64 0A 63 79 48 65 dA.....<.rd.cyHe
4A 4A 75 55 4D 47 JJuUMG
-> State: STATE_READY
-> State: STATE_READY
-> State: STATE_READY
-> State: STATE_READY
25 bytes received from [10.4.0.98]:5683
44 03 BB 6A 67 13 71 59 B4 31 30 32 34 02 31 30 D..jg.qY.1024.10
01 31 12 06 06 FF C1 01 01 .1.......
Type is of 'LWM2M_CONTENT_TLV_OLD'
-> State: STATE_READY
-> State: STATE_READY
//----------------------------------------------------------------------------------------------
Json Format:
{
"name":"Test Object 1",
"id":1024,
"instancetype":"multiple",
"mandatory":true,
"description":"my description",
"resourcedefs":[
{
"id":1,
"name":"Power",
"operations":"RW",
"instancetype":"single",
"mandatory":true,
"type":"integer",
"range":"0-255",
"units":"johnsters",
"description":"a"
},
{
"id":3,
"name":"Test float",
"operations":"RW",
"instancetype":"single",
"mandatory":true,
"type":"float",
"range":"",
"units":"davesters",
"description":"b"
}
]
}
From: wakaama-dev-bounces@xxxxxxxxxxx [mailto:wakaama-dev-bounces@xxxxxxxxxxx]
On Behalf Of David Navarro
Sent: Tuesday, May 30, 2017 10:08 AM
To: 'Wakaama developer discussions' <wakaama-dev@xxxxxxxxxxx>
Subject: Re: [wakaama-dev] Leshan server communicating with a Wakaama client - 4_06 NOT ACCEPTABLE error
Hi,
Do not worry, Leshan Servers and wakaama Clients communicate with each others every day both in test and deployed systems.
The wakaama payload you quote ‘FF 31’ is a text encoding of the value ‘1’
The Leshan payload ‘FF C1 01 31’ is the TLV encoding of the value 49 of a resource with ID 1. ( see section 6.4.3 of the LwM2M Specification
http://www.openmobilealliance.org/release/LightweightM2M/V1_0-20170208-A/).
Regarding the 4_06 NOT ACCEPTABLE error, we’d need to know which resource you are trying to write. Apparently, it is not in the expected range.
Regards,
David Navarro
Hi Folks,
Has anybody managed to have a Leshan server communicating with a Wakaama client?
After the one-byte Payload Marker (0xFF) the Wakaama server only sends the payload e.g. ‘FF 31’ – when sending the client a resource value of `1`.
The Leshan server seems to send a ‘header’ within the payload. Taking the same example, sending the client a resource value of `1` to the Wakaama client, it would display ‘FF
C1 01 31’ as the payload in the wakaama client console. The Wakaama client responds with a 4_06 NOT ACCEPTABLE error.
Does anybody know what these bytes represent and a workaround to have a Leshan server communicating with a Wakaama client?
Many thanks
John
--------------------------------------------------------------
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all
copies.
This e-mail and any attachments may contain confidential material for the
sole use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.