Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [leshan-dev] Quering information from lwm2m device in different formats

Hi,
   1) You're right the JSON format is not supported for now. (not really planned at short term, but contribution is welcome)

   2)For you second question, as I understand the specification (see 6.3 Data Formats for Transferring Resource Information) :
-  Text and opaque format is strictly for Single Resource.
-  TLV and JSON format is strictly for Object Instance or multiple instance Resource.
   As  /3/0/1 is a single resource of type string the format should be TEXT.

  Currently, the leshan server is less strict than the spec and you should use tlv format for single resource.
 (for WriteRequest you could set the format in constructor, for ReadRequest it will be read in the CoAP response)
  If the format is not defined the leshan server will try to find it automatically.
  The leshan client are still under development about that, it have some problems/bugs with data formats and payload encoding.

  But when I read tests specifications (OMA-ETS-LightweightM2M-V1_0-20140226-C.pdf 6.2.1, 6.2.2 and 6.2.3), it's not so clear.
  It seems you should be able to send a Read request by specifying the data format... It's strange, I can't find something like that in the specification ... and for now, with leshan server, you can not chose the data format on a read request.

Simon
Le 19/01/2015 18:18, Alseddeg Nizar a écrit :

Hello , We are using Leshan API. We are going through test cases (OMA-ETS-LightweightM2M-V1_0-20140226-C.pdf 6.2.1, 6.2.2 and 6.2.3) and trying to query information from the device in different format. As I understand Leshan is currently supported Plain Text and TLV, but JSON has not been implemented. Is this correct?

 

Another small question, when it says querying information in TLV format , it means the server will issue a Get /3/0/1  request and the client responded back in TLV format, then the server should be able to parse the response???

 

 

Thanks,

Nizar…!


This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.


This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus


_______________________________________________
leshan-dev mailing list
leshan-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/leshan-dev


Back to the top