When Child of Router tries to take Leave, the coordinator wants to receive the Command

cancel
Showing results for 
Search instead for 
Did you mean: 

When Child of Router tries to take Leave, the coordinator wants to receive the Command

923 Views
seunghokims
Contributor III

Hi

I am working on ZHA 1.2 & JN-AN-1223_ZigBee IoT Gateway Control Bridge_V1014.

Gateway Control Bridge  is being used as a coordinator.

The coordinator and two routers are connected as shown.

Device Left.jpg

(0xa529 is a child of 0x489e)

When  Router(0xa529)  tries to take Leave, the coordinator wants to receive the Command. (Update Device : Device Left)

When 0xa529 is leave from 0x489e,

Coordinator wants to receive any information.

Is there any way?Leave Data-Log.jpg

Labels (1)
Tags (2)
0 Kudos
13 Replies

395 Views
seunghokims
Contributor III

Hi Mario

Yes, I know.

As in the picture below (Router #1 = coordinator's child ,  Router#2 = router's child )

When the Router #2 is leave,  Router #1  receive a message. (ZPS_EVENT_NWK_LEAVE_INDICATION)

However, this message does not appear in the coordinator at this time.

In the picture, the coordinator receive Command. (Update Device : Device Left)

As you said ZPS_EVENT_NWK_LEAVE_INDICATION,

I want to receive this Command. (Update Device : Device Left).

Thank you for your answers.

Device Left.jpg

0 Kudos

395 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Seung Ho Kim,

Please go to the app_ZncParser_task.c

pastedImage_1.png

pastedImage_2.png

pastedImage_3.png

Mario

0 Kudos

395 Views
seunghokims
Contributor III

Hi  Mario

Yes, this action was confirmed.

This action was received directly from router's child.(short Address:0xD0E1)

What I'm talking about is an environment where the coordinator can not receive a message directly from router's child.

Installed at a distance where the coordinator can not communicate directly with the end Device.

So I want to receive APS Command. (Update Device : Device Left)

- My current test environment

The coordinator is located in the shield box.

test Env.jpg

0 Kudos

395 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Seung Ho Kim,

Are you asking for the specific scenario, the coordinator doesn't receive the update device?

Mario

0 Kudos

395 Views
seunghokims
Contributor III

Hi Mario

We manufacture smart home systems.

Use a coordinator to manage the router and the ED device.

In large houses, devices are sometimes located away from the coordinator.

In such cases, the devices can not communicate directly with the coordinator and must pass through the router.

The situation is as follows.

1. Device_A is located at a distance from which it can not communicate directly with the coordinator.

2. Join the device_A to the router.

3. The information of the child(device_A) joined in the router is confirmed

     by the ZPS_ZDP_DEVICE_ANNCE_REQ message.

4. Leave directly from device_A by user.
5. device_A broadcast Leave nwk_message.

6. The Router receives Leave nwk_message.

7. The coordinator does not receive the Leave nwk_message. (Because it is too far)

8. You can see the APS Command(Update Device : Device Left)  in the sniffer.

9. I want the coordinator to receive APS Command(Update Device : Device Left).

    - Because, our system must know if a devices exists.

The image below is what you answered.

ZPS_EVENT_NWK_LEAVE_INDICATION message occurs when Leave nwk_data is received.

leave Answer.jpg

Thank you.

0 Kudos

395 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Seung Ho Kim,

As you know, the update device is an APS command ID

pastedImage_1.png

When the coordinator handles the APS data indication, you can get the payload with the PDUM_pvAPduInstanceGetPayload. JN51xx Core Utilities User Guide v1.1

As the coordinator is sending the acknowledge you can work with that specific command and with the device status.

Mario

0 Kudos

395 Views
854648943
Contributor III

Hi Mario Ignacio Castaneda Lopez

When I get the data in Update Device as you say, I find that the gateway doesn't receive APS data indication, so I can't extract the data you're talking about. My situation is the same as the description above. I use JN-AN-1216 as coordinator and SDK as JN-AN-4170.

Have you ever been tested? Are you sure the coordinator can get that?

0 Kudos

395 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi 天恒 韩,

 

How are you sending the leave command?

Are you trying to get the updated device or the leave command?

Regards,

Mario

0 Kudos

395 Views
854648943
Contributor III

Hi,Mario Ignacio Castaneda Lopez

Thank you for your reply.

My End device is connected to the network via a router.  

I use this function ZPS_eAplZdoLeaveNetwork in the End device to apply to leave the network, At this point, the router can receive zps_EVENT_NWK_LEAVE_INDICATION. But the coordinator didn't get any instructions.

I read your reply, Your mean is when the coordinator handles the APS data indication, you can get the payload with the PDUM_pvAPduInstanceGetPayload.

But when the coordinator receives the update device, The coordinator  didn't get any instructions example 

ZPS_EVENT_APS_DATA_INDICATION.
Now i know how to extract this data, but the coordinator receives it without any instructions, so i don't know where to extract it

0 Kudos

395 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi 天恒 韩,

Could you please submit a new community post with this question?

Also, Could you please attach the sniffer log of this? I will get back there.

What is the AN that you are working on?

Regards,

Mario

0 Kudos

395 Views
seunghokims
Contributor III

Hi Mario

Router is DimmableLight of JN-AN-1189.

ED is also DimmableLight.

What I want to know is that when a router's child is leave,

router receives ZPS_EVENT_NWK_LEAVE_INDICATION from router's child .

The router sends the Update device command to the coordinator when its child left.

leave.jpg

I would like to process the event when the coordinator receives command as shown in the star in the figure.

The coordinator wants to receive this command like ZPS_EVENT_NWK_LEAVE_INDICATION .

0 Kudos

395 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Seung Ho Kim,

As you know, the Zigbee IoT Gateway Control Bridge is reporting to the host all the status events, commands, etc.

So, if you look at app_ZncParser_task.c, APP_taskZncb, the Jenos task is processing the stack events.

case E_RUNNING:
.
.
.
    if (sStackEvent.eType == ZPS_EVENT_NWK_LEAVE_INDICATION) {

.
.
.

Or you can display the event before the state consumes.

vDisplayStackEvent. app_zbp_utilities.c

Hope it helps.

Mario

0 Kudos

395 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Seung Ho,

The coordinator is waiting for the leave command from the router. is this command that you are asking?

Or the router is leaving the network?

Are The Router and ED working with our application notes?

Mario

0 Kudos