Closed kijSims closed 1 year ago
I didn't get too much your explanation :grimacing: anyway note that leshan-server-demo is not intended to be reused to build some production server. This is just a demo ... Leshan library aims to be reused for production.
To sum up, I would like to know the stability of leshan-server's connection to devices through LwM2m protocol.
At least, I can say we use it in production environment without any issue. I believe that Leshan and Californium are largely used.
Interface delays now occur every dozen or so times,
If this happens so frequently, this should be not so hard to understand what happens with log or tcp dump capture :thinking:
Bonus question : Are you using leshanServer.send()
sync or async way ?
Thank you for taking the time to answer my question !
I used leshanServer.send()
sync in my project.
After I tested the interface last night and found that there was a communication problem between devices A and B, it seems that Leshan and Californium are really trustworthy. Therefore, I want to sort out the test data and ask the provider of device A to check their problems.
send() can block for tens of seconds if there is some packet drop and re-transmission (which is normal with CoAP/UDP). It's probably more a link issue.
I used leshanServer.send() sync in my project.
Most of the time for production server this is better to use async way. sync way is more for demo or testing.
@kijSims let us know if/when we can close this issue.
I'm sorry about that.
I've identified the source of the problem. I used Wireshark to capture packets and found that the target device responded late or even did not respond to the packets. Leshan is no problem.
Thank you very much ! Thank you Leshan !
You're welcome :wink:
Question
Now I have a problem with my project. In the project leshan-server-demo, I used leshanServer to connect to device A. And I defined an interface which is called by the third party system. In the interface, it first calls the method leshanServer.send() to send information to device A, then device A will do some processing and send the information to the connected device B, and finally return the result to my system.