This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2531: End Device Rejoin Issue

Part Number: CC2531
Other Parts Discussed in Thread: Z-STACK, , CC2591

I have encountered a problem in working with the Philips Hue Smart Motion Sensor and my host application.  Occasionally the device will lose connection with our network, and will try to rejoin the network.  If the coordinator is not in permit join mode, however, the device never is able to rejoin the network and gets stuck in a loop of constantly trying to rejoin.  I simulated this situation by joining the Zigbee End Device to the coordinator, then bringing the ZED out of range of the coordinator until it indicates (via a red LED) that it has lost connection.  Then I bring it back in range and capture the traffic with Ubiqua.  The ZED sends a beacon request, and the coordnator responds with this beacon:

Beacon: NwkClosed: RC 1: Depth 0: EDC 1

Even though the Nwk is ‘Closed’ based on my understanding of the rejoin process it should be able to rejoin because the ZED is already known to the coordinator.

Next the rejoin request is sent,

Rejoin Request

NWK Payload: 0x8006

NWK Command ID: [0x06] Rejoin Request

Capability Information: 0x80

···· ···0 = Alternate PAN Coordinator Capability: 0x0

···· ··0· = Device Type: [0x0] End Device

···· ·0·· = Power Source: [0x0] Other Power Source

···· 0··· = Receiver On When Idle: [0x0] No

··00 ···· = Reserved: 0x0

·0·· ···· = Security Capability: [0x0] Standard Security Mode

1··· ···· = Allocate Address: [0x1] Yes

followed by a rejoin response from the coordinator

Rejoin Response:

NWK Payload: 0x009EFE07

NWK Command ID: [0x07] Rejoin Response

Rejoin Response: 0x009EFE

Rejoin Response Network Address: 0x9EFE

Rejoin Status: [0x00] Association Successful

The response says the association was successful. Finally the End device and the coordinator issue a Device Announce to indicate the Device has joined the network.

Unfortunately this seems to be the end of the process. I would expect the Network manager to eventually send NwkZigbeeDeviceInd to my host application, but that never actually happens.  The ZED will then attempt to rejoin again and the cycle continues.



I ran the same test but this time I put the coordinator in permit join mode before starting the rejoin proces. In this test the beacon shows Nwk ‘Open’

Beacon: NwkOpen: RC 1: Depth 0: EDC 1

Rejoin Request and response proceed as normal, as does the Device Announce.  The difference happens when a Node Descriptor Request is issued from the coordinator, indicating to me that the device actually joined the network.  Checking the debug logs on the host application I also noticed that a zdoTcDeviceInd Message is sent to the Network Manager around the same time as the Device Announce.  

My question is what do I need to enable the ZED to rejoin the network while not in permit join mode?

Captures:

https://drive.google.com/open?id=0B8fo89v8FK-0RjV1M2ZTNmJJV0k