Why XBee ZB sends NWK Leave frame?

I have a ZigBee network based on XBee ZB SMT S2C with FW 0x4055 as coordinator. I am able to join 3rd party device successfully. I see that coordinator starts to send NWK Leave Frame to the end device just after joining (see frame below). Why?

[16:25:04.591511]	Leave	61-88-80-F1-84-10-5E-00-00-09-10-10-5E-00-00-01-0E-C1-54-9B-40-00-A2-13-00-04-60-FF-FF
Frame Information: (29 bytes)
	Packet Number: 3
	Protocol: ZigBee
	Timestamp: 16:25:04.591511
	Time Delta: 0.002352
	Channel: 15
	Length: 29
	Link Quality: -46 dBm
	Source: USB8621
	Layer: NWK
	Status: Normal
MAC Header: (9 bytes)
	Frame Control: 0x8861
		ยทยทยทยท ยทยทยทยท ยทยทยทยท ยท001 = Frame Type: [0x1] Data
		ยทยทยทยท ยทยทยทยท ยทยทยทยท 0ยทยทยท = Security Enabled: [0x0] No
		ยทยทยทยท ยทยทยทยท ยทยทยท0 ยทยทยทยท = Frame Pending: [0x0] No
		ยทยทยทยท ยทยทยทยท ยทยท1ยท ยทยทยทยท = Acknowledgement Request: [0x1] Yes
		ยทยทยทยท ยทยทยทยท ยท1ยทยท ยทยทยทยท = Intra-PAN: [0x1] Yes
		ยทยทยทยท ยทยท00 0ยทยทยท ยทยทยทยท = Reserved: 0x0
		ยทยทยทยท 10ยทยท ยทยทยทยท ยทยทยทยท = Destination Addr Mode: [0x2] 16-bit Short Address
		ยทยท00 ยทยทยทยท ยทยทยทยท ยทยทยทยท = Reserved: 0x0
		10ยทยท ยทยทยทยท ยทยทยทยท ยทยทยทยท = Source Addr Mode: [0x2] 16-bit Short Address
	Sequence Number: 128
	Destination PAN ID: 0x84F1
	Destination Address: 0x5E10
	Source Address: 0x0000
MAC Payload: (18 bytes)
	NWK Header: (16 bytes)
		Frame Control: 0x1009
			ยทยทยทยท ยทยทยทยท ยทยทยทยท ยทยท01 = Frame Type: [0x1] Command
			ยทยทยทยท ยทยทยทยท ยทยท00 10ยทยท = Protocol Version: 0x2
			ยทยทยทยท ยทยทยทยท 00ยทยท ยทยทยทยท = Route Discovery: [0x0] Suppressed
			ยทยทยทยท ยทยทยท0 ยทยทยทยท ยทยทยทยท = Multicast Flag: [0x0] Unicast or Broadcast
			ยทยทยทยท ยทยท0ยท ยทยทยทยท ยทยทยทยท = Security Enabled: [0x0] No
			ยทยทยทยท ยท0ยทยท ยทยทยทยท ยทยทยทยท = Source Route Included: [0x0] No
			ยทยทยทยท 0ยทยทยท ยทยทยทยท ยทยทยทยท = Destination IEEE Address Included: [0x0] No
			ยทยทยท1 ยทยทยทยท ยทยทยทยท ยทยทยทยท = Source IEEE Address Included: [0x1] Yes
			ยทยท0ยท ยทยทยทยท ยทยทยทยท ยทยทยทยท = Device Initiator: [0x0] No
			00ยทยท ยทยทยทยท ยทยทยทยท ยทยทยทยท = Reserved: 0x0
		Destination Address: 0x5E10
		Source Address: 0x0000
		Radius: 0x01
		Sequence Number: 14
		Source IEEE Address: 00:13:A2:00:40:9B:54:C1
	NWK Payload: 0x6004
		NWK Command ID: [0x04] Leave
		Leave Options: 0x60
			ยทยทยท0 0000 = Reserved: 0x0
			ยทยท1ยท ยทยทยทยท = Rejoin: [0x1] Yes
			ยท1ยทยท ยทยทยทยท = Request: [0x1] Yes
			0ยทยทยท ยทยทยทยท = Remove Children: [0x0] No
MAC Footer: 0xFFFF
	Frame Check Sequence: 0xFFFF

Perhaps the device is somehow sending inappropriate packets, or does not complete the join procedure correctly? It would be helpful to see a full trace of the join instead of just the leave packets.

1 Like

I have captured packets of joining process in Ubiqua. It is available by the link https://goo.gl/dAKzUO. Also screenshot is there. Should be noticed that I cannot also get address with ZDO Network Address Request. Device is using old Freescale MC13213 chip.
At the same time, in case of using 2 XBee devices everything is fine (no NWK links request, ZDO is working).
Tell me if you need some additional information.

Hm, I donโ€™t have Ubiqua, could you try saving in pcap format (Google suggests that should be supported).

From the screenshot, it seems that the coordinator sends a leave packet in response to every data request from the device. I suspect this means that the device does not appear in the child table of the coordinator somehow. I wonder if the association was really unsuccesful, or if the device somehow didnโ€™t specify it is an end device when joining?

The reason was in incorrect SP (Cyclic Sleep Period) parameter. It was too small on coordinator, but it should be larger than polling period on end device. Consequently, association process was not finished correctly. So you was right in your suspicions.

Ah, so then the association process did finish correctly, but the coordinator threw the end device out of its child table again before it could send its first poll request.

Yes, more likely it is like that.