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.

Z Stack Example App: Generic App Problem

Other Parts Discussed in Thread: CC2430

Hi All:

I have done a small modification to the GenericApp provided in ZStack-1.4.3-1.2.1 version running on the CC2430 EB.  The following are the setup of the network:

-One Coordinator waiting for message with cluster ID 0x0002 from one router.

- One Router with Input cluster ID of 0x0001 and output cluster ID of 0x0002

- One EndDevice with output cluster ID of 0x0001.

There are not binding of any device.  So, basicly the network function as the following.

EndDevice will broadcast a two byte packets with cluster ID 0x0001 to all devices in the network (Including the network coordinator device) evrey 3 seconds.  Since only router device has handling with the cluster ID 0x0001, when it get the message, it will forward to the coordinator with cluster ID 0x0002.  The forward message from the router device doesn't have TX Option, I only set the 16 bit address to 0x0000 (coordinator address).

---------------------------

The network running very good for a certain period of time.  However, there is a problem with the coordinator device.  When the coordinator device get more than 300 - 350 forward messages from the router devices.  There are some random things happen, 1) It will get more than one AF_INCOMING_MSG_CMD events for just one forward message with Cluster ID 0x0002.  2) It will not hear any more forward message afterward and I need to force reset the coordinator device.  I set a break point at the task event loop, there are not system event message that indicate a AF_INCOMING_MSG_CMD anymore.  3) After reset with NV_RESTORE, it work fine again.

 

So, do you guys know why is the coordinator can't handle more than 300 - 350 message?  Any of you have ideas why the system work fine at certain time and do not work again?  Is that way that I can check the status of the incoming message and reset the AF or mac radio on the application level, so that I don't need to reset the entire device.

Thanks VERY much in advance. [:D]

 

 

  • A couple of things I'd like you to try so we can shed some light on this:

    In mac_cfg.c, set the following defines from 2 to 5:

    /* maximum number of frames of all types in transmit queue */

    #ifndef MAC_CFG_TX_MAX

    #define MAC_CFG_TX_MAX              5

    #endif

     

    /* maximum number of frames in receive queue */

    #ifndef MAC_CFG_RX_MAX

    #define MAC_CFG_RX_MAX              5

    #endif

    Also try increasing the heap to as large as you can. See INT_HEAP_LEN in Onboard.h.

  • Hi,

     

    I have a custom board with a cc2430, and I  can not manage the events from the KEY_CHANGE, So I modified the SampleApp as below for the cc2430em:

     

    it run correctly with the smartRf04Eb + cc2430EM. But with my board no.  it does not execute the AF_INCOMING_MSG_CMD when a message came. Sush as                  I changed the pins of buttons and leds correctly

    moon

  • Thanks!

    My previous problem resolved.  It is not the problem with the GenericApp.  I had some memory problem with handling heap.

  • How do you design your custom board?  I will looking into the antenna part.  If there is not AF_INCOMING_MSG_CMD callback event which mean the MAC layer doesn't  received any packet, OTA.

  • Hi,

    I modified just the hal_board_cfg.h , hal_led.h/c and halçkey.h/.c

    so yhe nwk and the mac layer are not modified.

    moon

  • I don't think there is problem with the source code.  When you fabricate you own custom board ,  how do you design the RF circuit?  Have to try to send  thing packet out and monitor the packet with the TI Packet Sniffer to verify the RF transmission?

  • Hi,

    tks

    with packet sniffer, I have error communication. There's no transmission and recption.

     

  • I think there is no transmission, therefore, you don't have any RF call back message.

  • Hi,

    Tks

    I want to see the packet received to my board "different then the CC2430DB" with packet sniffer, I connected my board to the smartRf and the packet sniffer inform me that there's error communication.

    But, when I associated my board in the same Nwk with the smartRf+cc2430em to see the packet received from my board, I have a successfull transmission and reception "my board communicates with the smartrf and also receives frames with a simple test; qd clusterId she defined it lights a led "and that works well.


    To see the packet sniffer received in my board, I believe that to connect it with the smartRf to see the packets received is not correct. Are there any other solutions ??

    Tks

  • You can load the your EP application to two smartRF boards, rather than your custom board and see if there is any logical error.   Otherwise, I think you didn't modify the driver correctly.  

  • Hi,

    To receive a message from an other devive zigbee, a SYS_EVENT_MSG '' AF_INCOMING_MSG_CMD" is sent to the application. But I can't see how the device detect the reception "I know that's from the "ZDApp_event_loop" but I can't see all the chemin

    tks

  • Your application (endpoint) can register for a system callback with afRegister(). Then your event handler in your code can perform whatever action you like based on that trigger.

     

    Scott