Other Parts Discussed in Thread: Z-STACK
Hi,
Revisited a problem found in Z-stack 2.6.1 (Existing deployments)
Setup : 9 routers, 1 Master router writes a attribute value to 8 other routers periodically
Approach 1: Multicast was used
Problem : Master would stop Writing attributes after 'X' times and eventually crash
Approach 2: Unicast was used
Problem : Master would stop Writing attributes after 'Y' times and eventually crash
Sequence of crash:
i) Link status stopped
ii) Write attribute stopped
iii) Report attribute stopped
iv) All communication stopped
As per rough calculation: (with 9 routers)
ZCL_CMD_WRITE was used
disabledefaultrsp = FALSE (0)
After 70 Multicast the device stopped writing attributes
After 530 Unicast the device stopped writing attributes
The only thing that was common with both these cases were the number of write responses received by the Master
i.e 70 (multicast) x 8 = 560
```````````````````````````530 (unicast)
Instead if we have only 4 routers instead of 8, then the number of successful write attributes increased to approx '2X'
Based on this observation another test was conducted with three routers, out of which 1 router (Master) writes a attribute to 2 other routers with and without write responsesThe write attribute was done every 10 seconds|
TEST 1: Unicast without write attribute response i.e ZCL_CMD_WRITE_NO_RSP was used disabledefaultrsp = TRUE The problem was not noticed in this setup, for 2006 unicast Then we stopped the test |
TEST 2: Unicast with the write attribute response i.e ZCL_CMD_WRITE was used disabledefaultrsp = FALSE The firmware crashed in this case The following are the details |
1) After 450** unicast by master, i.e 450 write attribute responses, it stopped sending link status (** appoximate)
2) After 480** unicast by master, i.e 480 write attribute responses, it stopped sending write attributes ( ** appoximate)
3) After 2720 periodic report attribute (not write attributes) reports to coordinator the node 
We doubt that the problem is caused due to the Write attribute responses received by Master,
1) zcl_SendWriteRequest returns 0x10 (ZMemError) on failure, which indicates memory leak
How can we resolve this issue in Z Stack 2.6.1 since we know the program flow in this case ?
2) How can we make sure that in Z Stack 3.0.2 this problem does not occur before migrating ?
Regards,
SDB@23

