-
Notifications
You must be signed in to change notification settings - Fork 407
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
LWM2M Gateway (Object No 25) support #1237
Comments
AFIAK, nobody is working on this currently.
If I remember well this is a LWM2M v1.2 feature, right?
Yep, great to know that.
Yes this is good idea. Even if this will probably not be integrated soon, this could be used as base for future development and/or for discussion and/or for other users who can not wait for a version of Leshan targeting LWM2M v1.2.
OK I will add this feature to the list at : #1235 @sag-eweingaertner, thx for sharing this with us 🙏 |
Should we close this issue ? |
I'd suggest to keep it open, simply to have a forum for people interested in this feature in Leshan. |
Ok we can do that. |
I'm currently maintaining a fork of Leshan with object 25 support. It's kinda ugly (it's abusing the rootprefix) but it kinda works. So it's on my to-do list to clean up this implementation and makes it consumable by the upstream. |
So in place of keeping our dirty hack in my corner, I started cleaning it and added a branch in case someone is interested and would also like to provide feedback: First, we implemented this 1.2 feature on top of the 1.1 branch. Strangely this feature doesn't require any part of 1.2, so it works as is on 1.1 (no specification modification). Same for the client we are using, it's done on a 1.1 client. The idea of this implementation is to create a registration for end IoT devices, reusing the CoAP identity/session of the gateway. All the attached end IoT device registrations will be if the gateway is unregisteredremoved. How to add the registrations? Well, it's not covered by the spec. It's up to the user. What we do in our implementation is we have a registration handler, which reads/25 (if it's advertised by gateway registration). |
@jvermillard, I add a link to your blog post about this : https://vermillard.com/post/object25/ |
I took some time to look at object25. I created a @jvermillard, I didn't tested but if you find time you can review/try it and let me know if this way works for you. The main benefits of I also read more carefully the Gateway specification and current code should probably not work with :
|
After looking at the code, it looks like a good idea; I need to test it now. |
I started to test it, it's starting to work. I need to finish, but I don't think the idea has fundamental issues. Some first minor comments:
|
Another feedback but not related is the "application data". Most libraries call it user data, user-defined data, or metadata. I was confused by the Registration.java Javadoc: It doesn't really explain the purpose: arbitrary data (for example business data or extra client information) associated with the registration by the library user. |
👍
I'm not surprised you find bugs in
Currently there is 2 way to customize Leshan :
In this case, changing the
The feature was requested by @msangoi. If you still feel that this is not clear enough, please open a dedicated issue where we will discuss how to improve it. |
My feedback is just on the naming, mainly the usage of the "application" term vs. "user" or "metadata" IMO, it makes sense to me to have a way to attach free-form contextual data to the registration. On the gateway-service, I'm not using the module; I use it as an example and copy/paste it into my server code to make it work. |
You just want to change javadoc or also getter name ?
Maybe this is worth anyway to fix the branch for people which would like to experiment this ? |
I put some fix to previous solution in And I created another branch |
After some discussion, I settled on the alt2 version since it looks less exposed to Leshan API breakage |
To what extent is the implementation of the gateway for obj25, obj_alt and obj_alt2 complete at the specification level? |
The alt2 idea works to the extent of some things like /dp send operation. there are probably some other quirks but the base read/write/observation/registration works |
Thank you for your answer, jvermillard. Have you verified the operation of the gateway using actual devices? |
yes, with an LTE-M LWM2M gateway with Bluetooth sensors as end IoT devices |
I would like to ask about obj25_alt2. Has the operation been verified for devices that perform IP communication as end devices communicating with Gateway?
|
The spec does not cover how the Gateway and the end device communicate; you can imagine whatever you want. So, I don't understand the question. I'm using released cut from master without any changes |
That was not a good way to ask the question. I would like to ask about the usage of Obj25_alt2. |
This branch and feature cover only the server-side implementation, so you need a client implementation of the LWM2M client plus gateway support. |
I understood, I need to support the client and the Gateway myself. I have two new questions. The second question is about the server side program. |
I have been creating a client. Could you tell me how to program the IoT Device Objects resource on the client side? |
From #1237 (comment) :
|
@sbernard31 We've seen that you also looked into the Gateway feature specified with LWM2M 1.2. Like yourself, I was also confused by it at first, but thanks to the discussion and the Gateway spec, it becomes quite clear what this is all about. And it is pretty exciting. Out of curiosity, do you know about any activity or if somebody implementing Gateway support in Leshan officially? Or is this currently on your agenda?
A customer of ours informed us a couple of weeks ago that they hacked Gateway support into the Leshan code base somehow, simply with the goal of figuring out if it can be done. It turned out to be possible by hacking around the limitations of the Link class (number of path elements, string prefixes required) in combination with some other hacky ways not shown during this call. Certainly not something to directly use, but it was great to see it can be done.
We have encouraged them to push it to a branch here, but I'd also like to know if there is possibly somebody else also working on it already. From our perspective, Gateway is a highly anticipated feature...
The text was updated successfully, but these errors were encountered: