This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2538: ZNP Host Framework

Part Number: CC2538

Hello,

We a starting a ZigBee coordinator project with CC2538 as ZNP. We are running the ZNP-Host-Framework examples and trying to exchange some messages with a ZigBee switch.

We are using the command line trainer example, but failing to get any information on cluster 0x0006 from the device.

Is the example suitable for what we are trying to do?

What command should we use to send data to the device?

Can you point us to some documents to read on basic steps to make a coordinator with ZNP?

Below is a log extract:

Do you wish to start/join a new network? (y/n)
y
Resetting ZNP
ZNP Version: 2.6.1
Enter device type c: Coordinator, r: Router, e: End Device:
c
Enter channel 11-26:
13
EndPoint: 1
Network Starting
Network Starting
Network Started
Network up

mtSysGetExtAddrSrspCb
ExtAddr: 0x063A4D1D00124B00
Enter CMD

mtZdoEndDeviceAnnceIndCb
SrcAddr: 0x665C
NwkAddr: 0x665C
IEEEAddr: 0x000B57FFFE101B52
Capabilities: 0x8C


Enter CMD

mtAfIncomingMsgCb
GroupId: 0x0000
ClusterId: 0x0003
SrcAddr: 0x665C
SrcEndpoint: 0x01
DstEndpoint: 0x01
WasVroadcast: 0x01
LinkQuality: 0x4C
SecurityUse: 0x00
TimeStamp: 0x0002B297
TransSeqNum: 0x00
Len: 0x03
Data[0]: 0x01
Data[1]: 0x00
Data[2]: 0x01


Enter CMD
ZDO_SIMPLE_DESC_REQ

Command: ZDO_SIMPLE_DESC_REQ
Enter DstAddr: (2B)
0x665c
Enter NwkAddrOfInterest: (2B)
0x665c
Enter Endpoint: (1B)
1
mtZdoSimpleDescRspCb
SrcAddr: 0x665C
Status: 0x00
NwkAddr: 0x665C
Len: 0x12
Endpoint: 0x01
ProfileID: 0x0104
DeviceID: 0x0001
DeviceVersion: 0x00
NumInClusters: 0x03
InClusterList[0]: 0x0000
InClusterList[1]: 0x0003
InClusterList[2]: 0x0006
NumOutClusters: 0x02
OutClusterList[0]: 0x0003
OutClusterList[1]: 0x0006


Enter CMD

  • Thank you!
    We successfully connect and control light and switch end device.

    We have a problem with sleepy end devices. How can we get a callback when the device is waking and can receive command? While the device is sleeping and we try to send command this is what happens and the command is not executed:

    <TX>03:58:37.08 COM15 AF_DATA_REQUEST (0x2401)
    DstAddr: 0xBEB0
    DestEndpoint: 0x01
    SrcEndpoint: 0x07
    ClusterID: 0x0006
    TransID: 0x06
    Options: 0x00
    Radius: 0x00
    Len: 0x03
    Data: ... (0x01, 0x00, 0x02)

    <RX>03:58:37.09 COM15 AF_DATA_REQUEST_SRSP (0x6401)
    Status: afStatus_SUCCESS (0x0)

    <RX>03:58:43.25 COM15 AF_DATA_CONFIRM (0x4480)
    Status: 240 (0xF0)
    Endpoint: 0x07
    TransID: 0x06

    We have a sniffer and we see "Data request" messages, but the ZNP does'n notify us about these messages.
  • “How can we get a callback when the device is waking and can receive command? ”

    No, you cannot. The message for sleeping end device would be kept on parent node of sleeping end device until sleeping end device wakes up to polling the message.

  • How we can make a cordinator in parent mode ?
  • Coordinator can be parent of end device by nature. You don’t have to do anything setting.
  • We have the following situation: some time after restarting the end unit, we can successfuly send the toggle command, and the device performs the operation.

    <TX>09:13:55.96 COM15 AF_DATA_REQUEST (0x2401)
       DstAddr: 0xBEB0
       DestEndpoint: 0x01
       SrcEndpoint: 0x07
       ClusterID: 0x0006
       TransID: 0x06
       Options: 0x00
       Radius: 0x05
       Len: 0x03
       Data: ... (0x01, 0x00, 0x02)
    
    <RX>09:13:55.96 COM15 AF_DATA_REQUEST_SRSP (0x6401)
       Status: afStatus_SUCCESS (0x0)
    
    <RX>09:13:56.17 COM15 AF_DATA_CONFIRM (0x4480)
       Status: afStatus_SUCCESS (0x0)
       Endpoint: 0x07
       TransID: 0x06
    <RX>09:13:56.19 COM15 AF_INCOMING_MSG (0x4481)
       GroupID: 0x0000
       ClusterID: 0x0006
       SrcAddr: 0xBEB0
       SrcEndpoint: 0x01
       DstEndpoint: 0x07
       WasBroadcast: 0x00
       LinkQuality: 0x86
       SecurityUse: 0x00
       Timestamp: 0x00CB8B4D
       TransSeqNumber: 0x00
       Len: 0x05
       Data: ..... (0x08, 0x00, 0x0B, 0x02, 0x00)

    But when some time passes, this is what happens and the device doesn't perform the operation:

    <TX>09:17:18.06 COM15 AF_DATA_REQUEST (0x2401)
       DstAddr: 0xBEB0
       DestEndpoint: 0x01
       SrcEndpoint: 0x07
       ClusterID: 0x0006
       TransID: 0x06
       Options: 0x00
       Radius: 0x05
       Len: 0x03
       Data: ... (0x01, 0x00, 0x02)
    
    <RX>09:17:18.06 COM15 AF_DATA_REQUEST_SRSP (0x6401)
       Status: afStatus_SUCCESS (0x0)
    
    <RX>09:17:24.65 COM15 AF_DATA_CONFIRM (0x4480)
       Status: 240 (0xF0)
       Endpoint: 0x07
       TransID: 0x06

    If we send the command repeadetly and very quickly one after the other, at some point, the device receives it and executes it.

    Our questions are:

    -What does "Status: 240 (0xF0)" mean and where can we read about the ZNP API.

    -What can we do so that the toggle command is successfuly transmitted to the sleep end device when it wakes up?

    Thanks.

  • Just found the error code in ZComDef.h
    #define ZMacTransactionExpired 0xf0

    It would seem that our sleep end device is sleeping more than the expiration time of the commands. How can we control on the expiration time of messages?
  • What does "Status: 240 (0xF0)" mean and where can we read about the ZNP API.

    There is no document to specify this status code. You can only find clues from source code.

    What can we do so that the toggle command is successfuly transmitted to the sleep end device when it wakes up?

    You can only decrease polling rate to make it.