Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Observe Active Cancel support to leshan-server-demo #1538

Closed
2 tasks done
sbernard31 opened this issue Nov 14, 2023 · 5 comments
Closed
2 tasks done

Add Observe Active Cancel support to leshan-server-demo #1538

sbernard31 opened this issue Nov 14, 2023 · 5 comments
Labels
demo Impact our demo (not libraries) server Impact LWM2M server

Comments

@sbernard31
Copy link
Contributor

sbernard31 commented Nov 14, 2023

This is about :

  • add REST API to server demo.
  • add UI to be able to call this API.

This will be useful for coap+tcp support (#1528) because passive cancel doesn't exist with coap+tcp : open-coap/java-coap#71

REST API is need for Zephyr integration tests : #1537.

I have not clear idea about how the UI could looks like, if you have idea do not hesitate to share.

@sbernard31 sbernard31 added server Impact LWM2M server demo Impact our demo (not libraries) labels Nov 14, 2023
@sbernard31
Copy link
Contributor Author

REST API was added with commit : 2afadfc

API looks like :

# For "classic" observe : 
curl -i  -X DELETE  "http://{yourserver.url}/api/clients/{your_device_endpoint}/{your_node_path}/observe?active"
# Example : 
curl -i  -X DELETE  "https://leshan.eclipseprojects.io/api/clients/my_device/3442/observe?active"

# For "Composite" observe : 
curl -i  -X DELETE  "http://{yourserver.url}/api/clients/{your_device_endpoint}/composite/observe?paths={list_of_paths}&active"
# Example : 
curl -i  -X DELETE  "https://leshan.eclipseprojects.io/api/clients/my_device/composite/observe?paths=/3/0/1,/3/0/2,/3/0/13&active"

@SeppoTakalo
Copy link

@sbernard31 Thank you.
This seem to work. I can now do both, passive or active cancellations:

image

@sbernard31
Copy link
Contributor Author

Great 👍
Thx a lot for taking time to validate that 🙏

@sbernard31
Copy link
Contributor Author

UI using the new REST API was added by #1555.

@sbernard31
Copy link
Contributor Author

#1555 is now integrated in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
demo Impact our demo (not libraries) server Impact LWM2M server
Projects
None yet
Development

No branches or pull requests

2 participants