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.

CC2652P7: SIMPLELINK-CC13X2-26X2-SDK: Commissioning a green power device through ZNP (8.31 SDK)

Part Number: CC2652P7
Other Parts Discussed in Thread: Z-STACK

Hi Ryan,

I want to implement Green Power Proxy on ZNP that running as Coordinator/Router. I checked one of the post that you mentioned it wasn't supported.
https://e2e.ti.com/support/wireless-connectivity/zigbee-thread-group/zigbee-and-thread/f/zigbee-thread-forum/1169690/simplelink-cc13x2-26x2-sdk-commissioning-a-green-power-device-through-znp-6-30-sdk/4402720
Is it supported in SDK 8.31? How can I implement it?

And the second question, I want to do network scan that reports the RSSI and Link quality for all channel before choosing which channel for commissioning. How can I do it with ZNP?

Thanks

Buong

  • Hi Buong,

    Here is the Z-Stack Monitor and Test API that I am going to be referencing.

    I unfortunately can confirm that adding GP functionality to the ZNP was not addressed by the Z-Stack R&D Team.  There is no timeline for resolution of this gap.  I can directly copy the necessary <sdk_install_directory>\source\ti\zstack\stack\zcl files into a new Common/zcl workspace folder to resolve the build errors when DISABLE_GREENPOWER_BASIC_PROXY is removed, and MT_GP_CB_FUNC is already added to Stack/Config/znp_cnf.opts, but I have not tested this build in any way.

    For RSSI and Link quality you can use MAC_SCAN_REQ of type ENERGY_DETECT, where the energy detect return value in MAC_SCAN_CNF should be equivalent to the following for each entry:

    ed = lqi = (255 * (rssiDbm + 90)) / (-20 + 90);

    You will need to define MT_MAC_FUNC and MT_MAC_CB_FUNC in znp_cnf.opts to access these MT commands and responses.

    Regards,
    Ryan

  • Hi Ryan,

    Thank for your quick reply.

    For the GP functionality, I have an idea that I develop all application clusters inlcude GPP (just like zc_ota_server example) on CC26xx itself and enable needed MT commands to receive/send command host (ESP32). Do you think this approach is good to go?

    For MAC_SCAN_REQ, when I add MT_MAC_FUNC and MT_MAC_CB_FUNC, there are 2 errors:
    1. Undefined function: DMMGR_SaveMacCbReg( 0xFFFF) in ./Application/mt/mt_util.c For this error I change it to _macCallbackSub = 0xFFFF;

    2. Undefined macro: MAC_CHAN_END in #define MT_MAC_ED_SCAN_MAXCHANNELS      MAC_CHAN_END + 1 For this error I define MAC_CHAN_END=26

    I'm not sure the change of 1st error works. But after that, project compilation success. I suppose when the scan done, it will call 

    nwk_MTCallbackSubNwkScanCnf that returns value to host. I search  this function in .map file but it's not there.
    I dont receive any MAC_SCAN_CNF after MAC_SCAN_REQ. Here is my MT command:
    [14:28:12.078] SENT: TX: FE 13 22 0C 00 F8 FF 07 00 04 00 10 00 00 00 00 00 00 00 00 00 00 00 29

    [14:28:12.091] RECV: RX: FE 01 62 0C 00 6F

    Regards,

    Buong

  • Writing GP application cluster functionality is counter-intuitive to the ZNP project operation which assumes the Zigbee application is executed by the host in a two-chip design.  If you want to have the Zigbee application on the CC26XX as well as MT interface with an external component then you can add the MT Interface to an existing ZC or ZR ZCL application project (note that this would be either role, but not selecting between both).

    I should have prefaced that the MT_MAC* definitions are deprecated and that support is not maintained.  I apologize for forgetting to inform you about the build errors, but you have handled them properly.  In order to get the MAC_SCAN_CNF I had to add nwk_MTCallbackSubNwkScanCnf to the end of the MAC_MLME_SCAN_CNF event statement in the MAC_CbackEvent function of the zmac_cb.c file.  I cannot comment however as to whether this is an effective solution to meet your needs.

    nwk_MTCallbackSubNwkScanCnf ((void *)pData);

    Just for your information, when a Zigbee Coordinator or Router is commissioned it will automatically perform an energy scan on all channels enabled within its channel mask and select the best channel to form a network based on the energy detect values returned.  This automation is why the MAC scan layer is not easily accessible on the Zigbee application. 

    If lucrative for your end product then you could also consider using a dual image solution, ex. rfDiagnostics + ZNP, to evaluate the channels on a lower radio level using rfDiagnostics before restarting the device in ZNP mode to configure your Zigbee network.  This would however require more dedicated development to achieve.

    Regards,
    Ryan

  • Hi Ryan,

    Thank you for your help.
    Now I'm able to get ScanCnf on the host.

    Regards,

    Buong