Community
Participate
Working Groups
Wakaama don't use the content-type/media-type information to know if the payload is Text or TLV. Currently, resource requests is supposed to be in Text format and others requests in TLV. The specification (8.1) say : "The Content-Type Option MAY be used to indicate the media type of the payload. A default value of plain/text is assumed, allowing this option to be elided for most payloads." The defined content-types are (see 6.3) : "application/vnd.oma.lwm2m+text" "application/vnd.oma.lwm2m+tlv" "application/vnd.oma.lwm2m+json" "application/vnd.oma.lwm2m+opaque" In CoAP the content type is defined as an integer, we don't found the code defintion for this 4 content-type. (see :https://github.com/jvermillard/leshan/issues/28) Waiting, we choose some value arbitrarily in leshan : "application/vnd.oma.lwm2m+text" ->1541 "application/vnd.oma.lwm2m+tlv" -> 1542 "application/vnd.oma.lwm2m+json" -> 1543 "application/vnd.oma.lwm2m+opaque" -> 1544 When you will implement this feature, you could reuse it. (https://github.com/jvermillard/leshan/blob/master/leshan-core/src/main/java/leshan/server/lwm2m/request/ContentFormat.java)