Hi everybody,
looking at this lines of code found in ZDApp.c
case ZDO_NWK_DISC_CNF:
if (devState != DEV_NWK_DISC)
{
}
#if !defined ( ZDO_COORDINATOR )
else if ( (msgPtr[1] == ZDO_SUCCESS ) &&
( zdoDiscCounter++ > MAX_DISC_ATTEMPTS ) )
{
devState = DEV_NWK_JOINING;
...
I can't understand why (zdoDiscCounter++>MAX_DISC_ATTEMPTS).
According to me following this code a device or a router won't join the network unless it recive more than MAX_DISC_ATTEMPTS succesful discoveries notifications.
I changed the statement with (zdoDiscCounter++>MAX_DISC_ATTEMPTS) and it worked well.
Is this a bug or there are any reason to justify this choice?
Thanks!