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: How to Bind(configure) cc2530 as co-ordinator with zigbee yale lock as end device(ED)

Part Number: CC2530


Hello,

                   We have cc2530 module as co-ordinator and want to configure it with Yale lock Zigbee device (ED).

1) want to tx and rx data to yale lock zigbee device to cc2530 for lock and unlock

2) i have been used Zstack 1.2 Home Automation profile and uses SampleDoorLockController code but still not get any success.

my coordinator code look like,

zAddrType_t dstAddr;

dstAddr.addrMode = AddrBroadcast;
dstAddr.addr.shortAddr = 0xFFFF; //to broadcast to binding request
NLME_PermitJoiningRequest(0xff);
ZDP_MgmtPermitJoinReq(&dstAddr, 0xFF, 1, FALSE);


afStatus_t ret;
ret = ZDP_BindReq( &dstAddr, 0x00, 0x00, 0x0101, &dstAddr, 0x00, TRUE );


if(ret == ZDP_SUCCESS )
{
LED = ~LED;
}
else{

LED =1;
}

i have send ZDP_BindReq( &dstAddr, 0x00, 0x00, 0x0101, &dstAddr, 0x00, TRUE ) to the End device for binding becoz i dont know end device PanID and Device ID.

result is .... still not get any response .... 4 to 5 days this is frustrating..... 

here problem is yale lock zigbee say that send configuration request from controller(i.e coordinator)...so we dont have any destination add or pan add....so how this is possible..... 

i dont have packet sniffer so i receive the end device frame and check whether it response right or not.........

please help me urgently.....

Thanks in Advance

  • Hello hitesh,

    A bind request requires a Cluster ID, destination short address (device which will store the bind, local in this case) and both the IEEE address and desired Endpoint of both the source and destination bound devices.  You should not broadcast this message.  I would recommend EZ-Mode but do not know if this will work as it depends on the operation of your Yale ZED.  You can acquire its short/IEEE addresses with ZDO_ProcessDeviceAnnce and receive valid endpoints by calling ZDP_ActiveEPReq (process ZDO_ActiveEndpointRsp_t).  You can obtain local device information from the NIB struct.  Of course acquiring a packet sniffing device will help with your debugging efforts.  You can use a second CC2530 with SampleDoorLock as a guide.

    Regards,
    Ryan

  • Hello Ryan, 

                configuration(binding) with cc2530(as coordinator) is successfully done with Yale Lock Zigbee(as End device) but still i can not Lock/Unlock it.

    I m using Home Automation zstack 1.2.2a sample code for sample door lock controller in my cc2530 as coordinator but still i m not able to Lock or Unlock it.

    i m using below code for lock unlock........

    zclDoorLock_t cmd;

    cmd.pPinRfidCode = aiDoorLockPIN;

    static bool locked = TRUE;

    giDoorLockScreenMode = DOORLOCK_MAINMODE;

    if ( locked )
    {
    zclClosures_SendDoorLockUnlockDoor( SAMPLEDOORLOCKCONTROLLER_ENDPOINT, &zclSampleDoorLockController_DstAddr, &cmd, TRUE, zclSampleDoorLockControllerSeqNum++ );
    locked = FALSE;
    }
    else
    {
    zclClosures_SendDoorLockLockDoor( SAMPLEDOORLOCKCONTROLLER_ENDPOINT, &zclSampleDoorLockController_DstAddr, &cmd, TRUE, zclSampleDoorLockControllerSeqNum++ );
    locked = TRUE;
    }

    my pincode that i set is 1,2,3,5 (i.e aiDoorLockPIN;) but still not any response from Lock...........

    I have also tried another function like get pin code, clear pin code, toggle door but nothing is happen.......

    i want to simply Lock and unlock yale lock but it is not done yet........waste too much time......

    i have set preprocessor.....

    SECURE=1
    TC_LINKKEY_JOIN
    NV_INIT
    NV_RESTORE
    ZTOOL_P1
    MT_TASK
    MT_APP_FUNC
    MT_SYS_FUNC
    MT_ZDO_FUNC
    LCD_SUPPORTED=DEBUG
    MULTICAST_ENABLED=FALSE
    ZCL_READ
    ZCL_WRITE
    ZCL_REPORT
    ZCL_BASIC
    ZCL_IDENTIFY
    ZCL_DOORLOCK
    ZCL_SCENES
    ZCL_GROUPS

    i m not using ZCL_EZMODE.....

    i have some question....

    1) what is zclSampleDoorLockControllerSeqNum??

    2)what is &cmd?? every time it is require to send pin code to lock or unlock what happen if i set it to null.

    3) this is TRUE in above function what happen if i set it to FALSE

    pls help me......

    Thanks

  • zclSampleDoorLockController_DstAddr is set to indirect because it expects for a local bind to exist on the Door Lock Controller to configure the Door Lock, however we have previously established that you may not be properly setting a bind.  Therefore it would be appropriate for you to figure out the binding mechanism or use a short address mode with endPoint included.  Your preprocessor definitions are fine.  Based on the description so far I am confident that zclClosures_SendDoorLockLockDoor is returning with a ZFailure or ZInvalidParameter status before attempting to send the message over-the-air.

    1. This is the Sequence Number of the command packet which populates the APS counter, it is not the cause of your communication failure.

    2. It is the zclDoorLock_t struct which contains the pPinRfidCode

    3. disableDefaultRsp, when set the destination device will not reply to the command with a default response.  This matters little at the moment as I doubt the command is being sent over-the-air.

    You need to test SampleDoorLock and obtain a sniffer device to aid in your project development.

    Regards,
    Ryan