error ZPS_eAplZdoAddReplaceLinkKey eStatus= 174

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

error ZPS_eAplZdoAddReplaceLinkKey eStatus= 174

1,894 Views
benoit_roue
Contributor II

Hi Mario,

 

I found the same problem happened again, but I open a new question, since this issue problably been archived.

I have used the gateway for weeks, and joined, unjoined many devices (by leave request). Now,  when a new device wants to join, the function ZPS_eAplZdoAddReplaceLinkKey returns 174.

I have the logs of the sniffer, and the logs of the JN5169 that are sent to the gateway, with many print tables. Please check carefully.

One thing can be noticed, I have activated a log in the function vfExtendedStatusCallBack

And I got the extended status 0x87 which is ZPS_XS_E_NO_FREE_EXTENDED_ADDR. A comment of this enum says “There are no free entries in the extended address table.  The extended address table is configured in the config editor".

I don’t know which table it is. In the configuration file, no table is called “extended address table”. And, I have only 10 ZED/ZR in the network. Tell me the name me the entry in the config file. Also, I attached my config file. You must know which table is, and what is its size. So, please tell me.

 

If you wish to replicate the issue, you won’t. It needs weeks, and many different devices. Please transmit the issue directly to the developers team.

 

Attached Files:

20200604_failed no send transport key.pcapng : the logs from sniffer when the association succeed, but the transport key has not been sent.

20200604_full log.pcapng : The full logs from the sniffer since yesterday. There are many zigbee networks in our room, the panId our my network is 0xc90c.

20200604 Gateway logs.txt : The logs from JN5169 sent to the host, and the functions that have written them. Also, some tables, with functions that have written them.

ZigbeeNodeControlBridge.zpscfg : my configuration file.

 

Best regards

Benoit

Labels (3)
Tags (1)
0 Kudos
8 Replies

1,771 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Benoit,

We have noticed some similar issues. I am assuming that you are working on the JN-AN-1216.

Is it possible that you could change the APP_bSendHATransportKey function?

PUBLIC bool APP_bSendHATransportKey ( uint16    u16ShortAddress,
                                      uint64    u64DeviceAddress,
                                      uint64    u64ParentAddress,
                                      uint8     u8Status,
                                      uint16     u16Mac)
{
    bool_t          bStatus     =  TRUE;
    ZPS_teStatus    eStatus;
    uint16          u16Location;
    AESSW_Block_u   uKey;
    bool_t          bCredPresent =  FALSE;

    if( bBlackListEnable )
    {
        ZPS_teDevicePermissions    eDevicePermissions;
        eStatus =  ZPS_bAplZdoTrustCenterGetDevicePermissions ( u64DeviceAddress,
                                                                &eDevicePermissions );
        if( eStatus == ZPS_E_SUCCESS )
        {
            if ( eDevicePermissions != ZPS_DEVICE_PERMISSIONS_ALL_PERMITED )
            {
                bStatus = FALSE;
            }
            else
            {
                bStatus = TRUE;
            }
        }
        else
        {
            bStatus = FALSE;
        }
        if ( ( sZllState.u8DeviceType >= 2  ) &&
             ( eStatus == ZPS_E_SUCCESS )       &&
             ( eDevicePermissions == ZPS_DEVICE_PERMISSIONS_ALL_PERMITED )
           )
        {
            u64CallbackMacAddress =  u64DeviceAddress;
            ZTIMER_eStart ( u8HaModeTimer , ZTIMER_TIME_MSEC ( 500 ) );
        }
    }
    else
    {
        if(sZllState.u8DeviceType >= 2)
        {
           u64CallbackMacAddress =  u64DeviceAddress;
           ZTIMER_eStart ( u8HaModeTimer, ZTIMER_TIME_MSEC ( 500 ) );
        }
    }

    if ( ( bSetTclkFlashFeature) & &
         ( u8Status == 1) )
    {
        extern uint32    sZpsIntStore;
        extern PUBLIC void* zps_vGetZpsMutex ( void );
        ZPS_u8ReleaseMutexLock ( zps_vGetZpsMutex , &sZpsIntStore );
        uint8 au8Key[16] = { 0x5a, 0x69, 0x67, 0x42, 0x65, 0x65, 0x41,
                                  0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x30, 0x39 };

        ZPS_eAplZdoAddReplaceLinkKey( u64DeviceAddress, au8Key,   ZPS_APS_UNIQUE_LINK_KEY);

        ZPS_u8GrabMutexLock ( zps_vGetZpsMutex , &sZpsIntStore );
        bStatus = TRUE;
    }
    return bStatus;
}

