Skip to content
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

Observations not managed after an empty "Update Registration" #80

Open
FRDavid opened this issue Nov 18, 2016 · 2 comments
Open

Observations not managed after an empty "Update Registration" #80

FRDavid opened this issue Nov 18, 2016 · 2 comments

Comments

@FRDavid
Copy link

FRDavid commented Nov 18, 2016

Hello,

We have detected that after send an empty "Update registration" packet to the LwM2M Server, the next observations packets are not processed (received and sent to the Orion Context Broker).

Next image illustrates how the observations are being ignored after the update registration (with empty payload):

updateremoveobserver1

This occurs because Lightweight-IOTAgent expects receive always the objects in the "Update registration" packet payload, but this is an optional case, which is usually used when new instances or objects are enabled/disabled/created after the registration process. The most common case is avoid this overload on each "Update registration" packet.

Currently, the behaviour when an "Update registration" packet is received is:

  • Subscriptions are removed.
  • Update device information.
  • Create again the subscriptions (based on the objects which appear in the "Update registration" packet payload).

Can be found in "lib/services/lwm2mHandlers/updateRegistration.js"

async.waterfall([		 
      removePreviousSubscriptions,		
      apply(iotAgentLib.getDevice, device.name),		 
      apply(commonLwm2m.observeActiveAttributes, payload)
], callback);

In order to avoid a process overload on each "Update registration" packet and the current problem, we purpose avoid to remove/create the subscriptions if the payload is empty.

Next image illustrate how the observations are now received after the update registration (with empty payload):

updateremoveobserver2

Tests are passed correctly.

Note: As future work, will be ideal check the existence the objects in the payload, because any other information (mode, lifetime, ...) can be also updated to the LwM2M Server through this way.

BR,
David

@FRDavid
Copy link
Author

FRDavid commented Feb 23, 2018

In order to close this issue: @dcalvoalonso, you did some modifications on this software related with updates, do you think this issue have been solved?

@fgalan
Copy link
Member

fgalan commented Feb 23, 2018

If solved, it would be great to include in this issue a link to the PR fixing the issue and the corresponding entry in the CHANGES_NEXT_RELEASE_FILE (at the present moment, no mentions for issue #80 in https://github.com/telefonicaid/lightweightm2m-iotagent/blob/master/CHANGES_NEXT_RELEASE).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants