Hi,
I have a Centralized ZigBee Network and a Router gets write attributes from End Devices. I need the IEEE address of these End Devices to know where the data came from, so I use the method uint64_t ieeeAddress = ZPS_u64AplZdoLookupIeeeAddr(shortAddress) in the event handler with the argument tsZCL_CallBackEvent *psEvent that brings the Short Address. But some times I get the IEEE Address as 0 and don't know why. Until I reset and rejoin the end device I keep receiving 0 as IEEE address. Then after reset the End Device the Router again takes the IEEE Address fine. I need to fix the issue by not restarting de Zeds again and again.
Hope you can help me, thanks.
Hi,
Hope you are doing well. Are you sure that you are passing a valid shortAddress when the ZPS_u64AplZdoLookupIeeeAddr function is called?
In which handler are you calling the ZPS_u64AplZdoLookupIeeeAddr function?
Could you give more information? What example are you using?
Best Regards,
Ricardo
Hi Ricardo, thanks for your help
I'm sure of the shortAddress, it works almost all the times, but for some reason (maybe after a rejoin) the ZPS_u64AplZdoLookupIeeeAddr function gives me a value of 0 for the End Device until a new reset or rejoin of the End Device, then the ZPS_u64AplZdoLookupIeeeAddr functions works fine again.
I'm using the frdmkw41z_wireless_examples_zigbee_3_0_router_freertos example. I have a ZigBee coordinator, and multiple End Devices writing custom attributes. I use the function in the APP_ZCL_cbEndpointCallback(tsZCL_CallBackEvent *psEvent) callback (app_zcl_task.c file) and the E_ZCL_CBET_WRITE_INDIVIDUAL_ATTRIBUTE event.I get the short address this way:
uint16_t shortAddress = psEvent->pZPSevent->uEvent.sApsDataIndEvent.uSrcAddress.u16Addr;
shortAddress has correct value at this point when the problem occurs, but ZPS_u64AplZdoLookupIeeeAddr gives always zero only for that End Device. Again, after the reset of the end device with the problem, the function works correctly, I wonder if some table updates in the Router, I don't know. But in the application I can restart the end devices every time the problem occurs. I tried using the vFbSendIeeeAddrReq function, but doesn't work either.
Thanks for your time