Coap URI-PATCH for openthread simulator

125 views Asked by At

I´m working in a scientic work and I need to use the openthread simulator. By the documentation (above) to set the coap resource is necessary to use the uri-path, does anyone have an examle how to do that ?

Thanks in advance

Ricardo https://github.com/openthread/openthread/blob/master/src/cli/README_COAP.md#resource-uri-path

resource [uri-path]

Sets the URI path for the test resource.

coap resource test-resource Done > coap resource test-resource Done Sets the URI path for the test resource.

coap resource test-resource Done coap resource test-resource Done

1

There are 1 answers

1
jhui On

The URI-Path to the path component of the URI. If you need the CoAP server to read data from a file when responding to a CoAP Request, you will need to write the code to do so. You can reference src/cli/cli_coap.cpp for example code. In particular, you can see where the resource content is retrieved in src/cli/cli_coap.cpp#L630.