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.

CC2538: What is needed to make one call back function work in generic app?

Part Number: CC2538


Dear all,

    I am trying to add callback functions of ZCL_SS in genericapp project.

    I did all the following to process the zclSS_IAS_Send_ZoneStatusChangeNotificationCmd function,

    (1) add zcl_ss.c and zcl_ss.h in profile directory

    (2) add call back table of static zclSS_AppCallbacks_t zclGenericApp_IASCmdCallbacks in genericapp.c and zclSS_ChangeNotificationCB as the callback function to state change notification command.

    (3) add cluster library in the zclGenericApp_Init() function to init the IAS cluster library, as zclSS_RegisterCmdCallbacks(GENERICAPP_ENDPOINT,&zclGenericApp_IASCmdCallbacks);

    (4) in ZStatus_t zclSS_ChangeNotificationCB(zclZoneChangeNotif_t *pCmd, afAddrType_t *srcAddr) definition, I simply want the LED toggle to show the function works HalLedSet(HAL_LED_3,HAL_LED_MODE_TOGGLE);

   I use the another device to send zclSS_IAS_Send_ZoneStatusChangeNotificationCmd(GENERICAPP_ENDPOINT,&BroadcastAddr,0x0000,0x00,0x01,0x0001,0x00,bdb_getZCLFrameCounter());

   It shows the message sends successfully in Ubiqua.

   But the LED does not toggle in the experiment.

   Do I miss some points in the callback program?

   Best Regards

      Xian Wang