17
power for 30 seconds, and try again – repeating the sequence until it
succeeds in joining. While in the appJoining or appJoinWaiting state, the
LEDs will be off.
When an FFD starts a new network as a ZigBee Coordinator, it will set
the red LED solid on and allow devices to bind – the state will transition
to appRunning and its sub-state will be “allowing joins” as set by the flag
appPermittingF in the variable appFlags. The device also maintains a
tertiary state, that it is sinking data, as set by the flag appSinkingF in
appFlags. Whenever a message is acknowledged, the device blinks the
green LED once. The sub-state of allowing joining can be toggled on the
Coordinator by a momentary button press. The sub-state transitions to
not allowing joining by clearing the appPermittingF and the red LED
starts blinking at 1-Hz.
When an FFD successfully joins an existing network as a ZigBee Router,
its state transitions to appBinding, and the device sets the green LED
solid on. The device uses the SAPI to negotiate OTA and find the device
that is sinking data. The FFD will continue to request a bind from the
SAPI every 30 seconds until it is successful. Upon successful binding the
state will transition to appRunning and its sub-state will be “allowing
joins” as set by the flag appPermittingF in the variable appFlags. The
sub-state of allowing joining can be toggled on the Router by a
momentary button press. The sub-state transitions to not allowing joining
by clearing the appPermittingF and the green LED starts blinking at 1-
Hz. Every 10-seconds, the device sets a tertiary state, that it is sending
data, as set by the flag appSendingF in appFlags. The device requests
that the sinking device should acknowledge receipt of the data message
OTA, so it retries sending the same data OTA up to 3 times every time
that the SAPI feedback from the CC2480 indicates that the message has
not been acknowledged. When the message is acknowledged or the
retries have expired, the sub-state of sending data is cleared by clearing
the appSendingF flag. Whenever a message is acknowledged, the
device blinks the red LED once.
When an RFD successfully joins an existing network as a ZigBee End
Device, its state transitions to appBinding, and the device starts blinking
the green LED at 1-Hz. The device uses the SAPI to negotiate OTA and
find the device that is sinking data. The RFD will wait up to 10 seconds
for a bind request to succeed and then transition the state to
appBindingWait and enter low power for 30 seconds. The device will
continue to alternate between the two binding states and low power
every 30 seconds until it is successful. Upon successful binding the state
will transition to appRunning and its sub-state will be “allowing low
power” as set by the flag appLowPwrF in the variable appFlags. Every
10-seconds, the device sets a tertiary state, that it is sending data, as set
by the flag appSendingF in appFlags. The device requests that the
sinking device should acknowledge receipt of the data message OTA, so
it retries sending the same data OTA up to 3 times every time that the
SAPI feedback from the CC2480 indicates that the message has not
been acknowledged. While awaiting the acknowledge, the device enters
low power and awakes every 2 seconds by a timer in order to poll for the
SAPI feedback from the CC2480. When the message is acknowledged
or the retries have expired, the sub-state of sending data is cleared by
clearing the appSendingF flag. Whenever a message is acknowledged,
the device blinks the red LED once.