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: Can END device directly join the coordinator?? or does it require intermediate Router device to work in CC2530

Part Number: CC2530
Other Parts Discussed in Thread: Z-STACK, SMARTRF06EBK,

I am trying to burn the END device Samplelight application firmware and trying to make it join with the coordinator . But it is only sending Single Becon request and nothing else.

The same code by changing to Router configuration will associate with coordinator. 

I have called bdb_startcommissing at the end of the ZclSampleligh_init function.

Can anyone guide me in this??

I am not using any EVB , iam burning hex file into CC2530. 

For the Bdb Network sterring procedure mentioned in development document , i don't see anything else needs to be done apart from calling bdb_startcommissioning function.

Please help in proceeding with the same.

Regards

Avinash 

  • I suggest you to use Ubiqua Protocol Analyzer to check what happens to your end device.
  • I am using TI packet sniffer and cannot see anything else except becon request.

    i don't have the ubiqua licence now.
  • Do you have coordinator nearby? If so, Coordinator should respond beacon frame at least. Can you attach your sniffer log?
  • You should most definitely be able to connect an end device directly to a coordinator. Have you tried verifying operation without any modification to the project files? Can you please detail the changes you've made to zclSampleLight_Init? Make sure that you've changed the project build such that ZSTACK_DEVICE_BUILD is defined as a DEVICE_BUILD_ENDDEVICE is and that BDB_NETWORK_STEERING_CAPABILITY_ENABLED is set. Are you sure that the router SampleLight is actually joining the coordinator network and not forming its own distributed network? The coordinator must have permit-join enabled before commissioning begins on the second unit.
    It would be best to provide sniffer logs of the router and end device projects.

    Regards,
    Ryan
  • Coordinator was 10 Meters away.end_device_coordinator.psd is it because of this? When i kept the node near t it (1 meter) it is sending response but not joining the network. Attached the sniffer file of the same .

    The Compile Flag that i use in pre-processor are

    BDB_REPORTING
    SECURE=1
    xTC_LINKKEY_JOIN
    NV_INIT
    NV_RESTORE
    xPOWER_SAVING
    NWK_AUTO_POLL
    xZTOOL_P1
    xMT_TASK
    xMT_APP_FUNC
    xMT_SYS_FUNC
    xMT_ZDO_FUNC
    xMT_ZDO_MGMT
    xMT_APP_CNF_FUNC
    xLCD_SUPPORTED=DEBUG
    MULTICAST_ENABLED=FALSE
    ZCL_READ
    ZCL_DISCOVER
    ZCL_WRITE
    ZCL_BASIC
    ZCL_IDENTIFY
    ZCL_ON_OFF
    ZCL_SCENES
    xZCL_GROUPS
    ZCL_LEVEL_CTRL
    HAL_LCD=FALSE
    INT_HEAP_LEN=2560  -- Flash ooptimization
    BDB_TL_TARGET 
    INTER_PAN
    DEFAULT_KEY   -- This is to have the own key
    xBDB_NETWORK_STEERING_CAPABILITY_ENABLED=1

    And added 

    bdb_StartCommissioning(BDB_COMMISSIONING_MODE_NWK_STEERING |BDB_COMMISSIONING_MODE_FINDING_BINDING |BDB_COMMISSIONING_MODE_INITIATOR_TL); 

    at the end of zclSamplelight_Init()

    and zgPreConfigKeys is set to TRUE in ZGlobal.c 

    and added default key in f8wconfig.cfg file

    When i build it with the router config , it will join the network but the same code when built as end device will not join.(Assosiation will happen)

  • Hi,

    I'm a bit confused on what you are trying to do with your compile flags and network setup so I will make some comments.

    1. Due to changes in Zigbee 3.0 device commissioning, you cannot disable TC_LINKKEY_JOIN anymore. In your sniffer log, the ZC is attempting to send your joining device a Transport Key packet, but it is malformed due to your compile-time options.
    2. Touchlink (BDB_TL_TARGET, INTER_PAN, BDB_COMMISSIONING_MODE_INITIATOR_TL) cannot be used by a Coordinator. Coordinators form centralized networks, and touchlink commissioning does not work with centralized networks.
    3. A joining device cannot use touchlink to join a centralized network, a joining device can only use touchlink to join a distributed network.

    Can you please explain what your use-case is? High level, i.e. what are your network devices, what is your topology, what is the end goal? Do you need the proximity-based network commissioning that Touchlink offers or can you use classic Zigbee network commissioning?
  • According to sniffer log, it seems the problem is on your security settings. Why do you disable TC_LINKKEY_JOIN?
  • 0121.end_device_coordinator.psdRouter_Coordinator.psdRouter_Coordinator.psdHi Rayan,

    Following are the changes that i have done

    1. Optimized the code by disabling the UI related things and LCD releated things as said in

    processors.wiki.ti.com/.../Optimizing_Flash_and_RAM_Usage_of_Z-Stack_for_CC2530

    2. Added the function

    bdb_StartCommissioning(BDB_COMMISSIONING_MODE_NWK_STEERING |BDB_COMMISSIONING_MODE_FINDING_BINDING |BDB_COMMISSIONING_MODE_INITIATOR_TL);  

    at the end of ZclSamplelight_init() function

    3. zgPreConfigKeys is set to TRUE in ZGlobal.c

    4. Added the DEFAULT KEY in f8wconfig.cfg file

    And for the Router Following are the compile flag that i use,

    BDB_REPORTING

    SECURE=1

    xTC_LINKKEY_JOIN

    NV_INIT

    NV_RESTORE

    MULTICAST_ENABLED=FALSE

    ZCL_READ

    ZCL_DISCOVER

    ZCL_WRITE

    ZCL_BASIC

    ZCL_IDENTIFY

    ZCL_ON_OFF

    ZCL_SCENES

    xZCL_GROUPS

    ZCL_LEVEL_CTRL

    HAL_LCD=FALSE

    INT_HEAP_LEN=2560

    BDB_TL_TARGET

    INTER_PAN

    DEFAULT_KEY

    and for END device following are the compile flag that i use,

    BDB_REPORTING

    SECURE=1

    xTC_LINKKEY_JOIN

    NV_INIT

    NV_RESTORE

    xPOWER_SAVING

    NWK_AUTO_POLL

    MULTICAST_ENABLED=FALSE

    ZCL_READ

    ZCL_DISCOVER

    ZCL_WRITE

    ZCL_BASIC

    ZCL_IDENTIFY

    ZCL_ON_OFF

    ZCL_SCENES

    xZCL_GROUPS

    ZCL_LEVEL_CTRL

    HAL_LCD=FALSE

    INT_HEAP_LEN=2560

    BDB_TL_TARGET

    INTER_PAN

    DEFAULT_KEY

    In the router case it is joined to the network ( Becon request -- Association request ---- Short address assignment and new device announcement)

    In the END device case it is going only till Short address assignment, new device announcement is not sent.

    I have attached the sniffer file of both the case.

    And by default in stack BDB_NETWORK_STEERING_CAPABILITY_ENABLED  is set to 1 in bdb.h file

    Are you sure that the router SampleLight is actually joining the coordinator network and not forming its own distributed network?  -- How to verify this? sniffer  shows that the router node is also broadcasting network.

    Please guide me in joining the END device to coordinator. (I am using old stack coordinator where permit join is enabled -- i have a rasberry pi uart interface to the coordinator which will control and maintain the coordinator)

    awaiting for your reply

    Regards,

    Avinash

  • Little bit of background.

    Our existing systems:
    Our current Zigbee network consists of a ZC and multiple routers. These are based on ZStack 2.6.1 The ZC was build using Z-Stack-Mesh Sample and the router was building using the Zstack Lighting sample. In our network we use the pre-configured keys by setting the zgPreConfigKeys=TRUE and configuring the key in f8wconfig.cfg. For every deployment we use a unique that are configured in the ZC and ZR (luminaries) .

    Our goal is to add ZED (occupancy Sensor) to our network and also to migrate to Zstack 3.0.1. Our network will be a centralized network with a ZC. We are using GBAN GB2530 SoC.

    To answer your questions
    1. I was using our existing ZC (ZStack (2.6.1) -Mesh ) and the ZED built using the ZStack 3.0.1
    2. We do not want to use Tochlink
    3. same as above.


    So my questions are
    1. Can the ZStack 3.0.1 ZED work with my existing ZC (ZStack 2.6) with the pre-configured link key option. If not, we are ok to migrate ZC and ZR to 3.0.1

    2.How do I configure the pre-configured link keys in ZC and ZED in ZStack 3.0.1. Appreciate if you can provide the compile options and setting for the same. If this is not possible in ZStack 3.0.1, what is the next best option to use pre-configured keys. The ZStack 3.0 Developers guide Section 10.2 talks about the pre-configured key approach. Is this valid?

    3.Our ZED is a occupancy sensor. I am trying to build my application using Samplelight sample. Is this the right approach or Should I used “sample switch” project as the base for building my application. Or suggest if there is a better approach


    Regards,
    Avinash
  • As JasonB has replied in his previous post, you have to use TC LINK KEY in Z-Stack 3.0.
  • Enable TC_LINKKEY_JOIN. ZStack 3.0.1 ZED is compatible with a ZStack 2.6 ZC but must utilize TC link keys per the 3.0 specification. DEFAULT_TC_LINK_KEY is set in nwk_globals.h. zcl_sampleapps_ui.c gives an example of an install code and address if the BDB_INSTALL_CODE_USE is set to BDB_INSTALL_CODE_USE_IC_CRC. I'd recommend getting the default key to work before you try an install code. The light or switch projects do not make a difference for joining a network but will affect your ZCL attributes.

    Regards,
    Ryan
  • Hello Avinash,

    Have you been able to fix your issue? If so then please tell us your solution. If you have no further comments then I will mark this post as resolved.

    Regards,
    Ryan
  • Hi Rayan,

    it is not fixed yet,

    For coordinator , I am using the ZNP coordinator code

    Following are the changes done to ZNP coordinator code

    MT_UART.c -- to enable uart and changed the baud rate.
    znp_app.c -- uart baud rate related changes.

    I programmed the cc2530 and enabled the Ztool to communicate.

    Following are the commands that i sent,

    UTIL_SET_PAN_ID = 3
    UTIL_SET_CHANNEL_ID = 12(Dec)
    ZB_START_REQUEST

    After this the network started on channel 12 and pan id 3.

    after this i sent two more commands

    1. ZB_PERMIT_JOINING_REQUEST with input 0xFFFF and 0xFF respectively
    2. ZB_ALLOW_BIND with the input timeout being 0xFF


    following are the compilation flag that i used

    BDB_FINDING_BINDING_CAPABILITY_ENABLED=0
    TC_LINKKEY_JOIN
    NWK_MAX_DEVICE_LIST=10
    ZDSECMGR_TC_DEVICE_MAX=30
    DISABLE_GREENPOWER_BASIC_PROXY
    xPOWER_SAVING
    FEATURE_SYSTEM_STATS
    MT_GP_CB_FUNC
    MT_SYS_FUNC
    MT_NWK_FUNC
    MT_AF_FUNC
    MT_ZDO_FUNC
    MT_SAPI_FUNC
    MT_UTIL_FUNC
    MT_APP_FUNC
    MT_ZNP_FUNC
    ZNP_ALT
    HAL_PA_LNA
    ZCL_READ
    HAL_UART=TRUE
    ZTOOL_P1
    NV_RESTORE
    NV_INIT



    After this i started the samplelight end device by programming it to some other node with following changes,


    Disabled all UI related function calls,

    Excluded zcl_sampleapps_ui.c and zcl_sampleapps_ui.h files from compiling

    called

    bdb_StartCommissioning(BDB_COMMISSIONING_MODE_NWK_STEERING | BDB_COMMISSIONING_MODE_FINDING_BINDING | BDB_COMMISSIONING_MODE_INITIATOR_TL);

    at the end of the samplelight_init function


    no other changes, as suggested i am not doing any changes to security related things and trying to see the association and joining of two device by default stack.

    i am using the packet sniffer and saw that end device node sent the becon request to which the coordinator responded with association flag being 1 . but after that nothing happens.

    Need your help to understand the process better. Please suggest the steps involved in making two device join. How can we say that two device joined ??

    Following are the compilation flag of end device

    BDB_REPORTING
    SECURE=1
    TC_LINKKEY_JOIN
    NV_INIT
    NV_RESTORE
    xPOWER_SAVING
    NWK_AUTO_POLL
    xZTOOL_P1
    xMT_TASK
    xMT_APP_FUNC
    xMT_SYS_FUNC
    xMT_ZDO_FUNC
    xMT_ZDO_MGMT
    xMT_APP_CNF_FUNC
    LCD_SUPPORTED=DEBUG
    MULTICAST_ENABLED=FALSE
    ZCL_READ
    ZCL_DISCOVER
    ZCL_WRITE
    ZCL_BASIC
    ZCL_IDENTIFY
    ZCL_ON_OFF
    ZCL_SCENES
    ZCL_GROUPS
    ZCL_LEVEL_CTRL

    Looking forward for your help


    Regards,
    Avinash
  • end_device_with_coordinator.psdattaching the sniffer file for the above post.

  • In the sniffer log, your coordinator enable permit join but device doesn't do association request after receiving beacon frame from coordinator. It's possible that the device had joined to other Zigbee coordinator and keep network information in NV so it cannot join this coordinator. I suggest you to erase device's flash and download FW to test again.
  • I did that during the process itself but result is the same.

    The sniffer file includes the same.
  • How do you erase CC2530?
  • through smart RF flash programmer. I am using the module GB2530 from which we can connect the pins to Debugger and erase the chip and program the chip through Smart RF programmer
  • It sounds no problem. Anyway, I suggest you to erase both coordinator and device to test again. If you still have trouble joining device to coordinator, attach your sniffer log for analysis.
  • tried but the problem still exists. no response . Flashed both coordinator and end device.
  • There is no beacon frame in your sniffer log. You should check if your coordinator forms Zigbee network correctly first.
  • When i power the router device it joins the network, but when i try with end device this will happen. Anyway how to make sure coordinator is forming the network
  • You can use IAR to set a breakpoint on "case DEV_ZB_COORD:" of UI_DeviceStateUpdated() in zcl_sampleapps_ui.c and make sure it stop in "case DEV_ZB_COORD:" which means coordinator setup successfully.
  • It's possible that router device forms a distributed network instead of joining the centralized network, as a result of not being able to find the network specified by your parameters. Have you modified the coordinator code for the correct channel and pan ID?

    Regards,
    Ryan
  • Router device is getting association response from coordinator. I am using ZNP coordinator (zstack 3.0.1) and sample light router device with TC_LINK_KEY enabled in both.


    I am not sure of weather it is a centralized network of distributed network.

    I am facing the problem when i build the firmware as " END-Device " . The same sample light project when built as router device and powered on will send the becon request and becon response , gets the association response and short address from coordinators. But the same code when built as END -Device will only send the Becon request once and nothing happens after that.


    I don't know weather i am missing something fundamental here but i am not able to communicate the end device and coordinator.

    Looking forward for the help.
  • Try to refer to sunmaysky.blogspot.tw/.../use-ztool-z-stack-30-znp-to-set-up.html and use UTIL_GET_DEVICE_INFO to check if coordinator is setup successfully.
  • coordinator is set successfully sir.

    UTIL_GET_DEVICE_INFO this command will show that , coordinator is set successfully.
  • Can you attach your sniffer log the current testing results?
  • Hi Avinash,

    I used Z-Tool v2.0.6 to set up the Z-Stack 3.0.1 ZNP project for a Zigbee network using YK's blog: sunmaysky.blogspot.tw/.../use-ztool-z-stack-30-znp-to-set-up.html

    After commissioning network steering I was able to have the Z-Stack 3.0.1 SampleLight project device join the network without any issues. This was accomplished using CC2538EMKs on SMARTRF06EBK boards so I will retry once I have some CC2530EMK units next week.

    Edit: not receiving any issues with the CC2530EMKs either.

    Regards,
    Ryan