Let me know your findings.

Regards,

Mario

0 Kudos

1,771 Views
benoit_roue
Contributor II

Hi Mario,

Thank you. I will try to change the || into &&. However, since it already took months to see the issue happen again. so, I will not be able to know the solution is good before years.

I expect a little bit explaination to be able to understand and work on the issue by myself.

That's why I asked for this:

One thing can be noticed, I have activated a log in the function vfExtendedStatusCallBack

And I got the extended status 0x87 which is ZPS_XS_E_NO_FREE_EXTENDED_ADDR. A comment of this enum says “There are no free entries in the extended address table.  The extended address table is configured in the config editor".

I don’t know which table it is. In the configuration file, no table is called “extended address table”. And, I have only 10 ZED/ZR in the network. Tell me the name me the entry in the config file. Also, I attached my config file. You must know which table is, and what is its size. So, please tell me.

I also printed the pu64AddrExtAddrMap: (Doesn't look full, but the way addresses are stored is strange, one first, others at the end)


[1592550777] I (319625) JN5169: vDisplayExtAddrTable()
[1592550777] I (319630) JN5169: Ext Addr  0: 00158d0002f6ef9f
[1592550777] I (319633) JN5169: Ext Addr  1: 0000000000000000
[1592550777] I (319637) JN5169: Ext Addr  2: 0000000000000000
[1592550777] I (319641) JN5169: Ext Addr  3: 0000000000000000
[1592550777] I (319644) JN5169: Ext Addr  4: 0000000000000000
[1592550777] I (319648) JN5169: Ext Addr  5: 0000000000000000
[1592550777] I (319652) JN5169: Ext Addr  6: 0000000000000000
[1592550777] I (319655) JN5169: Ext Addr  7: 0000000000000000
[1592550777] I (319659) JN5169: Ext Addr  8: 0000000000000000
[1592550777] I (319663) JN5169: Ext Addr  9: 0000000000000000
[1592550777] I (319666) JN5169: Ext Addr 10: 0000000000000000
[1592550777] I (319670) JN5169: Ext Addr 11: 0000000000000000
[1592550777] I (319674) JN5169: Ext Addr 12: 0000000000000000
[1592550777] I (319677) JN5169: Ext Addr 13: 0000000000000000
[1592550777] I (319681) JN5169: Ext Addr 14: 0000000000000000
[1592550777] I (319685) JN5169: Ext Addr 15: 0000000000000000
[1592550777] I (319689) JN5169: Ext Addr 16: 0000000000000000
[1592550777] I (319692) JN5169: Ext Addr 17: 0000000000000000
[1592550777] I (319696) JN5169: Ext Addr 18: 0000000000000000
[1592550777] I (319700) JN5169: Ext Addr 19: 0000000000000000
[1592550777] I (319703) JN5169: Ext Addr 20: 0000000000000000
[1592550777] I (319707) JN5169: Ext Addr 21: 0000000000000000
[1592550777] I (319711) JN5169: Ext Addr 22: 0000000000000000
[1592550777] I (319715) JN5169: Ext Addr 23: 0000000000000000
[1592550777] I (319718) JN5169: Ext Addr 24: 0000000000000000
[1592550777] I (319722) JN5169: Ext Addr 25: 0000000000000000
[1592550777] I (319727) JN5169: Ext Addr 26: 000d6ffffec9b4fb
[1592550777] I (319732) JN5169: Ext Addr 27: 00158d0001718c8f
[1592550777] I (319737) JN5169: Ext Addr 28: f0d1b800001054a6
[1592550777] I (319742) JN5169: Ext Addr 29: f0d1b80000136ab9
[1592550777] I (319748) JN5169: Ext Addr 30: ec1bbdfffeef3221
[1592550777] I (319753) JN5169: Ext Addr 31: 7cb03eaa00aae9b9
[1592550777] I (319758) JN5169: Ext Addr 32: 000d6ffffecbf76d
[1592550777] I (319763) JN5169: Ext Addr 33: 680ae2fffea1ca15
[1592550777] I (319769) JN5169: Ext Addr 34: 14b457fffe40c2f9
[1592550777] I (319774) JN5169: Ext Addr 35: 7cb03eaa0a085cb6

So, please tell me, because this error happens at the same time as ZPS_eAplZdoAddReplaceLinkKey eStatus= 174

Best regards

Benoit

0 Kudos

1,769 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Benoit.

Is it possible that you could reduce the device that you are adding to your network? It could help us to double-check this workaround.

I am not sure how are you printing all of this information.

Is it possible that you could use the next function vDisplayAddressMapTable?

It is defined in the appZpsExtendedDebug.c file.

However, I am checking this and get back to you with any update.

Regards,

Mario

0 Kudos

1,771 Views
benoit_roue
Contributor II

Hi Mario,

 

  1. Reduce to how many? I found the problem happened when the number of device is high. Last time, it was not that high, only 10. Today, I am testing with 11 devices. And adding/removing some of them every day. If we reduce the number, the probability to see the problem happen is lower, which make no sense for testing the workaround.

 

  1. The function vDisplayAddressMapTable I use is in the file of gateway logs I sent in the initial message. I included all the source code of functions used for printing table. But I guess you didn’t open them.

 

This case (which is an new instance of an unresolved case) is opened for too long time. Every time I work a lot to provide clues, and matter for your team to find bugs of the stack. However, none of my questions are answered. In my last message :

I expect a little bit explaination to be able to understand and work on the issue by myself.

 

That's why I asked for this:

One thing can be noticed, I have activated a log in the function vfExtendedStatusCallBack

And I got the extended status 0x87 which is ZPS_XS_E_NO_FREE_EXTENDED_ADDR. A comment of this enum says “There are no free entries in the extended address table.  The extended address table is configured in the config editor".

I don’t know which table it is. In the configuration file, no table is called “extended address table”. And, I have only 10 ZED/ZR in the network. Tell me the name me the entry in the config file. Also, I attached my config file. You must know which table is, and what is its size. So, please tell me.

Best regards

Benoit

0 Kudos

1,770 Views
benoit_roue
Contributor II

Hi Mario,

Please find the 2 attached sniffer logs file in .pcap format.

1. SW4170 build 1840 and AN1216 1010

2. The network is usually ZR/ED at 50/50. The devices are from other vendors or NXP. (Osram, Hue, Aqara...)

3. I don't use the ZGWUI, because it is designed for testing purpose on a PC. In our gateway, I use MgmtLeaveRequest for routers, and if failed, we send the LeaveRequest. For ED; we try sending the LeaveRequest.

4. Yes, I am working on the coordinator

Please don't forget to reply my questions

Best regards

Benoit

0 Kudos

1,770 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Benoit,

Is this your capture? Did you capture the complete log when the issue happens?

20200604_full log.snapshot.PNG

 

There is another question about customer attached ZigbeeNodeControlBridge.zpscfg in which the MAC Table Size is 36, that can't handle 50ZR+50ZED,

Just to confirm, did you provide the latest .zpscfg file which support 50ZR+50ZED case?

 

Regarding node leave network, what kind of scenario you are facing when you found the "MgmtLeaveRequest fails, then you send the "LeaveRequest" ?

From the GW point of view, better use Mgmt Leave for both ZR and ZED.

If ZED joins the network via ZR, then only Mgmt Leave is allowed from GW to the ZED according to Zigbee Spec.

Regards,

Mario

0 Kudos

1,769 Views
benoit_roue
Contributor II

Hi Mario,

I never sent this capture. Yes, I provided the full log. it is in the first message of this case.

My case isn't about 50ZR+50ZED, you must be confusing with another case.

Regarding the Leave method, I didn't say I have problem with ZED. I just replied your question.

Best regards

Benoit

0 Kudos

1,770 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Benoit,

Sorry for my late response. I am checking this with developers.

We have some issues changing the file format. Is it possible that you could provide the files with a pcap format?

Could you please confirm some details:

I want to know more details :

1) what the version of SDK and AN1216? 

2) how many ZR and ZED nodes inside this network, both ZR and ZED nodes are JN5169 or mixing devices from other IC vendors? 

3) what kind of leave customer used by ZGWUI? NWK Leave or Mgmt Leave?

4) Just to confirm, the return value comes from the coordinator, isn't it?

Regards,

Mario

0 Kudos