return E_ZCL_FAIL when register endpoint

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

return E_ZCL_FAIL when register endpoint

1,432 Views
nguyenanhgiau10
Contributor IV

My application have 4 endpoint. If I dont import OTA Upgrade, I still can control these 4 endpoint. But, when I import OTA Upgrade, I can not control any Endpoint, but EP 1.

In UART log, I see error when register EP 2, 3 and 4 with error code is 01 (E_ZCL_FAIL).

Do you know this problem?

Labels (3)
8 Replies

1,242 Views
witoldsowa
Contributor II

I did exactly the same. The question to the NXP remains though... Why the fix hasn't been released for a year? And then a more rhetorical question is why someone should build their solution on the NXP's chip rather then Nordic or Texas if NXP is not fixing bugs that users raise?

0 Kudos

1,242 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello, 

Could you please try adding the OTA support from the properties of the project just as the image attached? There might be some missing information either from the makefile or other files that should be added by that definition. 

OTA.jpg

Regards, 

Estephania

0 Kudos

1,242 Views
nguyenanhgiau10
Contributor IV

Hi Estephania,

Did you build application that have more than 1 EP with OTA Upgrade?

0 Kudos

1,242 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello, 

Yes, using that and adding the OTA=1 definition in the code was enough for it to work.

Regards, 
Estephania 

0 Kudos

1,242 Views
nguyenanhgiau10
Contributor IV

I did like that, but it still get error.

Finally, I find that SDK use the same timer OTA for all EP (OTA.c), it is problem.

Thanks Estephania!

0 Kudos

1,242 Views
estephania_mart
NXP TechSupport
NXP TechSupport

It is good that you were able to solve it. 

Regards, 

Estephania 

1,242 Views
witoldsowa
Contributor II

Hi, I got into the same problem recently and just found the same root cause. eOTA_Create function in OTA.c which is called for every registered endpoint calls eOtaRegisterTimeServer. But you want to register time server only once for all EPs not for each of them. Trying to register for each of them causes error as we run out of resources (timers) and regustration of second and subsequent EPs fails. I have manage to fixed it for myself but the question I have is following:

Why this bug in OTA.c hasn't been fixed if this problem was raised on this forum a year ago?

0 Kudos

1,242 Views
nguyenanhgiau10
Contributor IV

Hi witoldsowa 

static bool isRegisterTimerOTA = FALSE;

...

if (isRegisterTimerOTA == FALSE) {
isRegisterTimerOTA = TRUE;
// add timer click function to ZCL
if(eZCL_TimerRegister(E_ZCL_TIMER_CLICK_MS, 0, vOtaTimerClickCallback)!= E_ZCL_SUCCESS)
{
return(E_ZCL_FAIL);
}
}

This is my way.

Hi estephania_martinez,

I think NXP should fix this bug and update sdk.

0 Kudos