> Hi, I'm using CoAP client program and I'm able to get sensor values in
> binary format. For example, If I type ./coap-client -m get
> coap://[fec0::3]:61616/st -T 3a -t binary I get the temperature value of my
> CoAP server.
> Now, I'm interesting to receive data as JSON file, so in the previous
> command I tried to change binary with json, but when I type  ./coap-client
> -m get coap://[fec0::3]:61616/st -T 3a -t json nothing happens. Maybe, I
> missed some parameters into the request I made. Anyway, is it possible to
> retrieve data as a JSON file (or other formats different from binary) from
> a CoAP server?

Hi Emanuele,

you would need to implement that resource data translation of that resource to 
JSON and would need to register with CoAPServer.registerResource() for that 
particular content-type.

At the moment only one content-type per resource is supported. The support for 
more is on our to-do list.

BR,
Markus


> Thanks in advance.
------------------------------------------------
| Dipl.-Ing. Markus Becker
| Communication Networks
| TZI - Center for Computing Technologies
| University Bremen
| Germany
------------------------------------------------
| web: http://www.comnets.uni-bremen.de/~mab/
| mailto: [email protected]
| telephone: +49 421 218 62379
| building: NW1 room: N2260
------------------------------------------------
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to