Android-nRF-Mesh-Library: Bug in parseMeshPduNotifications
Describe the bug parseMeshPduNotifications get stuck in loop if node is not in provisioner’s config: https://github.com/NordicSemiconductor/Android-nRF-Mesh-Library/blob/e03b1eba6cf4d7bb41b1fa36d3ce8055e8df4208/mesh/src/main/java/no/nordicsemi/android/mesh/transport/BaseMeshMessageHandler.java#L113
I’m not sure exactly what is intended with the while loop logic, for what I can tell it might as well be replaced with while(true), and if the node is not found this will result in an endless loop.
To Reproduce Setup a mesh, Delete node X from mesh Connect to node X as Proxy (whom is not in config anymore) Configure it as Proxy
Device will get stuck in loop of parsing message.
Expected behavior Unsure of expected behavior, since node is not in config, it should probably not be returned but method should anyhow not get stuck.
Platform details:
- Device: Pixel 5
- OS: Android 12L
- Library Version (or Commit) 3.1.6
Logs / Screenshots
12-16 14:17:51.427 24143 24253 V BaseMeshMessageHandler: TTL for received message: 13
12-16 14:17:51.427 24143 24253 V BaseMeshMessageHandler: TTL for received message: 63
12-16 14:17:51.427 24143 24253 V BaseMeshMessageHandler: TTL for received message: 46
12-16 14:17:51.427 24143 24253 V BaseMeshMessageHandler: TTL for received message: 6
12-16 14:17:51.427 24143 24253 V BaseMeshMessageHandler: TTL for received message: 125
12-16 14:17:51.427 24143 24253 V BaseMeshMessageHandler: TTL for received message: 43
... # About 40000 lines of same print
12-16 14:18:27.592 24330 24377 V BaseMeshMessageHandler: TTL for received message: 44
12-16 14:18:27.592 24330 24377 V BaseMeshMessageHandler: TTL for received message: 10
12-16 14:18:27.593 24330 24377 V BaseMeshMessageHandler: TTL for received message: 50
12-16 14:18:27.593 24330 24377 V BaseMeshMessageHandler: Sequence number of received access message: 3756400
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 21 (14 by maintainers)
Commits related to this issue
- Fixes issue #461 where the while loop was not breaking even if the node was found or not. — committed to NordicSemiconductor/Android-nRF-Mesh-Library by roshanrajaratnam 3 years ago
- Fixes issue #461 where the while loop was not breaking even if the node was found or not. — committed to NordicSemiconductor/Android-nRF-Mesh-Library by roshanrajaratnam 3 years ago
Yes, I tested as mentioned before, this seems like it has resolved it. Not sure if you’ve added some comment if it fails to decode? Would it be possible to get a release out soon this and the other new fixes?
thank you!
Great that it works, I will look in to adding some kind of log.
As of now there is no way of notifying the user of any messages sent from an unknown node, but this can be done by simply notifying the user by adding a callback. I will look in to this.
As you may know, the correct approach to delete a node from the network is by sending the
ConfigNodeReset. Upon receiving the statusConfigNodeReset, the node is deleted from the list of nodes and it’s address is added to the exclusion list. However simply deleting a node will not delete any of it’s network configuration. All it does is removing from the network i.e. list of nodes and adding it’s address to the exclusion list. The idea of adding this delete API is to allow the user to delete a node from the network that may have failed due to a hardware malfunction etc. Therefore you will always be able to connect to it if the node came back to life. There is nothing much we can do about it. There’s always a possibility of multiple provisioners modifying a network but that’s more like an application specific feature that a user has the freedom to define and implement.lol not sure if it is a great achievement 😅 Have fun fixing this !
@Rawa @R0m4in-dooz you succeeded proving me wrong!
@R0m4in-dooz may be you should create a new issue?