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.

MT_MAC_FUNC & MT_ZDO_FUNC Conflict

I've been using MT commands to control a Zigbee network.  I use MT_ZDO commands to perform device/endpoint/cluster discovery.  Now my customer wants to do additional functions that need MAC commands... but when I turned on the MT_MAC_FUNC compile switch, I got a #error: "MT_MAC functionality should be disabled on ZDO devices".

Why is this?  This is a serious impediment, and I can't see any fundamental reason why it should be so.

I commented out the #error and added MT_MAC.c and MT_MAC.h to the build.  The build completed successfully, and some of the things I've tried have worked.  But I don't reckon that the ZStack designers put that #error in there just for the fun of it.  Does anyone know what the issue is?  Is there some subset of MAC/ZDO functionality that can safely co-exist?

 

  • Hi, I'm wondering the message in ZDApp.c, too.

    ----
    #if defined( MT_MAC_FUNC ) || defined( MT_MAC_CB_FUNC )
      #error "ERROR! MT_MAC functionalities should be disabled on ZDO devices"
    #endif
    ----

    As I commented it out and checked, it seems no side-effect if only MT_MAC_FUNC added.

    If both MT_MAC_FUNC and MT_MAC_CB_FUNC added, the Coordinator didn't start as usual.
    DeviceState=0x08 (Starting as ZigBee Coordinator)

    If only MT_MAC_FUNC added, the Coordinator started.
    DeviceState=0x09 (Started as ZigBee Coordinator)

    I want to know it's OK or not...

     

  • Hi Guys,

    Dint any of you get linker errors when building for

    #define MT_TASK
    #define ZTOOL_P1
    #define MT_SYS_FUNC
    #define MT_UTIL_FUNC
    #define MT_NWK_FUNC
    #define MT_NWK_CB_FUNC
    #define MT_AF_FUNC
    #define MT_AF_CB_FUNC
    #define MT_APP_FUNC
    #define MT_ZDO_FUNC
    #define MT_ZDO_CB_FUNC

    #define MT_MAC_FUNC
    #define MT_MAC_CB_FUNC
    #define MT_AF_FUNC
    #define MT_AF_CB_FUNC

    Ive included the routermtpro.a lib and am getting the following errors

       IAR ELF Linker V5.50.0.51878/W32 for ARM
       Copyright (C) 2007-2010 IAR Systems AB.
    Error[Li005]: no definition for 
    "nwk_MTCallbackSubNwkAssociateInd" [referenced from D:\
    MorfModuleTestsA\iar\boards\
    dk-lm3s9b96-em2-cc2520-zstack\zstack_collector\Debug\Obj\
    lib.o]
    Error[Li005]: no definition for 
    "nwk_MTCallbackSubNwkAssociateCnf" [referenced from D:\
    MorfModuleTestsA\iar\boards\
    dk-lm3s9b96-em2-cc2520-zstack\zstack_collector\Debug\Obj\
    lib.o]
    Error[Li005]: no definition for 
    "nwk_MTCallbackSubNwkDisassociateInd" [referenced from 
    D:\MorfModuleTestsA\iar\boards\
    dk-lm3s9b96-em2-cc2520-zstack\zstack_collector\Debug\Obj\
    lib.o]
    Error[Li005]: no definition for 
    "nwk_MTCallbackSubNwkDisassociateCnf" [referenced from 
    D:\MorfModuleTestsA\iar\boards\
    dk-lm3s9b96-em2-cc2520-zstack\zstack_collector\Debug\Obj\
    lib.o]
    Error[Li005]: no definition for 
    "nwk_MTCallbackSubNwkBeaconNotifyInd" [referenced from 
    D:\MorfModuleTestsA\iar\boards\
    dk-lm3s9b96-em2-cc2520-zstack\zstack_collector\Debug\Obj\
    lib.o]
    Error[Li005]: no definition for 
    "nwk_MTCallbackSubNwkOrphanInd" [referenced from D:\
    MorfModuleTestsA\iar\boards\
    dk-lm3s9b96-em2-cc2520-zstack\zstack_collector\Debug\Obj\
    lib.o]
    Error[Li005]: no definition for 
    "nwk_MTCallbackSubNwkScanCnf" [referenced from D:\
    MorfModuleTestsA\iar\boards\
    dk-lm3s9b96-em2-cc2520-zstack\zstack_collector\Debug\Obj\
    lib.o]
    Error[Li005]: no definition for 
    "nwk_MTCallbackSubNwkStartCnf" [referenced from D:\
    MorfModuleTestsA\iar\boards\
    dk-lm3s9b96-em2-cc2520-zstack\zstack_collector\Debug\Obj\
    lib.o]
    Error[Li005]: no definition for 
    "nwk_MTCallbackSubNwkSyncLossInd" [referenced from D:\
    MorfModuleTestsA\iar\boards\
    dk-lm3s9b96-em2-cc2520-zstack\zstack_collector\Debug\Obj\
    lib.o]
    Error[Li005]: no definition for 
    "nwk_MTCallbackSubNwkPollCnf" [referenced from D:\
    MorfModuleTestsA\iar\boards\
    dk-lm3s9b96-em2-cc2520-zstack\zstack_collector\Debug\Obj\
    lib.o]
    Error[Li005]: no definition for 
    "nwk_MTCallbackSubCommStatusInd" [referenced from D:\
    MorfModuleTestsA\iar\boards\
    dk-lm3s9b96-em2-cc2520-zstack\zstack_collector\Debug\Obj\
    lib.o]
    Error[Li005]: no definition for 
    "nwk_MTCallbackSubNwkDataCnf" [referenced from D:\
    MorfModuleTestsA\iar\boards\
    dk-lm3s9b96-em2-cc2520-zstack\zstack_collector\Debug\Obj\
    lib.o]
    Error[Li005]: no definition for 
    "nwk_MTCallbackSubNwkDataInd" [referenced from D:\
    MorfModuleTestsA\iar\boards\
    dk-lm3s9b96-em2-cc2520-zstack\zstack_collector\Debug\Obj\
    lib.o]
    Error[Li005]: no definition for 
    "nwk_MTCallbackSubNwkPurgeCnf" [referenced from D:\
    MorfModuleTestsA\iar\boards\
    dk-lm3s9b96-em2-cc2520-zstack\zstack_collector\Debug\Obj\
    lib.o]
    Error[Li005]: no definition for "_macCallbackSub" [referenced 
    from D:\MorfModuleTestsA\iar\boards\
    dk-lm3s9b96-em2-cc2520-zstack\zstack_collector\Debug\Obj\
    lib.o]
    Error[Li005]: no definition for "MT_MacCommandProcessing" 
    [referenced from D:\MorfModuleTestsA\iar\boards\
    dk-lm3s9b96-em2-cc2520-zstack\zstack_collector\Debug\Obj\
    lib.o]
     
      113 648 bytes of readonly  code memory
        6 239 bytes of readonly  data memory
       19 825 bytes of readwrite data memory
     
    Errors: 16
    Warnings: none
     
    Link time:   0.59 (CPU)   0.62 (elapsed)
    Error while running Linker
     
    Total number of errors: 16
    Total number of warnings: 122

    The respective header files are included 

     #ifdef MT_TASK
    #include "mt/DebugTrace.c"
    #include "mt/MT.c"
    #include "mt/MT_AF.c"
    #include "mt/MT_APP.c"
    #include "mt/MT_DEBUG.c"
    #include "mt/MT_NWK.c"
    #include "mt/MT_SYS.c"
    #include "mt/MT_TASK.c"
    #include "mt/MT_UART.c"
    #include "mt/MT_UTIL.c"
    #include "mt/MT_VERSION.c"
    #include "mt/MT_ZDO.c"
    #ifdef USE_SAPI
    #include "mt/MT_SAPI.c"
    #endif
    #endif

    When i do not compile with the MT_MAC_FUNC & MT_MAC_CB_FUNC with everything else same i get no errors??

    Did u guys build it in the same way??

     

  • Oops i forgot to include MT_MAC.c