Topic

FAQ
Login Register
ZigBee Router question.
Aug 29, 2022 07:19

/

A

/A

I have the following issue with the router:

I have 3 devices:

1 - gateway

2 - LED light (router) with buttons to turn  light on/off and increase/decrease brightness

3 - switch (end device) which can control the light as well


I power up the gateway, then the switch and the LED light.

Then I turn the light on by pressing the button on the light. The light is turned on and the following message is sent:

zcl_sendReportCmd(LIGHT_ENDPOINT, &dstEpInfo, TRUE, ZCL_FRAME_SERVER_CLIENT_DIR, ZCL_CLUSTER_GEN_ON_OFF, ZCL_ATTRID_ONOFF, ZCL_DATA_TYPE_UINT8, &status);

But the message is not received by the gateway.


When I press the button on the switch (end device) to turn the light on/off, the light turns on/off and the same message is sent.

This time, the message is received by the gateway.


After that, pressing any buttons on the light (router), the messages are sent and they are received by the gateway.


When I power off the light and then power it back on, the problem starts again. I have to press the button on the end device (switch) and then the messages sent from the light are received by the gateway.


What can be wrong?



6 replies
TL_Soyo Aug 29, 2022 10:00
0
/A

Can you capture the packet to see if the report packet is sent, and observe whether the link status packet of the light is sent.



wes58 [Author] Aug 29, 2022 13:04
0
/A

I can't capture packets. I don't have hardware to do it.



TL_Soyo Aug 29, 2022 13:40
0
/A


After they are all powered on, wait for 20s and try sending the report,maybe touting link has not been established


wes58 [Author] Aug 29, 2022 14:02
0
/A


I waited for a couple of minutes and nothing happened. But as soon as I send the message to turn the light on from End Device to the Light (router), it starts working.


I tried in the Light device to call a function zb_rejoinReq(NLME_REJOIN_METHOD_REJOIN, zb_apsChannelMaskGet());

The result I get in zbdemo_bdbCommissioningCb() is BDB_COMMISSION_STA_REJOIN_FAILURE

TL_Soyo Aug 29, 2022 17:03
0
/A

Yes,router don't have to rejoin ,it is on net after it power on,do you bind router to coord? May not be legal if sent directly report packet,suggest you buy a hardware to capture


wes58 [Author] Aug 30, 2022 08:52
0
/A

Issue solved.

It was my mistake.

In my code for sending a message I had: dstEpInfo.dstEp = gLightCtx.srcEndp;

Because it was the first message (sent from the Light Device), gLightCtx.srcEndp was set to 0.

After the message was received from the Switch (end device), gLightCtx.srcEndp was set to the device endpoint of the received message


Thanks for your help Soyo.