-
Notifications
You must be signed in to change notification settings - Fork 376
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
lwm2mclient_tinydtls problem #661
Comments
If you assume it is an issue of tinydtls, is it possible for you the post a IP-capturing? |
The environment I set up is based on wakaama opensource, and I did't modify any code. |
Unfortunately, it's very long ago, that I was up-2-date with lwm2m or wakaama. |
Okay, I will adopt your advice. |
Having a short look at the bootstrap_server, I wonder, if that supports DTLS for its own communication at all.
May not work with the wakaama bootstrap server, though it uses PSK/DTLS
my feeling is, you used the line
In sum, it requires one, which is common about the current implementation state of wakaama and how that is used. |
After adopting your advice, I found the rehandshake error. Could you please explain why it happend? |
I checked the capture you sent me by mail. It shows some traffic to and from 5784. If your bootstrap server runs on 5685, that traffic in the capture is not related to your question. A CoAP/DTLS endpoint runs on a host's service port. And if you want to capture the traffic you need to use that port to filter the packages. As I already wrote above, I don't think it's a tinydtls issue, it's a question what is actually implemented in wakaama. And that is something out of my scope, others know that better. |
But I found the rehandshake error is arising from the parameter res = dtls_connect_peer(ctx, peer), it will return 54.(not 0), so it will print "error dtls reconnection". Any suggestino to fix this issue? |
Your description of this issue is too wired for me, therefore I can't say too much.
Maybe wakaama prints an error for "otherwise" as well, but I'm not sure why. And again, I can't see, that the bootstrap-server supports DTLS. The client uses
and I can't find that in the bootstrap-server. So, maybe you're better off, to start without DTLS to become more common to lwm2m. |
Actually, I don't use bootstrap server according to your suggestion, and I will send you an email with the code with issue. |
Please not, I will not be able to check your code! |
You don't have to check the code and you can only check the sceenshot I provided. The code I get from the wakaama opensource website and I didn't modify any change. Could you please provide some solution or any related useful resource for me to solve this dtls_handshake issue? |
Again, starting from the begin: The
|
I got your e-mail. No, I can't see more details and so I can't offer more help. |
and I can't find that in the |
Thanks for your explanation. Is there any difference between dtls and tinydtls? Does the lwm2m only support tinydtls? no dtls? Is that because lwm2m is based on coap protocol? |
DTLS is the name of the encryption protocol (see RFC6347 ). All that will not help you to use DTLS successful with on of the wakaama servers, their implementations are just not supporting it. At least, that's what I see. Therefore, just try to use it without DTLS and see, if that works for you as expected. |
Though lwm2m is a specification, it refers to dtls, not to a specific implementation as "tinydtls".
No. lwm2m is a specification, which refers to the coap specification RFC 7252 and the dtls specification RFC6347. wakaama and leshan are implementations of lwm2m. As lwm2m refer to coap and dtls, those lwm2m implementations are also using implementations for coap and dtls. For leshan, that's currently mainly eclispe/californium, which implements coap and dtls. For wakaama, it's "erbium", which is included in the source as coap implementation. And tinydtls is used by the wakaama lwm2m-client. But currently not for the wakaama servers. |
I reference RFC7257, but I found there is some parameter missing in er-coap-13.h. |
You mean RFC7252, not 7257, as you wrote? Not all implementation will put these parameter in a "easy to change" configuration, especially the implementation for embedded use-cases frequently have them "fixed in code". e.g. NSTART larger than 1 requires a lot more in the code to handle parallel pending requests. Also some embedded implementation don't fully implement RFC7252, if multicast is not intended, DEFAULT_LEISURE doesn't make too much sense. |
Thanks for your explanation. The NSTART not defined in wakaama, it explicitly mean its value is 1, right? |
At least, I consider that. it may be even, that you need to consider it in your application code, by not sending new
Please explain, where you need that? See also core-mailing-list (Let me try to explain my involvement: it's years ago, that I worked with/in wakaama. And also years ago, that I decided, that improving eclipse/californium is more important for me. Last year I started to improve tinydtls as well, in order to benefit more from Californium unique features. I mainly used mobile IoT (LTE-M, NB-IoT) and neither the bandwidth nor the device are too constraint there. So the most concerns don't apply to my recent work. I don't plan to focus back on wakaama.) |
I don't implement any application code, just use the wakaama source code.
Does it mean the value of probing rate is 1? |
I'm not sure, if I get that. I would assume, that a lwm2m-device is considered to implement at least some custom code to fill the some application values in the lwm2m resources.
IP-messages are usually forwarded over a couple of links, e.g. "wifi"-"dsl-router"-"ip-provider-network"-"cloud-provider-network". A "unknown ip-route" is then the route, which the message will take, if there was no traffic for a certain amount of time. It may use different links with other speed. Generally, this doesn't make too much difference, but assuming really "narrow-banded" links, it requires to relax the timings.
Did you read the messages in the mailing list? Carsten's answer should help to understand the relation ship. |
Yes, he said that an application should not send a sustained rate of more than about 1 B/s to a peer endpoint that might not be reachable (“into thin air”). So, the probing rate may be smaller or equal to 1 in wakaama? |
That depends mainly on the used message size for the lwm2m-(re)-registration and the notifies. It's not really granted, there are no "means" to throttle it, except you adjust the initial timeout accordingly. If this is relevant for you at all depends then more on the really used network. |
For lwm2mclient_tinydtls:
I type ./lwm2mclient_tinydtls -s 4f75724964656e74697479 -i public -b
Result:
lwm2mclient_tinydtls is stuck in State: STATE_BOOTSTRAPPING and I found it doesn't execute connection_rehandshake function.
Finallt, it show:
lwm2m_step() failed: 0xA3
[BOOTSTRAP] ObjectList restored
Question: Is it correct for the command ? Could you please help me to solve this problem?
The text was updated successfully, but these errors were encountered: