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.

Can not to start Zigbee 3.0

Other Parts Discussed in Thread: CC2591, CC2530-CC2591EM, Z-STACK, CC2560

I can not to start ZigBee 3.0

It is two problem:

The first - when i compile ZNP by default (only cc2591 support switch on)  and upload firmware to by target board (cc2530-cc2591em) I can send and get only Reset.  I try to upload ProdHEX version. When I upload Debug version all work fine.  I can get and send ZNP message to board. And   this board working well with prevision version of ZNP. 

Second Problem - I can not build network.  I try to build network like prevision version ZNP (Send same command). But when I try build prevision network I build it without any security an TC was disable in compile.

When I try to build network now the TC is enable.  In sniffer I can see next

  • I test ZNP in Z-Stack 3.0 ProdHex and Debug projects. All work fine. I use attached script coordinator_light.zip in to do the test for your reference.

  • I think I made a little change to make ProdHex work. You should select f8w2530.xcl (under \Z-Stack 3.0.0\Projects\zstack\Tools\CC2530DB) instead of znp-prod.xcl (under \Z-Stack 3.0.0\Projects\zstack\ZNP\CC253x\tools) as "Linker configuration file".

  • Ok! Thank you!
    I try the Script in the evening. It is scrip for Z3.0?
    When I start my Z3.0 coordinator the coordinator start fine. But the ZED or ZR don't jouin to ZC.
  • This script can be used for ZB 3.0 or ZHA 1.2. I run the scrip to start coordinator with ZB 3.0 ZNP and I can make a ZED/ZR joins.
  • When I set this f8w2530.xcl link scriptI get this error
    Fatal Error[e72]: Segment CRC_SHDW must be defined in a segment definition option (-Z, -b or -P)
  • And I can not use you coordinator_script. I did'nt get device announce.
    I try to start network from my script with ZDO_MGMT_DIRECT_JOIN_REQ but it was fail.
    My script is:
    fe,04,26,05,83,02,33,37; //set pan Id
    fe,06,26,05,84,04,00,00,80,00;//set channel mask
    fe,03,26,05,87,01,00;//set Role 02 for ZED
    fe,03,26,05,8f,01,ff;//enable callback
    fe,03,26,05,03,01,02; //clear state

    fe 01 41 00 00 //reset!

    fe 0d 24 00 0a 04 0F 01 00 00 01 01 01 00 01 01 00;//Af_Configure
    fe 01 25 40 00; //start network

    After with I add comand ZDO_MGMT_DIRECT_JOIN_REQ
    fe 05 25 36 02 00 00 ff 00


    When I start ZC all fine I get
    fe 01 45 c0 08
    fe 01 45 c0 08
    fe 01 45 c0 08
    fe 01 45 c0 08
    fe 01 45 c0 08
    fe 01 45 c0 08
    fe 01 45 c0 09

    when I start my ZR or ZED
    I get
    only
    fe 01 45 c0 02
    It's all!

    and i don't get device announce on ZC side..

    Whis script work fine for prevision ZNP without security.
    P.S. The CRC calculate.
  • Which IAR version do you use?
  • I use IAR 9.20. But i can to try 9.30

  • What can you speak about my start script?
  • 1. Yes, Please try IAR 9.30.
    2. I suggest you use the script I mentioned in previous post to make it work first.
  • I don't have CC2560 - board. I try the Sctript on one board and resault of start network like with my script . I dont understatnd in this case I dont get DEVICE_ANNCE from the second device?
    Do you try Z3.0 like ZNP?
  • 1. Why do you need CC2560? It's doesn't matter what ZNP HW you connected with Ztool and you always can run the script to start a ZC to form a Zigbee network.
    2. Yes, I try Z-Stack 3.0 with ZNP.
  • When I run this script I up only ZNP-coordinator. And the Coordinator UP fine. But for formation network I must have the ZED or ZR. How can I Up ZED (ZR) ?
  • Do you mean to start ZR/ZED with ZNP mode?
  • The ZNP can be ZC, ZED or ZR. I start one ZNP in ZC-Role and other ZNP in ZED(ZR) role.
  • Please use the attached script znp-bringupR.zjs to run ZR using ZNP. You can revise it to run as ZED. znp-bringupC.zjs is for ZC.

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/158/ZNP_5F00_script_5F00_example.7z

  • Thank you! Try it late.
  • You are welcome and good luck.
  • I try your scripts.  But nothing! The ZC  starts ok and ZR don't starts  it send Beacon request (I can see it in Sniffer)  Coordinator sen SuperFrame and it is all.  The Router Script infinity send Start_request  and get  ZDO_STATE_CHANGE_IND 

    It is all. 

  • You have to enable permit join on ZC to allow ZR to join.
  • I think you right. But i can not understand how I can to permit to join. I send command ZDO_MGMT_PERMIT_JOIN_REQ (fe 05 25 36 02 00 00 ff 00)
    on ZC after strta network. But didn't get any effect.
    how can I permit jouin?
  • Try to set duration to 0xFE.
  • Ok! I try. But it is time. And I want to join to ZC all time. And what is the filed TCSignificance ? It is set to TRUE or FALSE?
  • According to Zigbee 3.0 spec, you shouldn't enable permit join all the time. TCSignificance should be set to TRUE.
  • I do undestand right the algoritm of forming network with security:
    The first - I tune my netowrk paremetr (PANID,ROLE, CHANNEL) on my ZC and ZR(ZED)

    Reset devices with CLEAR_STATE_NETWORK flag.
    Start ZC.
    Send command ZDO_MGMT_PERMIT_JOIN_REQ (fe 05 25 36 02 00 00 ff(fe) 00) on ZC

    Start ZR(ZED)
    I must send ZDO_MGMT_PERMIT_JOIN_REQ (fe 05 25 36 02 00 00 ff 00) on ZR(ZED)??
    If yes -What is the parametr I must set in this command? Type of AddrMode? DstAddr

  • YiKai Chen said:
    According to Zigbee 3.0 spec, you shouldn't enable permit join all the time.

    In this case how can i provide join new device to my network? If the time limit only 4 minutes?

  • No, you don't have to send ZDO_MGMT_PERMIT_JOIN_REQ on ZR or ZED. When you start a brand new ZR or ZED, it should send beacon requests to scan Zigbee network to join.
  • We usually enable permit join when you want a device to join your Zigbee network. Otherwise, others can easily hack into your Zigbee network.
  • YiKai Chen said:
    No, you don't have to send ZDO_MGMT_PERMIT_JOIN_REQ on ZR or ZED

    And DstAddr in this request  must be set Addres of Coordinator or Router which want to be TC??

  • DstAddr can be set Addres of Coordinator or Router. When it is set as Addres of Coordinator, TC should be set to TRUE.
  • Hi Pavel,

    If you want to start a ZNP coordinator device, I would suggest to use the BDB commissioning methods defined by Z3.0 (see the 'Z-Stack Monitor and Test API' in section 3.13.1.5 for using the commissioning methods). This methods are already available in Z-Tool.

    The steps that you have to make on a ZNP coordinator device would be:

    1.- Send APP_CNF_BDB_START_COMMISSIONING  with Formation enabled (0x04)

    2.- After you receive the BDB_COMMISSIONING_NOTIFICATION with status success you send again APP_CNF_BDB_START_COMMISSIONING  but this time with network steering (0x02), this will open the network for 3 minutes, so you can now join your devices within this 3 minutes window. You can send this second command as many times you need to open the network again.

    NOTE: if you are trying to join legacy devices (non-Z3.0 devices), you will have to disable the TC policy that mandates joining devices to perform the Trust Center Link Key (TCLK) update, to do this, send the

    APP_CNF_BDB_SET_TC_REQUIRE_KEY_EXCHANGE with False as parameter.

    Regarding your first issue, did you have solved this?

    "  The first - when i compile ZNP by default (only cc2591 support switch on)  and upload firmware to by target board (cc2530-cc2591em) I can send and get only Reset.  I try to upload ProdHEX version. When I upload Debug version all work fine.  I can get and send ZNP message to board. And   this board working well with prevision version of ZNP.   "

    Hope this helps!

  • Nice guide! Thanks for sharing these steps.
  • Luis Luna said:
    Luis Luna!

    Thank you! I saw Your messege onlu now.  And I try  today late. thank you!

    Yesterday I build  prevision version of Stack with  security options  and try to join by 's script. The ZC and ZR strat well. But I didn't  send any messege. The sender return AF_DATA_CONFIRM with status Success. But I don't  get it on recipient (receiver). But I can see on receiver the AF_DATA_CONFIRM too. It is very strange.. 

    Sorry for this question but I never work with security n Z-Stac. 

  • Hi Luis!

    Your post help me solve same problem, and i can join to network.

    But stay same question abot scenario to join.

    When I start network first time (the coordinator) I must send APP_CNF_BDB_START_COMMISSIONING  with Formation enabled (0x04) and after APP_CNF_BDB_START_COMMISSIONING  with Steering enabled (0x02).  And for Router  APP_CNF_BDB_START_COMMISSIONING  with Steering enabled (0x02), It is right??  What is the type of  APP_CNF_BDB_START_COMMISSIONING  for ED?

    If I restart my device  I must to send only APP_CNF_BDB_START_COMMISSIONING  with Steering for EC and ER??

    The second question.

    When I start my devices (ZC and ZR) the first time (or both CLEAR_STATE bit) The device up fine.  If I restart and again up device all fine again.

    BUT! If I restart my ZR with CLEAR_STATE bit in this case I get same problem - the device try to join to network but couldn't.  I get 

    ZDO_STATE_CHANGE_IND 02, 03, 05... And Again 02,03,05.  On the ZC-side I get ZDO_TC_DEV_IND but ZR not join..  

    It is strange.. If I once or twice times restart ZR with CLEAR_STATE bit I join to network.  

    And where can i find information about type of  APP_CNF_BDB_START_COMMISSIONING?

    Thank You!

  • Hi Pavel,

    I am quoting you and my answers will be in lines in BLUE.

    Pavel Kosenko said:

    ...

    When I start network first time (the coordinator) I must send APP_CNF_BDB_START_COMMISSIONING  with Formation enabled (0x04) and after APP_CNF_BDB_START_COMMISSIONING  with Steering enabled (0x02).  And for Router  APP_CNF_BDB_START_COMMISSIONING  with Steering enabled (0x02), It is right??  What is the type of  APP_CNF_BDB_START_COMMISSIONING  for ED?

    You have to use Steering to start the joining process on Routers and End Devices (if those are Factory New), this will also instruct the device to open the network once it joins or if it was already in the network.

    If I restart my device  I must to send only APP_CNF_BDB_START_COMMISSIONING  with Steering for EC and ER??

    You have to call APP_CNF_BDB_START_COMMISSIONING with any parameter (including 0x00) to restore the network state of the device. Is this what you wanted to do?

    The second question.

    When I start my devices (ZC and ZR) the first time (or both CLEAR_STATE bit) The device up fine.  If I restart and again up device all fine again.

    BUT! If I restart my ZR with CLEAR_STATE bit in this case I get same problem - the device try to join to network but couldn't.  I get 

    ZDO_STATE_CHANGE_IND 02, 03, 05... And Again 02,03,05.  On the ZC-side I get ZDO_TC_DEV_IND but ZR not join..  

    It is strange.. If I once or twice times restart ZR with CLEAR_STATE bit I join to network.  

    Did you open the network on ZC before attempting to join ZR (APP_CNF_BDB_START_COMMISSIONING  with Steering enabled (0x02) to the coordinator)?

    I would suggest to use Ubiqua protocol analyzer to see what is happening here.

    And where can i find information about type of  APP_CNF_BDB_START_COMMISSIONING?

    You can check the 'Z-Stack 3.0 Developer's guide.pdf' document in section 15 for commissioning methods description. If you have time, you should read the whole document to get a good insight of the changes for Z3.0, or you can go to specific sections such as 10 for security ; )

    Also, if you are planning implement ZNP in a commercial product, you should read the Z-Stack ZNP Interface Specification.pdf for further details on the Z3.0 implementation on this device.

    Thank You!

    Hope this helps!

  • Thanks for usefull help.
    What does ZDO_state = 0x08 means? where should i see what does each number means? i read znp developing document some numbers are there like 0x02,0x05,0x07 and 0x09 but i got 0x08 that i don't know what does it mean!!

  • It is DEV_COORD_STARTING .

    You can find it at source (Find this impression) or in MT Manual ZDO_STATE_CHANGE_IND

  • but nothing is on MT Manual about it on 3.12.2.22 !! which manual you mean? and which source?!!
  • t

    typedef enum
    {
      DEV_HOLD,                                // Initialized - not started automatically
      DEV_INIT,                                // Initialized - not connected to anything
      DEV_NWK_DISC,                            // Discovering PAN's to join
      DEV_NWK_JOINING,                         // Joining a PAN
      DEV_NWK_SEC_REJOIN_CURR_CHANNEL,         // ReJoining a PAN in secure mode scanning in current channel, only for end devices
      DEV_END_DEVICE_UNAUTH,                   // Joined but not yet authenticated by trust center
      DEV_END_DEVICE,                          // Started as device after authentication
      DEV_ROUTER,                              // Device joined, authenticated and is a router
      DEV_COORD_STARTING,                      // Started as Zigbee Coordinator
      DEV_ZB_COORD,                            // Started as Zigbee Coordinator
      DEV_NWK_ORPHAN,                          // Device has lost information about its parent..
      DEV_NWK_KA,                              // Device is sending KeepAlive message to its parent
      DEV_NWK_BACKOFF,                         // Device is waiting before trying to rejoin
      DEV_NWK_SEC_REJOIN_ALL_CHANNEL,          // ReJoining a PAN in secure mode scanning in all channels, only for end devices
      DEV_NWK_TC_REJOIN_CURR_CHANNEL,          // ReJoining a PAN in Trust center mode scanning in current channel, only for end devices
      DEV_NWK_TC_REJOIN_ALL_CHANNEL            // ReJoining a PAN in Trust center mode scanning in all channels, only for end devices
    } devStates_t;
    

    File ZDApp.h