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 an EndpointProvider at Client side for CoAP based on java-coap(fork) #1443

Merged
merged 3 commits into from
Oct 19, 2023

Conversation

sbernard31
Copy link
Contributor

@sbernard31 sbernard31 commented Apr 28, 2023

This aims to experiment transport abstraction layer implementing another endpoint provider at Client side for CoAP based on java-coap(fork).

See more details at #1373.

@sbernard31
Copy link
Contributor Author

First try :

  • Register, Update, DeRegister is OK ✔️
  • Read, Write, Discover, Create, Execute, Delete is OK ✔️
  • Composite Operation is OK ✔️
  • Bootstrap (and corresponding operation : Read, Write, Discover, Delete) is OK ✔️

Not yet available :

  • Observe and Composite Observe
  • ⚠️ Some issue with the way we handle BootstrapFinished

@sbernard31
Copy link
Contributor Author

sbernard31 commented Sep 26, 2023

I rebased this in master (several conflict especially because of Identity Refactoring)

There is also some observe code available at java_coap_client_observe which depends on "not yet released version" of java-coap.

@sbernard31
Copy link
Contributor Author

With java-coap v6.18.0, I added Observe and Composite Observe support ✔️.

⚠️ We still have some issue with the way we handle BootstrapFinished and there are still some TODO in the code but All integration tests are OK ✔️, So I think this is now in a testable state.

@sbernard31
Copy link
Contributor Author

This is now integrated in master.

CoAP support based on java-coap(fork) is available in leshan-client-demo through option -jc :

-jc, --use-java-coap   Use java-coap for CoAP protocol instead of
                         Californium.

And then this looks like :

java -jar leshan-client-demo.jar -u leshan.eclipseprojects.io -jc                                                             

Leshan Client Demo Interactive Console :

Commands:
  help     Display help information about the specified command.
  list     List available Objects, Instances and Resources
  create   Enable a new Object
  delete   Disable a new object
  update   Trigger a registration update.
  send     Send data to server
  collect  Collect data to send it later with 'send' command
  move     Simulate client mouvement.

Press Ctl-C to exit.

                  LeshanClient 2023-10-19 18:02:41,263 [INFO] Starting Leshan client ...  
       DefaultEndpointsManager 2023-10-19 18:02:41,589 [INFO] New CoAP over UDP endpoint based on java-coap library created, 
 for server coap://leshan.eclipseprojects.io:5683 at coap://0.0.0.0:57219.  
                  LeshanClient 2023-10-19 18:02:41,598 [INFO] Leshan client[endpoint:mooky] started.  
     DefaultRegistrationEngine 2023-10-19 18:02:41,603 [INFO] Trying to register to coap://leshan.eclipseprojects.io:5683 ...  
     DefaultRegistrationEngine 2023-10-19 18:02:41,709 [INFO] Registered with location '/rd/dwCSg6EIb5'.  
     DefaultRegistrationEngine 2023-10-19 18:02:41,712 [INFO] Next registration update to coap://leshan.eclipseprojects.io:5683 in 53s...  

@sbernard31 sbernard31 merged commit 85cfde9 into master Oct 19, 2023
1 check passed
@sbernard31 sbernard31 deleted the java_coap_client branch October 19, 2023 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant