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