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

ConfigCompositionDataStatus message destroys subscribe information #539

Open
Rawa opened this issue Oct 17, 2022 · 3 comments
Open

ConfigCompositionDataStatus message destroys subscribe information #539

Rawa opened this issue Oct 17, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@Rawa
Copy link
Contributor

Rawa commented Oct 17, 2022


Describe the bug
A ConfigCompositionDataStatus message will destroy subscribe information for a given node.

In our usecase we set up a mesh, with subscribe to groups etc. Then we use DFU directly through BLE, to ensure that the node is up to date we ask the node about it's composition data (to get updated VID). This seems to cause a all subscribes to be removed from the config even though they are in reality still there.

To Reproduce
Steps to reproduce the behavior:

  1. Provision node
  2. Add subscribe
  3. Send message ConfigCompositionDataGet to update composition data.
  4. Subscribe is now gone from the config.

Expected behavior
The subscribe should still be there if the element exists

Platform details:

  • Device: Pixel 6 Pro
  • OS: Android 12
  • Library Version (or Commit): 3.2.4
@Rawa
Copy link
Contributor Author

Rawa commented Oct 17, 2022

mElements.putAll(configCompositionDataStatus.getElements());

I believe this line could be the culprit, basically replacing the entries in the hashmap w/o taking into account what is already there

@Rawa
Copy link
Contributor Author

Rawa commented Oct 17, 2022

Tested it locally, confirmed that it is this line that will remove the subscribe information. It literally replaces all information already in the elements.

@philips77 philips77 added the bug Something isn't working label Oct 21, 2022
@roshanrajaratnam
Copy link
Member

I guess this relates to requesting composition data as the library was based on the assumption that the composition data request will be sent only once during configuration. I guess there seems to be more discussion around this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants