-
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
Implement Server Object resources #561
base: main
Are you sure you want to change the base?
Implement Server Object resources #561
Conversation
Resources implemented are: Disable (4), Registration Update Trigger (8), Bootstrap-Request Trigger (9), and Last Bootstrapped (12). The default value of 86400 is also assigned to Disable Timeout (5) when creating instances if not provided. Signed-off-by: Scott Bertin <[email protected]>
Some hands on observations from running the PR (not necessarily issues). Comments?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See general observations in conversation
I'll try to take a look at it in the next couple of days. The Disable and Bootstrap-Request Trigger look to be problems. Not sure about Last Bootstrapped. Time is tight for me right now. I'm moving 1000 miles a week from now and will be unavailable for 2 weeks after that. |
The disable de-registers before sending the response to the execute. Should be the other way around, but will probably require another server state to change that. The client exiting on Bootstrap-Request Trigger is likely because it doesn't have a bootstrap server configured. It does not exit if run with -b which sets up a bootstrap server. Last Bootstrapped is initialized to -1, which matches the time printed. |
This allows the response to an Exec of /1/0/4 to be sent to the server before the deregistration is sent. Signed-off-by: Scott Bertin <[email protected]>
(I looked at this quickly and maybe I didn't get the issue correctly but just in case) If the issue is about rebooting before the server get the response of the Execute request, a solution could be to use a CON separated response and wait for server acknowledgement of the response before to reboot. (just an idea) |
Not a reboot, but a disable. The code was sending the deregister before responding at all to the Exec of /1/0/4 to disable. The code processing the execute needs to return before the deregistration is sent. I moved the deregistration to happen on the next lwm2m_step() call. I suppose the response could be lost in transit, but I'm not sure that adding a separate CON response is the right solution. |
OK thx for clarification.
I guess it could be :) The specification says (talking about
When a client deregister itself, Leshan cleans all about its registration and cancels all ongoing/pending requests linked to it. |
I can take a look at doing a CON response. Since I'm moving this weekend (and most of the following week) it will be a couple weeks before I can though. |
Please rebase on current master once work on this PR resumes. |
@sbertin-telular any chance this gets merged soon? (No urgency other than I have a test that depends on it) |
I haven't had any time to work on it since I moved. I'm not sure yet when I'll be able to get back to it. |
It doesn't look like I'll have time to work on Wakaama anytime soon. If someone else wants to pick this up and finish it, go ahead. That goes for my other changes in https://github.com/sbertin-telular/wakaama/tree/lwm2m_1.1 also. I wish I had time to finish contributing them, but it doesn't seem likely for the rest of the year. |
Too bad 🙁. |
Resources implemented are: Disable (4), Registration Update Trigger (8),
Bootstrap-Request Trigger (9), and Last Bootstrapped (12).
The default value of 86400 is also assigned to Disable Timeout (5) when
creating instances if not provided.
Signed-off-by: Scott Bertin [email protected]