summaryrefslogtreecommitdiff
path: root/digital/beacon
diff options
context:
space:
mode:
authorFlorent Duchon2012-04-24 19:25:22 +0200
committerFlorent Duchon2012-05-04 00:06:28 +0200
commitceb223a58667eaf283f56fd57c8db99047217fd2 (patch)
tree5d5a231b59780251306c50d946fb793f16436726 /digital/beacon
parentcf90ef667800b9daa00c610586d0abae3455ea99 (diff)
digital/beacon: try to rejoin network when connection is failed
Diffstat (limited to 'digital/beacon')
-rw-r--r--digital/beacon/src/network.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/digital/beacon/src/network.c b/digital/beacon/src/network.c
index 4721dbf0..75b84b97 100644
--- a/digital/beacon/src/network.c
+++ b/digital/beacon/src/network.c
@@ -75,7 +75,7 @@ void network_init(void)
// Set the deviceType value to Config Server
CS_WriteParameter(CS_DEVICE_TYPE_ID, &deviceType);
- appState = APP_NETWORK_JOINING_STATE;
+ appState = APP_NETWORK_JOIN_REQUEST;
}
@@ -134,6 +134,7 @@ void ZDO_StartNetworkConf(ZDO_StartNetworkConf_t* confirmInfo)
else
{
// uprintf("CONNECTION FAILED. confirmInfo->status = %x\n\r",confirmInfo->status);
+ appState = APP_NETWORK_JOIN_REQUEST;
}
}
@@ -152,7 +153,7 @@ void ZDO_MgmtNwkUpdateNotf(ZDO_MgmtNwkUpdateNotf_t *nwkParams)
unregEndpoint.endpoint = endpointParams.simpleDescriptor->endpoint;
APS_UnregisterEndpointReq(&unregEndpoint);
// try to rejoin the network
- appState = APP_NETWORK_JOINING_STATE;
+ appState = APP_NETWORK_JOIN_REQUEST;
break;
}
case ZDO_NWK_UPDATE_STATUS:
@@ -234,7 +235,7 @@ void network_leave(void)
void zdpLeaveResp(ZDO_ZdpResp_t *zdpResp)
{
// Try to rejoin the network
- appState = APP_NETWORK_JOINING_STATE;
+ appState = APP_NETWORK_JOIN_REQUEST;
(void)zdpResp;
}