Giter Club home page Giter Club logo

Comments (4)

tomekmalek avatar tomekmalek commented on May 30, 2024 2

Hi @kFYatek,

Thank you for your explanation. You have a great software 👍
It seems to be OK (see screenshot). I am performing additional tests on my side and after that I will close this issue.
Thank you for your help.

Anjay_DTLS2

best regards
Tomasz

from anjay.

kFYatek avatar kFYatek commented on May 30, 2024

Hi Tomasz,

In general, your scenario should "just work", no special configuration should be necessary.

Can you send the actual PCAP file instead of just the screenshot? The lack of proper DTLS session resumption may be a problem on either the client or the server side. My initial suspicion is that the server may not recognize the session ID that is supposedly sent as part of the Client Hello during the reconnection - however I cannot verify this hypothesis based on your screenshot alone.

from anjay.

tomekmalek avatar tomekmalek commented on May 30, 2024

Hi @kFYatek,

Thank you for your answer. Below I am attaching pcap file and log from my console.
For your information, I also tested DTLS session resumption with LeshanDemoClient and the same LeshanDemoServer and it seems to be OK.

Anjay2LeshanDemoServer.zip

Best regards
Tomasz

from anjay.

kFYatek avatar kFYatek commented on May 30, 2024

Hi @tomekmalek,

We have looked at your PCAP and indeed the client is not sending the session ID, so the problem is on the client side.

I have examined our code once again, and it seems that my previous answer was wrong. In your case (communication with the server is blocked on the router), I think Anjay is attempting to send a Register message (which also causes a DTLS handshake attempt) and fails. When the library determines this failure, the DTLS session cache is cleared, so the resumption will not be attempted.

You can test the DTLS session resumption by, instead of blocking the communication on the router, putting the Anjay library into offline mode and back (see anjay_transport_enter_offline() / anjay_transport_exit_offline() - in the command-line demo client, you can use enter-offline and exit-offline commands). The intended flow is that the Anjay library is expected to be notified when e.g. network link is lost, through these function calls. In case of actual communication errors, though, the DTLS session will get invalidated to effectively reset the state and maximize the chance of a successful connection.

I hope that this explanation makes sense to you.

from anjay.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.