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.

CC2530

Other Parts Discussed in Thread: Z-STACK, CC2530, CC2530EM, CC2531

Hi Team,

 

I encountering a disturbing issue with latest stack (Z-Stack Home 1.2.2a.44539). 

 

What I see is that with mesh networks having over 70 router nodes, the ZNP RF functionality gets stuck. When it happens, I still able to communicate with the ZNP via the serial interface sending and receiving commands, but no RF activity happens - packets are neither received or sent.

 

The only way to recover from the situation is hard reset the CC2530 (via reset pin). Soft reset does not help.

 

The issue is urgent.

 

Another question:

 

I have noticed that the latest Z-stack version (the one we use) Z-Stack Home 1.2.2a.44539 was removed from the website and the only version available is Z-stack Mesh from 2014. Does it mean that TI recommend a rollback to the older version?

 

Thanks,

Shlomi

 

  • I suggest you to use Ubiqua Packet Analyzer to check over the air messages first. TI just released Z-Stack 3.0 which implements Zigbee 3.0 spec and it's always recommended by TI to use latest Z-Stack.
  • Hi Yikai Chen,

    Please find my answers below:


    I suggest you to use Ubiqua Packet Analyzer to check over the air messages first.

    [Shlomi] Obviously this is the first thing we did. Unfortunately we found nothing which can help to understand the problem. What happens that at some point in time the ZNP radio activity ceases, i.e. incoming packet stop being reported via the serial interface and APS acks are not sent by the ZNP to other units in the network. At the same time ZNP is not stuck i.e. it responds to MT requests via the serial interface. However, any attempt to transmit a packet does not lead to any OTA activity.

    Given the ZNP is a code we use as is (except for some tweaking for network size in znp.cfg), the solution must be on TI side.

    We have a very consistent observation that under some network size (lets say 60), the problem never happens, no matter how loaded is the network. We also have some suspicion that it has to do with HEAP size. After adding OTA dongle code to the ZNP, which required HEAP size reduction of about 200 bytes, the problem started to appear in a smaller networks (5-60 nodes) with moderate network activity. However, it also might be a coincidence.

    Questions:

    - Are you familiar with the issue?

    - Did you ever test the version of the Z-stack we use in a large mesh network, lets say 200-400 nodes? If not, maybe it is worth to roll back to Z-stask Mesh 1.0.0 release?


    TI just released Z-Stack<
    http://www.ti.com/tool/Z-Stack> 3.0 which implements Zigbee 3.0 spec and it's always recommended by TI to use latest Z-Stack<http://www.ti.com/tool/Z-Stack>.


    [Shlomi] We prefer to refrain from using a version immediately after release, especially a major one. Last time we did it (with 1.2.2.xxx) it was extremely buggy. We would highly appreciate if you provide a solution/workaround with the version we currently use.
     

    Thanks,
    Shlomi

  • I have run a Zigbee HA network which has 120 nodes in it and lasted for several weeks and I know TI runs a test with 400 nodes in their labs for your reference.
  • Hi Yikai Chen,

    Thank you for your prompt action!

    Reading it again, I noted a small mistake in the text, it should be  "...to appear in a smaller networks (50-60 nodes)" instead of "to appear in a smaller networks (5-60 nodes)".  

    Shlomi

  • You are welcome.
  • Hi Yikai Chen,

    I summary again the questions regarding the ZNP issue:

    1. Is the version Z-Stack Home 1.2.2a.44539 recommended for use with large mesh setups? Was it actually validated with a large network? If not, what version is both recommended and validated to use in large mesh setups? Our typical setup is 70-100 router nodes + 70-100 end devices (sensors).

    2. Did you encounter any similar problem with your other customers or earlier versions? What might be the possible reason? How would you attack it in terms of debugging? Is there any diagnostic information from the unit we can collect remotely (via MT interface) which could help you to pinpoint the reason?

    I would really appreciate an engineering-level response.

    Thank you for your effort,

    Shlomi

  • I am not TI employee but I know TI has set up a large network (400 node) to test latest Z-Stack. They don't use ZNP for this test but it doesn't matter since the test is about Z-Stack kernel robustness.
  • Hi Shlomi,

    If you have not already seen this, TI has an app node regarding large network (400+ node) setup. This app note was written during the time of an older Z-Stack release, but the same information should apply to ZHA 1.2.2a.

    www.ti.com/.../swra427c.pdf

    This app note explains the key optimizations within Z-Stack that one should consider when dealing with a network of this size.
  • Hi Jason,

    Thank you for your assistance.

    I am familiar with the app note and our ZNP is built exactly according to the recommendations inside.

    I will try to play with the new Z-stack version, but as said I am not eager to upgrade to a new major version immediately after release.

    P.S. One answer I did not receive is whether ZHA 1.2.2a is appropriate for large mesh networks and whether it was validated with the 400 node network TI have.

    Thanks,

    Shlomi

     

  • Hi Shlomi,

    ZHA 1.2.2a is appropriate for large mesh network setups. 1.2.2a is a maintenance release that contains many bug fixes over older Z-Stack versions, and it was tested/validated with a standard 30 node network before release. That being said, the bug fixes that were included in this release should further solidify a nodes ability to operate in a large mesh network setup.
  • Hi Shlomi, When the issue occurs do you use the out of box ZNP image or with modifications. If the ZNP is used with modifications can you please provide the list of modifications made on ZNP that will help to understand the issue better.Can you test with stock ZNP and see if the issue still occurs?

    Do you have the sniffer log when the issue occurs? if yes, can you please share and also point out the line numbers when the issue starts to appear. 

    Regards

  • Hi,
    Please see below:


    When the issue occurs do you use the out of box ZNP image or with modifications. If the ZNP is used with modifications can you please provide the list of modifications made on ZNP that will help to understand the issue better.

    [Shlomi] Please find the diff list attached. It is generated from Z-stack 3.0 we started to move to recently, but for the previous version it is virtually the same.

     

    Can you test with stock ZNP and see if the issue still occurs?

    [Shlomi] It will not work due to HW differences

     


    Do you have the sniffer log when the issue occurs? if yes, can you please share and also point out the line numbers when the issue starts to appear.

    [Shlomi] We are putting a PC with a sniffer on site. I assume I will have a log by next week.

     

    2134.logs.zipPlease find logs attached:

    on 13.17: 

    ZNP stack (no packets received via serial) on 15:08, hard reset on 15:12

    ZNP stack (no packets received via serial) on 16:31, hard reset on 16:35

     

    on 17.17

    ZNP stack (no packets received via serial) on 08:21, hard reset on 08:25


    Thanks,

    Shlomi

  • Hi Shlomi,

    Can you please resend the diff list? I think the attachment was lost on the previous post.

    Regarding the stock ZNP image test, can you try running this test using TI hardware (e.g. SmartRF05 + CC2530EM)? If you can reproduce this issue on our hardware, it will make it easier for us to debug.

    Regarding the sniffer logs, can you please describe the issues in each log more clearly? The time stamps do not line up for me, so if you could refer to packet numbers it would be better. Even better would be if you could use Ubiqua's comment feature on each sniffer log (right click packet > add comment)
  • Hi, 

     

    Please find my responses below.

     

    Can you please resend the diff list? I think the attachment was lost on the previous post.

    [Shlomi] Attached 


    Regarding the stock ZNP image test, can you try running this test using TI hardware (e.g. SmartRF05 + CC2530EM<
    http://www.ti.com/tool/CC2530EM>)? If you can reproduce this issue on our hardware, it will make it easier for us to debug.

    [Shlomi] It is totally impossible. The problem reproduces only on client's site an we cannot put your HW there.

     

    Regarding the sniffer logs, can you please describe the issues in each log more clearly?

    [Shlomi] In our network, nodes periodically report to the ZNP. Size of network - about 70 routers and about same amount of endunits. Each reports once in 10 minutes. From time to time, the ZNP OTA capability gets stuck - incoming packets are not reported and attempts of OTA transmission fail. Note the the serial interface with the ZNP is not stack, i.e. it responds to MT packets. The only solution is HW reset of the ZNP via our hub unit. It is set to happen if no packet is received within several minutes. There is nothing special you can see in the sniffer logs, so I just provided you with two times when the issue happened and when the ZNP was reset.

     

    The time stamps do not line up for me, so if you could refer to packet numbers it would be better. Even better would be if you could use Ubiqua's comment feature on each sniffer log (right click packet > add comment)

    [Shlomi

    Author: Daniel Heifetz <daniel.heifetz@gmail.com>  2017-01-03 13:40:35
    Committer: Daniel Heifetz <daniel.heifetz@gmail.com>  2017-01-03 13:40:35
    Parent: dc2d646f1331235fd71a6fb7644c06b0e555bf29 (Original code)
    Branch: master
    Follows: 
    Precedes: 
    
        - Updated hal_board_cfg.g for cc2530-PI
        - Updated UART BAUD and port
        - Disabled BDB_DEFAULT_TC_REQUIRE_KEY_EXCHANGE
        - Enabled usage of DEFAULT_CHANLIST
        - Allowed indefinite join permission
        - Set maximum TX_POWER
    
    --------------- Components/hal/target/CC2530ZNP/hal_board_cfg.h ---------------
    index 5bd7cde..4654c71 100644
    @@ -1,7 +1,7 @@
     /**************************************************************************************************
       Filename:       hal_board_cfg.h
    -  Revised:        $Date: 2014-11-19 13:29:24 -0800 (Wed, 19 Nov 2014) $
    -  Revision:       $Revision: 41175 $
    +  Revised:        $Date: 2014-07-10 18:43:27 -0700 (Thu, 10 Jul 2014) $
    +  Revision:       $Revision: 39394 $
     
       Description:    Declarations for the CC2530EM used as a ZNP replacement for
                       the CC2520 on MSP platforms (and possibly others.)
    @@ -59,20 +59,7 @@
      *                        Note that only one of them can be defined
      * ------------------------------------------------------------------------------------------------
      */
    -#define xHAL_PA_LNA
    -#define xHAL_PA_LNA_CC2590
    -
    -
    -/* ------------------------------------------------------------------------------------------------
    - *                                       Board Indentifier
    - *
    - *      Define the Board Identifier to HAL_BOARD_CC2530EB_REV13 for SmartRF05 EB 1.3 board
    - * ------------------------------------------------------------------------------------------------
    - */
    -
    -#if !defined (HAL_BOARD_CC2530EB_REV17) && !defined (HAL_BOARD_CC2530EB_REV13)
    -#define HAL_BOARD_CC2530EB_REV17
    -#endif
    +//#define HAL_PA_LNA
     
     /* ------------------------------------------------------------------------------------------------
      *                                          Clock Speed
    @@ -91,9 +78,8 @@
     #define ZNP_CFG0_32K_OSC         0         /* 32kHz crystal not installed; internal osc. used */
     #define ZNP_CFG1_SPI             1         /* use SPI transport */
     #define ZNP_CFG1_UART            0         /* use UART transport */
    -#define ZNP_CFG1_UART_USB        2         /* definition required for CC2531 compatibility */
    +#define ZNP_CFG1_UART_USB	 2         /* definition required for CC2531 compatibility. will never be set for CC2530 */
     extern unsigned char znpCfg1;
    -extern unsigned char znpCfg0;
     
     
     /* ------------------------------------------------------------------------------------------------
    @@ -101,13 +87,10 @@ extern unsigned char znpCfg0;
      * ------------------------------------------------------------------------------------------------
      */
     
    -#if defined (HAL_BOARD_CC2530EB_REV17) && !defined (HAL_PA_LNA) && !defined (HAL_PA_LNA_CC2590)
    -  #define HAL_NUM_LEDS            3
    -#elif defined (HAL_BOARD_CC2530EB_REV13) || defined (HAL_PA_LNA) || defined (HAL_PA_LNA_CC2590)
    -  #define HAL_NUM_LEDS            1
    -#else
    -  #error Unknown Board Indentifier
    -#endif
    +#define HAL_NUM_LEDS            3
    +
    +#define ACTIVE_LOW        !
    +#define ACTIVE_HIGH       !!    /* double negation forces result to be '1' */
     
     #define HAL_LED_BLINK_DELAY()   st( { volatile uint32 i; for (i=0; i<0x5800; i++) { }; } )
     
    @@ -115,21 +98,19 @@ extern unsigned char znpCfg0;
     #define LED1_BV           BV(0)
     #define LED1_SBIT         P1_0
     #define LED1_DDR          P1DIR
    -#define LED1_POLARITY     ACTIVE_HIGH
    -
    -#if defined (HAL_BOARD_CC2530EB_REV17)
    -  /* 2 - Red */
    -  #define LED2_BV           BV(1)
    -  #define LED2_SBIT         P1_1
    -  #define LED2_DDR          P1DIR
    -  #define LED2_POLARITY     ACTIVE_HIGH
    -
    -  /* 3 - Yellow */
    -  #define LED3_BV           BV(4)
    -  #define LED3_SBIT         P1_4
    -  #define LED3_DDR          P1DIR
    -  #define LED3_POLARITY     ACTIVE_HIGH
    -#endif
    +#define LED1_POLARITY     ACTIVE_LOW
    +
    +/* 2 - Blue */
    +#define LED2_BV           BV(2)
    +#define LED2_SBIT         P1_2
    +#define LED2_DDR          P1DIR
    +#define LED2_POLARITY     ACTIVE_LOW
    +
    +/* 3 - Yellow */
    +#define LED3_BV           BV(3)
    +#define LED3_SBIT         P1_3
    +#define LED3_DDR          P1DIR
    +#define LED3_POLARITY     ACTIVE_LOW
     
     /* ------------------------------------------------------------------------------------------------
      *                                       GPIO Configuration
    @@ -227,31 +208,6 @@ extern unsigned char znpCfg0;
     #define MCU_IO_DIR_OUTPUT_PREP(port, pin)   st( P##port##DIR |= BV(pin); )
     
     /* ------------------------------------------------------------------------------------------------
    - *                                    Push Button Configuration
    - * ------------------------------------------------------------------------------------------------
    - */
    -
    -#define ACTIVE_LOW        !
    -#define ACTIVE_HIGH       !!    /* double negation forces result to be '1' */
    -
    -/* S1 */
    -#define PUSH1_BV          BV(1)
    -#define PUSH1_SBIT        P0_1
    -
    -#if defined (HAL_BOARD_CC2530EB_REV17)
    -  #define PUSH1_POLARITY    ACTIVE_HIGH
    -#elif defined (HAL_BOARD_CC2530EB_REV13)
    -  #define PUSH1_POLARITY    ACTIVE_LOW
    -#else
    -  #error Unknown Board Indentifier
    -#endif
    -
    -/* Joystick Center Press */
    -#define PUSH2_BV          BV(0)
    -#define PUSH2_SBIT        P2_0
    -#define PUSH2_POLARITY    ACTIVE_HIGH
    -
    -/* ------------------------------------------------------------------------------------------------
      *                         OSAL NV implemented by internal flash pages.
      * ------------------------------------------------------------------------------------------------
      */
    @@ -314,7 +270,7 @@ extern unsigned char znpCfg0;
      */
     
     /* ----------- RF-frontend Connection Initialization ---------- */
    -#if defined HAL_PA_LNA || defined HAL_PA_LNA_CC2590
    +#if defined HAL_PA_LNA
     extern void MAC_RfFrontendSetup(void);
     #define HAL_BOARD_RF_FRONTEND_SETUP() MAC_RfFrontendSetup()
     #else
    @@ -325,67 +281,12 @@ extern void MAC_RfFrontendSetup(void);
     #define PREFETCH_ENABLE()     st( FCTL = 0x08; )
     #define PREFETCH_DISABLE()    st( FCTL = 0x04; )
     
    -/* Default powerup with P1_2 as input with pullup. P1_2 is read into znpCfg0 is in "init_board()".
    - * 1->0x00 external 32 kHz xosc & 0->0x80 for internal. 
    - */
    -#define HAL_CLOCK_STABLE()    st( uint8 vOSC_32KHZ = ((znpCfg0 == ZNP_CFG0_32K_XTAL) ? 0x00 : 0x80); \
    -                                  while (CLKCONSTA != (CLKCONCMD_32MHZ | vOSC_32KHZ)); )
    -
    -#if defined CC2530_MK
    -#define OSC_32KHZ  0x80
    -#else
    -/* Default powerup with P1_2 as input with pullup, so 1->0x00 external 32 kHz xosc & 0->0x80 for internal */
    -#if (P1_2 == ZNP_CFG0_32K_XTAL)
     #define OSC_32KHZ  0x00 /* external 32 KHz xosc */
    -#else
    -#define OSC_32KHZ  0x80 /* internal 32 KHz rcosc */
    -#endif
    -#endif
    -
    -/* ----------- Board Initialization ---------- */
    -#if defined (HAL_BOARD_CC2530EB_REV17) && !defined (HAL_PA_LNA) && !defined (HAL_PA_LNA_CC2590)
    -
    -#define HAL_BOARD_INIT() st                                      \
    -(                                                                \
    -  uint8 vOSC_32KHZ = OSC_32KHZ;                                  \
    -  uint16 i;                                                      \
    -                                                                 \
    -  SLEEPCMD &= ~OSC_PD;                        /* turn on 16MHz RC and 32MHz XOSC */                \
    -  while (!(SLEEPSTA & XOSC_STB));             /* wait for 32MHz XOSC stable */                     \
    -  asm("NOP");                                 /* chip bug workaround */                            \
    -  for (i=0; i<504; i++) asm("NOP");           /* Require 63us delay for all revs */                \
    -  CLKCONCMD = (CLKCONCMD_32MHZ | vOSC_32KHZ); /* Select 32MHz XOSC and the source for 32K clock */ \
    -  while (CLKCONSTA != (CLKCONCMD_32MHZ | vOSC_32KHZ)); /* Wait for the change to be effective */   \
    -  SLEEPCMD |= OSC_PD;                         /* turn off 16MHz RC */                              \
    -                                                                 \
    -  /* Turn on cache prefetch mode */                              \
    -  PREFETCH_ENABLE();                                             \
    -)
     
    -#elif defined (HAL_BOARD_CC2530EB_REV13) || defined (HAL_PA_LNA) || defined (HAL_PA_LNA_CC2590)
    +#define HAL_CLOCK_STABLE()    st( while (CLKCONSTA != (CLKCONCMD_32MHZ | OSC_32KHZ)); )
     
    -#ifdef HAL_ENABLE_WIFI_COEX_PINS
    -#define HAL_BOARD_ENABLE_WIFI_COEX_PINS() st                                      \
    -( 															   \
    -  /* Set WIFI_TX_DISABLE control P1_6 */							\
    -  P1DIR |= BV(6); 								               \
    -)
    -#else
    -#define HAL_BOARD_ENABLE_WIFI_COEX_PINS()
    -#endif
    -
    -#ifdef HAL_ENABLE_SPARE_PINS_AS_OUTPUTS
    -#define HAL_BOARD_ENABLE_SPARE_PINS_AS_OUTPUTS() st                                      \
    -( 															   \
    -  /* Set SPARE_1 control P0_6 */							\
    -  P0DIR |= BV(6); 								               \
    -  /* Set SPARE_2 control P1_5 */							  \
    -  P1DIR |= BV(5); 											 \
    -)
    -#else
    -#define HAL_BOARD_ENABLE_SPARE_PINS_AS_OUTPUTS()
    -#endif
     
    +/* ----------- Board Initialization ---------- */
     
     #define HAL_BOARD_INIT() st                                      \
     (                                                                \
    @@ -402,92 +303,23 @@ extern void MAC_RfFrontendSetup(void);
                                                                      \
       /* Turn on cache prefetch mode */                              \
       PREFETCH_ENABLE();                                             \
    -                                                                 \
    -  /* set direction for GPIO outputs  */                          \
    -  LED1_DDR |= LED1_BV;                                           \
    -                                                                 \
    -  /* Set PA/LNA HGM control P0_7 */                              \
    -  P0DIR |= BV(7);                                                \
    -                                                                 \
    -  HAL_BOARD_ENABLE_WIFI_COEX_PINS();                             \
    -                                                                 \
    -  HAL_BOARD_ENABLE_SPARE_PINS_AS_OUTPUTS();                      \
    -                                                                 \
    -  /* configure tristates */                                      \
    -  P0INP |= PUSH2_BV;                                             \
    -                                                                 \
       /* setup RF frontend if necessary */                           \
       HAL_BOARD_RF_FRONTEND_SETUP();                                 \
    +  HAL_TURN_OFF_LED1();                                           \
    +  HAL_TURN_OFF_LED2();                                           \
    +  HAL_TURN_OFF_LED3();                                           \
    +  LED1_DDR |= LED1_BV;                                           \
    +  LED2_DDR |= LED2_BV;                                           \
    +  LED3_DDR |= LED3_BV;                                           \
     )
    -
    -#endif
    -
    -/* ----------- Debounce ---------- */
    -#define HAL_DEBOUNCE(expr)    { int i; for (i=0; i<500; i++) { if (!(expr)) i = 0; } }
    -
    -/* ----------- Push Buttons ---------- */
    -#define HAL_PUSH_BUTTON1()        (PUSH1_POLARITY (PUSH1_SBIT))
    -#define HAL_PUSH_BUTTON2()        (PUSH2_POLARITY (PUSH2_SBIT))
    -#define HAL_PUSH_BUTTON3()        (0)
    -#define HAL_PUSH_BUTTON4()        (0)
    -#define HAL_PUSH_BUTTON5()        (0)
    -#define HAL_PUSH_BUTTON6()        (0)
    -
    -/* ----------- LED's ---------- */
    -#if defined (HAL_BOARD_CC2530EB_REV17) && !defined (HAL_PA_LNA) && !defined (HAL_PA_LNA_CC2590)
    -
    -  #define HAL_TURN_OFF_LED1()       st( LED1_SBIT = LED1_POLARITY (0); )
    -  #define HAL_TURN_OFF_LED2()       st( LED2_SBIT = LED2_POLARITY (0); )
    -  #define HAL_TURN_OFF_LED3()       st( LED3_SBIT = LED3_POLARITY (0); )
    -  #define HAL_TURN_OFF_LED4()       HAL_TURN_OFF_LED1()
    -
    -  #define HAL_TURN_ON_LED1()        st( LED1_SBIT = LED1_POLARITY (1); )
    -  #define HAL_TURN_ON_LED2()        st( LED2_SBIT = LED2_POLARITY (1); )
    -  #define HAL_TURN_ON_LED3()        st( LED3_SBIT = LED3_POLARITY (1); )
    -  #define HAL_TURN_ON_LED4()        HAL_TURN_ON_LED1()
    -
    -  #define HAL_TOGGLE_LED1()         st( if (LED1_SBIT) { LED1_SBIT = 0; } else { LED1_SBIT = 1;} )
    -  #define HAL_TOGGLE_LED2()         st( if (LED2_SBIT) { LED2_SBIT = 0; } else { LED2_SBIT = 1;} )
    -  #define HAL_TOGGLE_LED3()         st( if (LED3_SBIT) { LED3_SBIT = 0; } else { LED3_SBIT = 1;} )
    -  #define HAL_TOGGLE_LED4()         HAL_TOGGLE_LED1()
    -
    -  #define HAL_STATE_LED1()          (LED1_POLARITY (LED1_SBIT))
    -  #define HAL_STATE_LED2()          (LED2_POLARITY (LED2_SBIT))
    -  #define HAL_STATE_LED3()          (LED3_POLARITY (LED3_SBIT))
    -  #define HAL_STATE_LED4()          HAL_STATE_LED1()
    -
    -#elif defined (HAL_BOARD_CC2530EB_REV13) || defined (HAL_PA_LNA) || defined (HAL_PA_LNA_CC2590)
    -
    -  #define HAL_TURN_OFF_LED1()       st( LED1_SBIT = LED1_POLARITY (0); )
    -  #define HAL_TURN_OFF_LED2()       HAL_TURN_OFF_LED1()
    -  #define HAL_TURN_OFF_LED3()       HAL_TURN_OFF_LED1()
    -  #define HAL_TURN_OFF_LED4()       HAL_TURN_OFF_LED1()
    -
    -  #define HAL_TURN_ON_LED1()        st( LED1_SBIT = LED1_POLARITY (1); )
    -  #define HAL_TURN_ON_LED2()        HAL_TURN_ON_LED1()
    -  #define HAL_TURN_ON_LED3()        HAL_TURN_ON_LED1()
    -  #define HAL_TURN_ON_LED4()        HAL_TURN_ON_LED1()
    -
    -  #define HAL_TOGGLE_LED1()         st( if (LED1_SBIT) { LED1_SBIT = 0; } else { LED1_SBIT = 1;} )
    -  #define HAL_TOGGLE_LED2()         HAL_TOGGLE_LED1()
    -  #define HAL_TOGGLE_LED3()         HAL_TOGGLE_LED1()
    -  #define HAL_TOGGLE_LED4()         HAL_TOGGLE_LED1()
    -
    -  #define HAL_STATE_LED1()          (LED1_POLARITY (LED1_SBIT))
    -  #define HAL_STATE_LED2()          HAL_STATE_LED1()
    -  #define HAL_STATE_LED3()          HAL_STATE_LED1()
    -  #define HAL_STATE_LED4()          HAL_STATE_LED1()
    -
    -#endif
    -
    +                        
     /* ----------- XNV ---------- */
    -#define XNV_SPI_BEGIN()             st(P1_3 = 0;)
    +#define XNV_SPI_BEGIN()             st(P0_6 = 0;)
     #define XNV_SPI_TX(x)               st(U1CSR &= ~0x02; U1DBUF = (x);)
     #define XNV_SPI_RX()                U1DBUF
     #define XNV_SPI_WAIT_RXRDY()        st(while (!(U1CSR & 0x02));)
    -#define XNV_SPI_END()               st(P1_3 = 1;)
    +#define XNV_SPI_END()               st(P0_6 = 1;)
     
    -// The TI reference design uses UART1 Alt. 2 in SPI mode.
     #define XNV_SPI_INIT() \
     st( \
       /* Mode select UART1 SPI Mode as master. */\
    @@ -500,25 +332,44 @@ st( \
       /* Set bit order to MSB */\
       U1GCR |= BV(5); \
       \
    -  /* Set UART1 I/O to alternate 2 location on P1 pins. */\
    -  PERCFG |= 0x02;  /* U1CFG */\
    +  /* Set UART1 I/O to alternate 1 location on P0 pins. */\
    +  PERCFG = 0xfd;  /* U1CFG */\
       \
       /* Select peripheral function on I/O pins but SS is left as GPIO for separate control. */\
    -  P1SEL |= 0xE0;  /* SELP1_[7:4] */\
    -  /* P1.1,2,3: reset, LCD CS, XNV CS. */\
    -  P1SEL &= ~0x0E; \
    -  P1 |= 0x0E; \
    -  P1_1 = 0; \
    -  P1DIR |= 0x0E; \
    +  P0SEL |= 0x38;  /* SELP0_[6:3] */\
    +  P0 |= 0x40; \
    +  P0DIR |= 0x58; \
       \
    -  /* Give UART1 priority over Timer3. */\
    -  P2SEL &= ~0x20;  /* PRI2P1 */\
    +  /* Give UART1 priority on P0. */\
    +  P2DIR &= 0x7f;  /* PRI2P1 */\
    +  P2DIR |= 0x40;  /* PRI2P1 */\
       \
       /* When SPI config is complete, enable it. */\
       U1CSR |= 0x40; \
    -  /* Release XNV reset. */\
    -  P1_1 = 1; \
    -)
    +)                                                                 
    +                                                                 
    +                                                                 
    +/* ----------- LED's ---------- */
    +
    +#define HAL_TURN_OFF_LED1()       st( LED1_SBIT = LED1_POLARITY (0); )
    +#define HAL_TURN_OFF_LED2()       st( LED2_SBIT = LED2_POLARITY (0); )
    +#define HAL_TURN_OFF_LED3()       st( LED3_SBIT = LED3_POLARITY (0); )
    +#define HAL_TURN_OFF_LED4()       HAL_TURN_OFF_LED1()
    +
    +#define HAL_TURN_ON_LED1()        st( LED1_SBIT = LED1_POLARITY (1); )
    +#define HAL_TURN_ON_LED2()        st( LED2_SBIT = LED2_POLARITY (1); )
    +#define HAL_TURN_ON_LED3()        st( LED3_SBIT = LED3_POLARITY (1); )
    +#define HAL_TURN_ON_LED4()        HAL_TURN_ON_LED1()
    +
    +#define HAL_TOGGLE_LED1()         st( if (LED1_SBIT) { LED1_SBIT = 0; } else { LED1_SBIT = 1;} )
    +#define HAL_TOGGLE_LED2()         st( if (LED2_SBIT) { LED2_SBIT = 0; } else { LED2_SBIT = 1;} )
    +#define HAL_TOGGLE_LED3()         st( if (LED3_SBIT) { LED3_SBIT = 0; } else { LED3_SBIT = 1;} )
    +#define HAL_TOGGLE_LED4()         HAL_TOGGLE_LED1()
    +
    +#define HAL_STATE_LED1()          (LED1_POLARITY (LED1_SBIT))
    +#define HAL_STATE_LED2()          (LED2_POLARITY (LED2_SBIT))
    +#define HAL_STATE_LED3()          (LED3_POLARITY (LED3_SBIT))
    +#define HAL_STATE_LED4()          HAL_STATE_LED1()
     
     /* ----------- Minimum safe bus voltage ---------- */
     
    @@ -571,19 +422,18 @@ st( \
     
     /* Set to TRUE enable LED usage, FALSE disable it */
     #ifndef HAL_LED
    -#define HAL_LED FALSE
    +#define HAL_LED TRUE
     #endif
     #if (!defined BLINK_LEDS) && (HAL_LED == TRUE)
     #define BLINK_LEDS
     #endif
    -
     /* Set to TRUE enable KEY usage, FALSE disable it */
     #ifndef HAL_KEY
     #define HAL_KEY FALSE
     #endif
     
     #ifndef HAL_SPI
    -#define HAL_SPI       TRUE
    +#define HAL_SPI       FALSE
     #endif
     #define HAL_UART      TRUE
     
    
    ---------------------------- Components/mt/MT_SYS.c ----------------------------
    index aa57766..b3c9ecc 100644
    @@ -1501,6 +1501,7 @@ static void MT_SysGpio(uint8 *pBuf)
       op = (GPIO_Op_t)(*pBuf++);
       val = *pBuf;
     
    +#if !CONCENTRATOR_ENABLE   
       switch (op)
       {
         case GPIO_DIR:
    @@ -1553,7 +1554,8 @@ static void MT_SysGpio(uint8 *pBuf)
       val |= (GPIO_GET(1)) ? BV(1) : 0;
       val |= (GPIO_GET(2)) ? BV(2) : 0;
       val |= (GPIO_GET(3)) ? BV(3) : 0;
    -
    +#endif
    +  
       /* Build and send back the response */
       MT_BuildAndSendZToolResponse( MT_SRSP_SYS, MT_SYS_GPIO,
                                     sizeof(val), &val);
    
    --------------------------- Components/mt/MT_UART.h ---------------------------
    index 5ba3870..a0b8285 100644
    @@ -68,11 +68,11 @@ extern "C"
     #endif
     
     #if !defined( MT_UART_DEFAULT_OVERFLOW )
    -  #define MT_UART_DEFAULT_OVERFLOW       TRUE
    +  #define MT_UART_DEFAULT_OVERFLOW       FALSE
     #endif
     
     #if !defined MT_UART_DEFAULT_BAUDRATE
    -#define MT_UART_DEFAULT_BAUDRATE         HAL_UART_BR_38400
    +#define MT_UART_DEFAULT_BAUDRATE         HAL_UART_BR_115200
     #endif
     #define MT_UART_DEFAULT_THRESHOLD        MT_UART_THRESHOLD
     #define MT_UART_DEFAULT_MAX_RX_BUFF      MT_UART_RX_BUFF_MAX
    
    -------------------------- Components/mt/MT_VERSION.c --------------------------
    index cd8ac81..d13e087 100644
    @@ -72,7 +72,7 @@ const uint8 MTVersionString[] = {
                                        0,  /* Product ID */
                                        2,  /* Software major release number */
                                        7,  /* Software minor release number */
    -                                   0,  /* Software maintenance release number */
    +                                   1,  /* Software maintenance release number */
     #if defined( INCLUDE_REVISION_INFORMATION )
                                        ((CODE_REVISION_NUMBER >> 0)  & 0xFF),
                                        ((CODE_REVISION_NUMBER >> 8)  & 0xFF),
    
    ---------------------------- Components/mt/MT_ZDO.c ----------------------------
    index 59f700d..d4d57c2 100644
    @@ -206,7 +206,7 @@ void MT_ZdoInit(void)
     {
     #ifdef MT_ZDO_CB_FUNC
       /* Register with ZDO for indication callbacks */
    -  ZDO_RegisterForZdoCB(ZDO_SRC_RTG_IND_CBID, &MT_ZdoSrcRtgCB);
    +  //ZDO_RegisterForZdoCB(ZDO_SRC_RTG_IND_CBID, &MT_ZdoSrcRtgCB);
       ZDO_RegisterForZdoCB(ZDO_CONCENTRATOR_IND_CBID, &MT_ZdoConcentratorIndCB);
       ZDO_RegisterForZdoCB(ZDO_LEAVE_IND_CBID, &MT_ZdoLeaveInd);
       ZDO_RegisterForZdoCB(ZDO_PERMIT_JOIN_CBID, &MT_ZdoPermitJoinInd);
    
    --------------------- Components/stack/bdb/bdb_interface.h ---------------------
    index 25f6041..0ade32a 100644
    @@ -108,7 +108,7 @@ extern "C"
     #define BDB_DEFAULT_SECONDARY_CHANNEL_SET                  (DEFAULT_CHANLIST ^ 0x07FFF800)      //BDB specification default is: (0x07FFF800 ^ 0x02108800)
     #define BDB_DEFAULT_TC_LINK_KEY_EXCHANGE_METHOD            BDB_TC_LINK_KEY_EXCHANGE_APS_KEY
     #define BDB_DEFAULT_TC_NODE_JOIN_TIMEOUT                   0x0F
    -#define BDB_DEFAULT_TC_REQUIRE_KEY_EXCHANGE                TRUE 
    +#define BDB_DEFAULT_TC_REQUIRE_KEY_EXCHANGE                FALSE 
     
     #define BDB_DEFAULT_DEVICE_UNAUTH_TIMEOUT                  3000  //Time joining device waits for nwk before attempt association again. In BDB is known as apsSecurityTimeOutPeriod
     
    
    ----------------------- Components/stack/sys/ZGlobals.c -----------------------
    index e8b58ff..35e40b9 100644
    @@ -91,7 +91,7 @@ uint8 zgMaxDataRetries = NWK_MAX_DATA_RETRIES;
     uint8 zgMaxPollFailureRetries = MAX_POLL_FAILURE_RETRIES;
     
     // Default channel list
    -uint32 zgDefaultChannelList = 0;
    +uint32 zgDefaultChannelList = DEFAULT_CHANLIST;
     
     // Stack profile Id
     uint8 zgStackProfile = STACK_PROFILE_ID;
    @@ -254,7 +254,7 @@ uint16 zgApsMinDupRejTableSize = APS_DUP_REJ_ENTRIES;
     // If TRUE, preConfigKey should be configured on all devices on the network
     // If false, it is configured only on the coordinator and sent to other
     // devices upon joining.
    -uint8 zgPreConfigKeys = FALSE;
    +uint8 zgPreConfigKeys = TRUE;
     
     // The type of link key in use.  This will determine the security
     // policies associated with sending and receiving APS messages.
    
    ----------------------- Components/stack/zdo/ZDObject.c -----------------------
    index 9409e27..7504956 100644
    @@ -1970,10 +1970,10 @@ void ZDO_ProcessMgmtPermitJoinReq( zdoIncomingMsg_t *inMsg )
       //tcsig    = inMsg->asdu[ZDP_MGMT_PERMIT_JOIN_REQ_TC_SIG];
     
       // Per R21 Spec this duration cannot last forever 2.4.3.3.7.2 (Mgmt_Permit_Joining_req Effect on Receipt)
    -  if(duration == 0xFF)
    +  /*if(duration == 0xFF)
       {
         duration = 0xFE;
    -  }
    +  }*/
       
       // Set the network layer permit join duration
       stat = (byte) NLME_PermitJoiningRequest( duration );
    
    ----------------- Projects/zstack/Tools/CC2530DB/f8wConfig.cfg -----------------
    index 3eef12c..47fbee9 100644
    @@ -17,46 +17,26 @@
     /* Enable ZigBee-Pro */
     -DZIGBEEPRO
     
    +-DHAL_ASSERT_RESET
    +-DASSERT_WHILE
    +
    +-DISR_KEYINTERRUPT
    +
     /* Set to 1 to enable security. To disable set to 0 */
     -DSECURE=1
     -DZG_SECURE_DYNAMIC=0
     
     /* Enable the Reflector */
     -DREFLECTOR
    -
    -/* Default channel is Channel 11 - 0x0B */
    -// Channels are defined in the following:
    -//         0      : 868 MHz     0x00000001
    -//         1 - 10 : 915 MHz     0x000007FE
    -//        11 - 26 : 2.4 GHz     0x07FFF800
    -//
    -//-DMAX_CHANNELS_868MHZ     0x00000001
    -//-DMAX_CHANNELS_915MHZ     0x000007FE
    -//-DMAX_CHANNELS_24GHZ      0x07FFF800
    -//-DDEFAULT_CHANLIST=0x04000000  // 26 - 0x1A
    -//-DDEFAULT_CHANLIST=0x02000000  // 25 - 0x19
    -//-DDEFAULT_CHANLIST=0x01000000  // 24 - 0x18
    -//-DDEFAULT_CHANLIST=0x00800000  // 23 - 0x17
    -//-DDEFAULT_CHANLIST=0x00400000  // 22 - 0x16
    -//-DDEFAULT_CHANLIST=0x00200000  // 21 - 0x15
    -//-DDEFAULT_CHANLIST=0x00100000  // 20 - 0x14
    -//-DDEFAULT_CHANLIST=0x00080000  // 19 - 0x13
    -//-DDEFAULT_CHANLIST=0x00040000  // 18 - 0x12
    -//-DDEFAULT_CHANLIST=0x00020000  // 17 - 0x11
    -//-DDEFAULT_CHANLIST=0x00010000  // 16 - 0x10
    -//-DDEFAULT_CHANLIST=0x00008000  // 15 - 0x0F
    -//-DDEFAULT_CHANLIST=0x00004000  // 14 - 0x0E
    -//-DDEFAULT_CHANLIST=0x00002000  // 13 - 0x0D
    -//-DDEFAULT_CHANLIST=0x00001000  // 12 - 0x0C
    --DDEFAULT_CHANLIST=0x00000800  // 11 - 0x0B
    -
     /* Define the default PAN ID.
      *
      * Setting this to a value other than 0xFFFF causes
      * ZDO_COORD to use this value as its PAN ID and
      * Routers and end devices to join PAN with this ID
      */
    --DZDAPP_CONFIG_PAN_ID=0xFFFF
    +//-DZDAPP_CONFIG_PAN_ID=0x2f4a
    +//-DZDAPP_CONFIG_PAN_ID=0xda11
    +-DZDAPP_CONFIG_PAN_ID=0xac11
     
     /* Minimum number of milliseconds to hold off the start of the device
      * in the network and the minimum delay between joining cycles.
    @@ -71,10 +51,6 @@
      */
     -DEXTENDED_JOINING_RANDOM_MASK=0x007F
     
    -/* Minimum number of milliseconds to delay between each beacon request
    - * in a joining cycle.
    - */
    --DBEACON_REQUEST_DELAY=100
     
     /* Mask for the random beacon request delay. This value is masked with the
      * return from osal_rand() to get a random delay time for each joining cycle.
    @@ -139,8 +115,8 @@
     -DMAX_BINDING_CLUSTER_IDS=4
     
     /* Default security key. */
    --DDEFAULT_KEY="{0}"
    -
    +-DDEFAULT_KEY="{0xa3, 0xb7, 0x92, 0x31, 0x94, 0xe5, 0x76, 0x98, 0x28, 0x96, 0xab, 0xcb, 0xef, 0x11, 0x25, 0x4f}"
    +  
     /* Reset when ASSERT occurs, otherwise flash LEDs */
     //-DASSERT_RESET
     
    @@ -163,29 +139,26 @@
     -DRFD_RCVC_ALWAYS_ON=FALSE
     
     /* The number of milliseconds to wait between data request polls to the coordinator. */
    --DPOLL_RATE=1000
    +-DPOLL_RATE=3000
     
     /* This is used after receiving a data indication to poll immediately
      * for queued messages...in milliseconds.
      */
    --DQUEUED_POLL_RATE=100
    +-DQUEUED_POLL_RATE=0
     
     /* This is used after receiving a data confirmation to poll immediately
      * for response messages...in milliseconds
      */
    --DRESPONSE_POLL_RATE=100
    +-DRESPONSE_POLL_RATE=0
     
     /* This is used as an alternate response poll rate only for rejoin request.
      * This rate is determined by the response time of the parent that the device
      * is trying to join.
      */
    --DREJOIN_POLL_RATE=440
    +-DREJOIN_POLL_RATE=1000
     
     /* Rejoin retry backoff silent period timer duration in milliseconds - default 15 minutes according to HA test spec */
     -DREJOIN_BACKOFF=900000
     
     /* Rejoin retry backoff scan timer duration in milliseconds - default 15 minutes according to HA test spec */
    --DREJOIN_SCAN=900000
    -
    -/* Latest sample apps use LED4 and do not use S1 switch */
    --DENABLE_LED4_DISABLE_S1
    +-DREJOIN_SCAN=900000
    \ No newline at end of file
    
    ----------------- Projects/zstack/Tools/CC2530DB/f8wEndev.cfg -----------------
    index 7f36d6e..b0c6e51 100644
    @@ -19,3 +19,34 @@
     -DMAC_CFG_TX_MAX=6
     -DMAC_CFG_RX_MAX=3
     
    +/* Default channel is Channel 11 - 0x0B */
    +// Channels are defined in the following:
    +//         0      : 868 MHz     0x00000001
    +//         1 - 10 : 915 MHz     0x000007FE
    +//        11 - 26 : 2.4 GHz     0x07FFF800
    +//
    +//-DMAX_CHANNELS_868MHZ     0x00000001
    +//-DMAX_CHANNELS_915MHZ     0x000007FE
    +//-DMAX_CHANNELS_24GHZ      0x07FFF800
    +//-DDEFAULT_CHANLIST=0x04000000  // 26 - 0x1A
    +//-DDEFAULT_CHANLIST=0x02000000  // 25 - 0x19
    +//-DDEFAULT_CHANLIST=0x01000000  // 24 - 0x18
    +//-DDEFAULT_CHANLIST=0x00800000  // 23 - 0x17
    +//-DDEFAULT_CHANLIST=0x00400000  // 22 - 0x16
    +//-DDEFAULT_CHANLIST=0x00200000  // 21 - 0x15
    +//-DDEFAULT_CHANLIST=0x00100000  // 20 - 0x14
    +//-DDEFAULT_CHANLIST=0x00080000  // 19 - 0x13
    +//-DDEFAULT_CHANLIST=0x00040000  // 18 - 0x12
    +//-DDEFAULT_CHANLIST=0x00020000  // 17 - 0x11
    +//-DDEFAULT_CHANLIST=0x00010000  // 16 - 0x10
    +//-DDEFAULT_CHANLIST=0x00008000  // 15 - 0x0F
    +//-DDEFAULT_CHANLIST=0x00004000  // 14 - 0x0E
    +//-DDEFAULT_CHANLIST=0x00002000  // 13 - 0x0D
    +//-DDEFAULT_CHANLIST=0x00001000  // 12 - 0x0C
    +//-DDEFAULT_CHANLIST=0x00000800  // 11 - 0x0B
    +-DDEFAULT_CHANLIST=0x07FFF800
    +
    +/* Minimum number of milliseconds to delay between each beacon request
    + * in a joining cycle.
    + */
    +-DBEACON_REQUEST_DELAY=500
    
    ----------------- Projects/zstack/Tools/CC2530DB/f8wRouter.cfg -----------------
    index 24731d8..aa33242 100644
    @@ -20,5 +20,52 @@
     -DMAC_CFG_TX_MAX=8
     -DMAC_CFG_RX_MAX=5
     
    +/* Default channel is Channel 11 - 0x0B */
    +// Channels are defined in the following:
    +//         0      : 868 MHz     0x00000001
    +//         1 - 10 : 915 MHz     0x000007FE
    +//        11 - 26 : 2.4 GHz     0x07FFF800
    +//
    +//-DMAX_CHANNELS_868MHZ     0x00000001
    +//-DMAX_CHANNELS_915MHZ     0x000007FE
    +//-DMAX_CHANNELS_24GHZ      0x07FFF800
    +//-DDEFAULT_CHANLIST=0x04000000  // 26 - 0x1A
    +//-DDEFAULT_CHANLIST=0x02000000  // 25 - 0x19
    +//-DDEFAULT_CHANLIST=0x01000000  // 24 - 0x18
    +//-DDEFAULT_CHANLIST=0x00800000  // 23 - 0x17
    +//-DDEFAULT_CHANLIST=0x00400000  // 22 - 0x16
    +//-DDEFAULT_CHANLIST=0x00200000  // 21 - 0x15
    +//-DDEFAULT_CHANLIST=0x00100000  // 20 - 0x14
    +//-DDEFAULT_CHANLIST=0x00080000  // 19 - 0x13
    +//-DDEFAULT_CHANLIST=0x00040000  // 18 - 0x12
    +//-DDEFAULT_CHANLIST=0x00020000  // 17 - 0x11
    +
    +// Default deployment channel
    +//-DDEFAULT_CHANLIST=0x00010000  // 16 - 0x10
    +
    +//-DDEFAULT_CHANLIST=0x00008000  // 15 - 0x0F
    +//-DDEFAULT_CHANLIST=0x00004000  // 14 - 0x0E
    +
    +// Default test channel
    +//-DDEFAULT_CHANLIST=0x00002000  // 13 - 0x0D
    +
    +//-DDEFAULT_CHANLIST=0x00001000  // 12 - 0x0C
    +//-DDEFAULT_CHANLIST=0x00000800  // 11 - 0x0B
    +-DDEFAULT_CHANLIST=0x07FFF800
    +
     /* Router Settings */
     -DRTR_NWK                          // Router Functions
    +/* Minimum number of milliseconds to delay between each beacon request
    + * in a joining cycle.
    + */
    +-DBEACON_REQUEST_DELAY=100
    +
    +-DLINK_DOWN_TRIGGER=12
    +-DNWK_ROUTE_AGE_LIMIT=30
    +-DBCAST_DELIVERY_TIME=100
    +-DDEF_NWK_RADIUS=15
    +-DDEFAULT_ROUTE_REQUEST_RADIUS=8
    +-DROUTE_DISCOVERY_TIME=13
    +-DZDNWKMGR_MIN_TRANSMISSIONS=0
    +-DNWK_LINK_STATUS_PERIOD=30
    +-DMAX_NEIGHBOR_ENTRIES=48 
    \ No newline at end of file
    
    -------- Projects/zstack/Utilities/BootLoad/CC2530ZNP/source/sb_main.c --------
    index 79ebb82..e253694 100644
    @@ -261,11 +261,8 @@ static void sblInit(void)
        */
       HAL_DMA_SET_ADDR_DESC0(&dmaCh0);
     
    -#if defined CC2530_MK
    -  znpCfg1 = ZNP_CFG1_SPI;
    -#else
    -  znpCfg1 = P2_0;
    -#endif
    +  znpCfg1 = ZNP_CFG1_UART;
    +
       if (znpCfg1 == ZNP_CFG1_SPI)
       {
         SRDY_CLR();
    
    ------------------ Projects/zstack/ZMain/TI2530ZNP/OnBoard.c ------------------
    index 310944f..4b8298b 100644
    @@ -142,18 +142,8 @@ void InitBoard( uint8 level )
         // Check for Brown-Out reset
         ChkReset();
     
    -#if defined CC2531ZNP
         znpCfg1 = ZNP_CFG1_UART;
    -#elif defined CC2530_MK
    -    znpCfg1 = ZNP_CFG1_SPI;
    -    znpCfg0 = ZNP_CFG0_32K_OSC;
    -#else
    -    znpCfg1 = P2_0;
    -    znpCfg0 = P1_2;
    -    // Tri-state the 2 CFG inputs after being read (see hal_board_cfg_xxx.h for CFG0.)
    -    P1INP |= BV(2);
    -    P2INP |= BV(0);
    -#endif
    +
       }
       else  // !OB_COLD
       {
    @@ -264,12 +254,12 @@ uint8 OnBoard_SendKeys( uint8 keys, uint8 state )
      *********************************************************************/
     void OnBoard_KeyCallback ( uint8 keys, uint8 state )
     {
    -  uint8 shift;
    -  (void)state;
    +  //uint8 shift;
    +  //(void)state;
     
    -  shift = (keys & HAL_KEY_SW_6) ? true : false;
    +  // shift = (keys & HAL_KEY_SW_6) ? true : false;
     
    -  if ( OnBoard_SendKeys( keys, shift ) != ZSuccess )
    +  if ( OnBoard_SendKeys( keys, state ) != ZSuccess )
       {
         // Process SW1 here
         if ( keys & HAL_KEY_SW_1 )  // Switch 1
    
    -------------------- Projects/zstack/ZNP/CC253x/CC2530.ewp --------------------
    index 0d19190..65c408b 100644
    @@ -303,13 +303,11 @@
             <option>
               <name>CCDefines</name>
               <state>BDB_FINDING_BINDING_CAPABILITY_ENABLED=0</state>
    -          <state>TC_LINKKEY_JOIN</state>
               <state>NWK_MAX_DEVICE_LIST=10</state>
    -          <state>ZDSECMGR_TC_DEVICE_MAX=30</state>
               <state>ZNP_ENABLED</state>
    -          <state>POWER_SAVING</state>
    +          <state>ZDSECMGR_TC_DEVICE_MAX=5</state>
               <state>FEATURE_SYSTEM_STATS</state>
    -          <state>MT_GP_CB_FUNC</state>
    +          <state>ASSERT_RESET</state>
             </option>
             <option>
               <name>CCPreprocFile</name>
    @@ -480,6 +478,7 @@
               <state>$PROJ_DIR$\Source</state>
               <state>$PROJ_DIR$\..\Source</state>
               <state>$PROJ_DIR$\..\..\SE\Source</state>
    +          <state>$PROJ_DIR$\..\..\Utilities\BootLoad\Source</state>
               <state>$PROJ_DIR$\..\..\ZMain\TI2530ZNP</state>
               <state>$PROJ_DIR$\..\..\..\..\Components\hal\include</state>
               <state>$PROJ_DIR$\..\..\..\..\Components\hal\target\CC2530ZNP</state>
    @@ -1448,15 +1447,13 @@
             <option>
               <name>CCDefines</name>
               <state>BDB_FINDING_BINDING_CAPABILITY_ENABLED=0</state>
    -          <state>TC_LINKKEY_JOIN</state>
               <state>NWK_MAX_DEVICE_LIST=10</state>
    -          <state>ZDSECMGR_TC_DEVICE_MAX=30</state>
               <state>ZNP_ENABLED</state>
    -          <state>POWER_SAVING</state>
    +          <state>ZDSECMGR_TC_DEVICE_MAX=5</state>
               <state>FEATURE_SYSTEM_STATS</state>
    -          <state>MT_GP_CB_FUNC</state>
               <state>ASSERT_RESET</state>
               <state>MAKE_CRC_SHDW</state>
    +          <state>HAL_PA_LNA</state>
             </option>
             <option>
               <name>CCPreprocFile</name>
    @@ -2113,20 +2110,20 @@
             </option>
             <option>
               <name>GenerateExtraOutput</name>
    -          <state>0</state>
    +          <state>1</state>
             </option>
             <option>
               <name>XExtraOutOverride</name>
    -          <state>0</state>
    +          <state>1</state>
             </option>
             <option>
               <name>ExtraOutputFile</name>
    -          <state>CC2530.sim</state>
    +          <state>ZNP-ProdSbl.hex</state>
             </option>
             <option>
               <name>ExtraOutputFormat</name>
               <version>11</version>
    -          <state>60</state>
    +          <state>23</state>
             </option>
             <option>
               <name>ExtraFormatVariant</name>
    
    ------------------- Projects/zstack/ZNP/CC253x/tools/znp.bat -------------------
    index bb0566c..a86992d 100644
    @@ -41,6 +41,7 @@ rem ****************************************************************************
     if "%2"=="" goto Usage
     
     :Launch
    +e:
     chdir %1
     start znp.js %2
     exit /b
    
    ---------------------- Projects/zstack/ZNP/Source/znp.cfg ----------------------
    index 2b8d56d..93b0059 100644
    @@ -43,6 +43,32 @@
     /* MAC Settings */
     -DMAC_CFG_APP_PENDING_QUEUE=TRUE
     
    +/* Default channel is Channel 11 - 0x0B */
    +// Channels are defined in the following:
    +//         0      : 868 MHz     0x00000001
    +//         1 - 10 : 915 MHz     0x000007FE
    +//        11 - 26 : 2.4 GHz     0x07FFF800
    +//
    +//-DMAX_CHANNELS_868MHZ     0x00000001
    +//-DMAX_CHANNELS_915MHZ     0x000007FE
    +//-DMAX_CHANNELS_24GHZ      0x07FFF800
    +//-DDEFAULT_CHANLIST=0x04000000  // 26 - 0x1A
    +//-DDEFAULT_CHANLIST=0x02000000  // 25 - 0x19
    +//-DDEFAULT_CHANLIST=0x01000000  // 24 - 0x18
    +//-DDEFAULT_CHANLIST=0x00800000  // 23 - 0x17
    +//-DDEFAULT_CHANLIST=0x00400000  // 22 - 0x16
    +//-DDEFAULT_CHANLIST=0x00200000  // 21 - 0x15
    +//-DDEFAULT_CHANLIST=0x00100000  // 20 - 0x14
    +//-DDEFAULT_CHANLIST=0x00080000  // 19 - 0x13
    +//-DDEFAULT_CHANLIST=0x00040000  // 18 - 0x12
    +//-DDEFAULT_CHANLIST=0x00020000  // 17 - 0x11
    +-DDEFAULT_CHANLIST=0x00010000  // 16 - 0x10
    +//-DDEFAULT_CHANLIST=0x00008000  // 15 - 0x0F
    +//-DDEFAULT_CHANLIST=0x00004000  // 14 - 0x0E
    +//-DDEFAULT_CHANLIST=0x00002000  // 13 - 0x0D
    +//-DDEFAULT_CHANLIST=0x00001000  // 12 - 0x0C
    +//-DDEFAULT_CHANLIST=0x00000800  // 11 - 0x0B
    +//-DDEFAULT_CHANLIST=0x02222800
     /* Generic All-in-One Settings */
     -DZSTACK_DEVICE_BUILD="(DEVICE_BUILD_COORDINATOR | DEVICE_BUILD_ROUTER | DEVICE_BUILD_ENDDEVICE)"
     
    @@ -56,20 +82,35 @@
     
     -DZIGBEEPRO
     -DZIGBEE_FRAGMENTATION
    --DINTER_PAN
    +//-DINTER_PAN
     -DOSAL_CLOCK
     -DOSAL_SAPI=FALSE
     -DSAPI_CB_FUNC=FALSE
     
    --DHOLD_AUTO_START
     -DNV_RESTORE
     -DNV_INIT
     -DNUM_DISC_ATTEMPTS=0
     
    -//-DSRC_RTG_EXPIRY_TIME=255
    -//-DCONCENTRATOR_ENABLE=TRUE
    -//-DCONCENTRATOR_DISCOVERY_TIME=60
    -//-DMAX_RTG_SRC_ENTRIES=100
    +-DBEACON_REQUEST_DELAY=100
    +
    +
    +-DMAXMEMHEAP=1900
    +-DNWK_MAX_DEVICE_LIST=10
    +-DCONCENTRATOR_ENABLE=TRUE
    +-DCONCENTRATOR_DISCOVERY_TIME=120
    +-DMAX_RTG_SRC_ENTRIES=100
    +-DSRC_RTG_EXPIRY_TIME=2
    +//-DCONCENTRATOR_ROUTE_CACHE
    +-DMTO_RREQ_LIMIT_TIME=5000
    +-DLINK_DOWN_TRIGGER=12
    +-DNWK_ROUTE_AGE_LIMIT=30
    +-DBCAST_DELIVERY_TIME=100
    +-DDEF_NWK_RADIUS=15
    +-DDEFAULT_ROUTE_REQUEST_RADIUS=12
    +-DROUTE_DISCOVERY_TIME=13
    +-DZDNWKMGR_MIN_TRANSMISSIONS=0
    +-DNWK_LINK_STATUS_PERIOD=30
    +-DLQI_ADJUST
     
     // Define this flag to enable ZNP implementation of the ZCL_KEY_ESTABLISHMENT_ENDPOINT and task.
     //-DTC_LINKKEY_JOIN
    @@ -100,10 +141,7 @@
     -DMT_ZDO_MGMT
     -DMT_ZDO_EXTENSIONS
     
    -/* MT_GP GreenPower interface */
    --DMT_GP_CB_FUNC
    -
     /* MT_APP interface - useful when ZAP defines ZAP_ZNP_MT for MT_SYS_APP_MSG pass-through. */
     -DMT_APP_FUNC
    --DMT_APP_CNF_FUNC
     
    +-DZNP_ALT
    \ No newline at end of file
    
    --------------------- Projects/zstack/ZNP/Source/znp_app.c ---------------------
    index e461086..9744b34 100644
    @@ -134,6 +134,7 @@ void znpInit(uint8 taskId)
       znpBasicRspRate = ZNP_BASIC_RSP_RATE;
       (void)osal_start_reload_timer(taskId, ZNP_BASIC_RSP_EVENT, ZNP_BASIC_RSP_RATE);
     #endif
    +  TXPOWER=0xf5;
     }
     
     /**************************************************************************************************
    
    ] 1307 log starts at 13:32. 1701 log start at 07:56. I assume this will help you to align the times.

     

    Thanks,
    Shlomi

  • Hi Shlomi,

    In 130117_relevant.cubx, between 05:08 and 05:12 you can see your ZNP coordinator (0x0000) sending outgoing packets. Packets #3550 ("power configuration" in Ubiqua), #3600 (link status), #3701 (link status), etc. The same is also true for the period between 16:31 and 16:35 in this log, and between 08:21 and 08:25 in the other log. This means that the RF functionality is not frozen on your ZNP device.

    To further debug this issue we will need to understand what is happening on the ZNP device side, specifically the communication between the ZNP device and the host processor. Is any of this communication logged? Each SREQ sent to the device from the host processor should be processed and an SRSP reply will be sent if the device is functioning properly. If there are errors, the SRSP error code can tell you exactly what the problem is. If the device truly is freezing, your host processor may not receive any SRSP.
  • Hi Jason,
    Here my answer:


    In 130117_relevant.cubx, between 05:08 and 05:12 you can see your ZNP coordinator (0x0000) sending outgoing packets. Packets #3550 ("power configuration" in Ubiqua), #3600 (link status), #3701 (link status), etc. The same is also true for the period between 16:31 and 16:35 in this log, and between 08:21 and 08:25 in the other log. This means that the RF functionality is not frozen on your ZNP device.

    [Shlomi] I know that. However, on the MT side I stop receiving any OTA indications and all attempts to send packets OTA fail. This is the main issue.  


    To further debug this issue we will need to understand what is happening on the ZNP device side, specifically the communication between the ZNP device and the host processor. Is any of this communication logged? Each SREQ sent to the device from the host processor should be processed and an SRSP reply will be sent if the device is functioning properly. If there are errors, the SRSP error code can tell you exactly what the problem is. If the device truly is freezing, your host processor may not receive any SRSP.

    [Shlomi] As I pointed out earlier, MT communication functions properly. However OTA functionality via MT ceases both ways as described above.

     

    Thanks,
    Shlomi

  • Can you clarify what you mean by OTA functionality? Do you mean it in the literal sense, like any over-the-air packets, or are you using it in reference to the OTA upgrade cluster? I backtracked a little and I noticed in one of your previous posts you said you added the "OTA dongle" code to your ZNP. Do you mean code from the OTA dongle project? The OTA dongle project is provided solely as part of a demonstration of the OTA upgrade cluster. I don't see any OTA upgrade activity in either of the logs you provided which is why I'm asking.

    Could you please point me to a spot in one of the logs provided, or in a new log, where you see a correct exchange of packets between your ZNP device and an end device and/or router? You have not specified what packet exchange is supposed to be happening between these devices. From the logs, it looks like your end devices/routers are sending some custom application layer data to the ZNP coordinator, but it is unclear to me what and when the coordinator should be sending back to these devices.

    Since you say all attempts to send packets are failing, I'm going to assume you mean you are trying to send application layer packets from the host processor through MT to the ZNP device and then eventually over-the-air, with the destination device being either another router or end device. I would like to point out that in the log "130117_relevant.cubx", packet #3550 (time stamp 15:09:22, which falls between 15:08 and 15:12) is an application layer packet that is sent from the ZNP coordinator over-the-air successfully, and is then relayed to an end device. This packet could not have been sent from the ZNP device alone since it is a custom application layer packet, so the host processor must have successfully sent that packet through MT and subsequently the ZNP device sent it over-the-air. So in this time frame, the device could not have been "frozen" in the manner which you describe.
  • Hi Jason,

    Your analysis is 100% correct - you saw a valid, application initiated exchange between the ZNP and one of the routers. It turned out that there is 2 hours lag between the logs on the device and the Ubilogic timestamp, so I provided you with wrong time. I apologies.  

    I attach 3 additional logs and provide below the freeze-out times. To make it clear, I explain again: when the phenomenon happens, the ZNP is not stuck per-say. It responds to MT requests such as NV reads, SW version etc. The radio side continues to operate as well, in terms of sending ACKs etc. However, indications about incoming packets from the ZNP via MT interface cease to be generated. Any attempt to send a packet OTA via MT  fails.

    In the attached Ubilogic logs, the phenomenon happens at the following times:

    2017-01-13 17:08-17:12 

    2017-01-17 10:21-10:25 

    2017-01-19 12:27-12:31 

    For the purpose of time sync: 130117 log starts at 16:23.

    Thanks,
    Shlomi
    7563.logs.zip

  • "Any attempt to send a packet OTA via MT fails."

    Regarding this, on your host processor side you must be doing something like an AF Data Request over MT to the ZNP device. What is the SRSP to this command? It should be either 0 (success) or 1 (failure).
  • Hi Jason,

    I aapologies for the delayed reply. SRSP is success but then immediately a data confirmation is generated by the ZNP with failure status. No transmission is observer OTA.

    Thanks,

    Shlomi

     

  • Can you post how you send MT command and what the responses you get?
  • I attach the serial dump - how it works when it works OK:

     

    Sending the AF packet (SREQ)

    2017-02-16 15:48:50,263 - [info] application - SendGetLqi(). ZigBee address 0x5B34 Room: testUnit

    2017-02-16 15:48:50,263 - [info] application - Sending packet. Addr: 0x5B34 Transaction ID: 2

    2017-02-16 15:48:50,264 - [info] application -  fe b 24 1 34 5b 1 1 1 0 2 10 7 1 c 58

     

    Receiving SRESP:

    2017-02-16 15:48:50,277 - [info] application - Buffer received:

    2017-02-16 15:48:50,280 - [info] application -  fe 1 64 1 0 64

     

    AF Data Confirmation received:

    2017-02-16 15:48:50,308 - [info] application - Buffer received:

    2017-02-16 15:48:50,310 - [info] application -  fe 3 44 80 0 1 2 c4

    2017-02-16 15:48:50,310 - [info] application - APS ACK received

     

  • Can you elaborate the case that doesn't work?
  • Yikai,

    As per your recommendation, in parallel with with trying to resolve the issue discovered in ZNP of the previous release (BTW, status?), we have started to field-test ZNP of the new release 3.0. A critical issue was discovered in the release, which prevents us from using it for mass deployment. Fortunately the issue is easily reproducible, so I count on quick response (and solution!) from TI on that.

     

    The essence of the issue is that once the network is up (ZNP + some amount of routers), if ZNP is hard reset, communication with the routers is lost. The packets are transmitted from the ZNP to the routers, but the routers ignore it. Sometimes communication returns to normal after several minutes, sometimes it does not. However, communication always returns to normal as soon as one of the routers is reset. 

     

    It feels somewhat similar to the previous issue we were investigating (ZNP starts ignoring incoming packets). 

     

    I would also like to add the following observation: when replacing ZNPs on several of our sites, we brought in a new ZNP with exactly similar parameters (same MAC, same PANID, same frequency), which was started earlier out of network (so that it would not jump to next PANID). When we started it on the replacement site, it did not communicate with the network, until we reset one of the nearby routers.

     

    Reading some staff over the Net, I saw posts mentioning some security mechanism based on (NWK layer?) packet counter, which might be the reason for the phenomena we observe. Please elaborate on that and how it can be disabled.

     

    I attach a log of the issue described in the beginning of the letter. It was taken on a simple setup (ZNP + one router). You can see numerous send retries from ZNP to router which to get low level ACK but no Data Confirmation. 

     

    Last note: the FW on the router is of previous release Z-Stack Home 1.2.2a.44539. Please do not suggest that we upgrade it to 3.0, as we are not going to do it. It is well tested and stable. We do expect TI Z-stack to compatible between releases.

     

    Thank you advance for your help!

     Shlomi

  • Hi YiKai,

    I have 2 outstanding support requests for TI. 

     

    One of them (the latter one) is an issue in the latest 3.0 release. It is easily reproducible. A detailed description, including log was sent to you on 26.2 (almost 3 weeks ago!!!) and I did not receive any response yet. Please read it and provide a solution.

     

    The second one on which I already corresponding for months relates to the previous Z-Stack release. It have many many e-mails in the thread, so I cannot just "sum it up". I have invested time and money putting loggers in the field in order to provide logs for TI. After I provided the logs, they said "move up to Z-Stack 3.0". This is not an acceptable solution for 2 reasons:

    • Z-Stack 3.0 is buggy as well
    • It is impossible to to remote update from Z-Stack 1.2xxx to Z-Stack 3.0, so we will need to visit all those sites and update manually

    Current situation with the Z-Stack/ZNP is unacceptable. After more than half a year of debugging, TI is unable to provide a stable, bug free version of ZNP code.

     

    I have an upcoming round of installations, including in the US and this situation cannot continue. 

     

    Please advice how do I proceed to get it resolved. I can travel to USA if needed, to work with TI engineer and get it done.

     

    Thanks,

    Shlomi

  • Hi Shlomi,

    I am sorry about the wait, I will be sure to follow up with this post tomorrow.
  • Hi Shlomi,
    Jason is expert from TI so I think he can give you best support on this.
  • Hi Shlomi,

    In your post from 2/25, you say there is a log attached but I do not see a log. Can you please .zip up all the files you wish to send and then try to reattach them? Sometimes e2e will reject files based on the file format, but if you put them in a .zip archive it should be fine.
  • Hi Shlomi,

    Can you give more details on the Z3.0 issue?, which target you used (CC2531 debug, CC2531 ProdHex)?

    How exactly did you perform the reset (Power cycle the device, reset trough programming reset pin, Serial interface SysReset)?

    Which serial commands do you use to start the network and to resume the nwk operation and restore the Nv?

    As Jason say, there is no attached log. I have tried replicate the issue with sample lights and those remain responsive, so more details on these items would help to understand the issue, replicate it and provide help on this.

  • Hi Luis,

    On last Thursday we done conference call with the customer & Jason, after the customer send summarize mail to Jason, please keep update about it.

    Thanks,

    Shlomi