Closed pmartinez-tst closed 7 months ago
1) It's not clear to me but I understand you are using leshan-server-demo at server side and a closed source embedded device, right ? 2) I guess the log you shared are server log, right ?
If my assumption are right, I see that your log are about DatagramSocketTransport
which is a java-coap class, So I guess you are using :
coap://leshan.eclipseprojects.io:5685
: CoAP over UDP endpoint based on java-coap library.
This endpont is coap
(UDP) only and you say you try to connect with coaps
(UDP over DTLS).
So :
coap
(no security) coaps://leshan.eclipseprojects.io:5684
: CoAP over DTLS endpoint based on Californium/Scandium library. Bonus question : Why are you using a so old version ?
All your assumptions were right. Regarding the port... Ok, my fault. It works with 5684. I did not see the other one.
Thank you. I will close this.
You're welcome :)
Question
I have tried to connect a client using UDP DTLS port with PSK id and PSK content but I guet an error about "CoAP version 0 not supported"
2024-04-10 09:25:49,569 DatagramSocketTransport [WARN] com.mbed.coap.exception.CoapException: CoAP version 0 not supported com.mbed.coap.exception.CoapException: CoAP version 0 not supported at com.mbed.coap.packet.CoapSerializer.deserialize(CoapSerializer.java:138) at com.mbed.coap.packet.CoapSerializer.deserialize(CoapSerializer.java:118) at com.mbed.coap.transport.udp.DatagramSocketTransport.blockingReceive(DatagramSocketTransport.java:93) at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829)
I guess my client is using version 0 ( It is an embedded device so I cannot access its source code).
Is there something I can do here to solve this on the leshan server side? This is the version I am using right now:
leshan-server-demo v2.0.0-SNAPSHOT
Commit ID : ab645dd10ab5e9c9d982e22621ad92cb3a2e0327 Build Date: Mon Dec 11 18:06:17 CET 2023 (1702314377314)