CC2652RB: How to add ZED Motion Sensor into TI ZNP Linux Gateway

Part Number: CC2652RB
Other Parts Discussed in Thread: Z-STACK, SIMPLELINK-CC13X2-26X2-SDK

Dear,

Do I can add 3rd party ZED Motion Sensor into Linux Gateway network from Zero Project example ?

If yes, Could you please send me some instruction ?

Thanks,

Khai.

  • For Linux Gateway network from Zero Project, you only need to enable permit join and you should read user manual of 3rd party ZED Motion Sensor to know how to make this 3rd party ZED Motion Sensor factory reset to join Zigbee network.

  • I assume you have referred to the Gateway SLA.  Please see this Similar topic.  I recommend you confirm operation with the default examples before adding functionality for your motion sensor.

    Regards,
    Ryan

  • Dear Ryan, Chen,

    1. I already tried Gateway SLA. Project worked with ti znp and zed_light.

    2. mMy 3rd zed sensor already went to reset mode but TI gateway can not detect device. I assume 3rd zed have different channel, I'm trying check their channel.

    3. I will follow Similar topic as your refer.

    Thanks,

    Khai.

  • I would suggest you to setup sniffer to check what happens over the air.

  • Dear Chen,

    I will setup sniffer follow this instruction : Packet Sniffer. But I saw it support only CC2652, my TI chip is CC2652RB, Can sniffer_fw_15_4.hex firmware work on CC2652RB_LP ?

  • Dear Ryan, Chen,

    I already setup wireshark and Smart RFSniffer 2 follow Packet Sniffer, but I can not get package data from ZED device. I use CC2652RB_LP as sniffer hw tools.

    I update info : I already set 3rd temperature zed device goto reset mode. TI Linux gateway discovered and connected with temperature zed successfully. So I make sure wireshark tool can not get package data from zed device.

    Thanks,

    Khai.

  • Which Wireshark version do you use?

  • It's version 3.4.5 

  • Thanks Chen,

    Sniffer tools work with wireshark 3.0.0.

  • Dear Ryan,

    Follow your refer topic, I did not understand clearly what I need to do :

    1. Link processors.wiki.ti.com/.../Fire_Alarm_System goto Z-Stack project of resource explorer so I didn't what I need to refer. Could you please send me other link.

    2. About your comment from 3 year ago :  ZNP and gateway resources do not automatically support IAS Zone devices. This is something you will have to include using the ZCL v6 specifications and Fire Alarm examples as a guide" => I found gateway linux didn't support IAS Zone devices, how about ZNP ? Don't It still support same 3 year ago ?

    Thanks,

    Khai.

  • Try to refer to https://sunmaysky.blogspot.com/2020/05/how-zigbee-cie-and-ias-device-work.html which shows you what ZC should handle or process when an IAS zone device joins.

  • The Wiki has been deprecated as of December 2020, but YK has provided his blog post and there are IAS Zone examples provided in the SIMPLELINK-CC13X2-26X2-SDK which you can reference for the necessary Zigbee clusters and attributes.  The LINUX-SENSOR-TO-CLOUD gateway solution has not been updated to support IAS devices.

    Regards,
    Ryan

  • Dear Chen, Ryan,

    I don't check source code yet but I found ZNP device cluster below :

    APP/MAIN] PKTBODY: cmdId = NWK_GET_LOCAL_DEVICE_INFO_CNF
    [09:52:26.373,536] [SMPLAPP/MAIN] PKTBODY: deviceInfoList :
    [09:52:26.373,578] [SMPLAPP/MAIN] PKTBODY: networkAddress = 0x00000000 (0)
    [09:52:26.373,623] [SMPLAPP/MAIN] PKTBODY: ieeeAddress = 00:12:4B:00:14:F5:45:26
    [09:52:26.373,666] [SMPLAPP/MAIN] PKTBODY: manufacturerId = 0x00000007 (7)
    [09:52:26.373,705] [SMPLAPP/MAIN] PKTBODY: simpleDescList :
    [09:52:26.373,742] [SMPLAPP/MAIN] PKTBODY: [000] :
    [09:52:26.373,780] [SMPLAPP/MAIN] PKTBODY: endpointId = 0x00000004 (4)
    [09:52:26.373,821] [SMPLAPP/MAIN] PKTBODY: profileId = 0x00000104 (260)
    [09:52:26.373,862] [SMPLAPP/MAIN] PKTBODY: deviceId = 0x00000007 (7)
    [09:52:26.373,901] [SMPLAPP/MAIN] PKTBODY: deviceVer = 0x00000000 (0)
    [09:52:26.373,940] [SMPLAPP/MAIN] PKTBODY: inputClusters :
    [09:52:26.373,978] [SMPLAPP/MAIN] PKTBODY: [000] = 0x00000000 (0)
    [09:52:26.374,017] [SMPLAPP/MAIN] PKTBODY: [001] = 0x00000003 (3)
    [09:52:26.374,055] [SMPLAPP/MAIN] PKTBODY: [002] = 0x00000501 (1281)
    [09:52:26.374,094] [SMPLAPP/MAIN] PKTBODY: outputClusters :
    [09:52:26.374,131] [SMPLAPP/MAIN] PKTBODY: [000] = 0x00000006 (6)
    [09:52:26.374,169] [SMPLAPP/MAIN] PKTBODY: [001] = 0x00000004 (4)
    [09:52:26.374,206] [SMPLAPP/MAIN] PKTBODY: [002] = 0x00000005 (5)
    [09:52:26.374,334] [SMPLAPP/MAIN] PKTBODY: [003] = 0x00000500 (1280)
    [09:52:26.374,375] [SMPLAPP/MAIN] PKTBODY: [004] = 0x00000009 (9)
    [09:52:26.374,415] [SMPLAPP/MAIN] PKTBODY: [005] = 0x00000101 (257)
    [09:52:26.374,453] [SMPLAPP/MAIN] PKTBODY: [006] = 0x00000020 (32)
    [09:52:26.374,492] [SMPLAPP/MAIN] PKTBODY: [001] :
    [09:52:26.374,529] [SMPLAPP/MAIN] PKTBODY: endpointId = 0x000000F2 (242)
    [09:52:26.374,570] [SMPLAPP/MAIN] PKTBODY: profileId = 0x0000A1E0 (41440)
    [09:52:26.374,609] [SMPLAPP/MAIN] PKTBODY: deviceId = 0x00000061 (97)
    [09:52:26.374,650] [SMPLAPP/MAIN] PKTBODY: deviceVer = 0x00000000 (0)
    [09:52:26.374,690] [SMPLAPP/MAIN] PKTBODY: outputClusters :
    [09:52:26.374,728] [SMPLAPP/MAIN] PKTBODY: [000] = 0x00000021 (33)
    [09:52:26.374,770] [SMPLAPP/MAIN] PKTBODY: deviceStatus = DEVICE_ON_LINE

    Cluster 0x501 & 0x500 is IAS ACE and IAS ZONE, so it mean new ZNP source already support IAS ZONE, do I understand correctly ?

    Thanks,

    Khai.

  • ZNP doesn't support ZCL part. ZCL is implemented on ZNP host instead of ZNP itself.

  • Dear Chen, Ryan,

    Linux Gateway application already connect to 3rd temperature sensor and door sensor as picture below :

    I have some question :

    1. After connecting to temperature sensor, temperature will report temperature value each 5 minutes => I checked and didn't see any setup for this feature so it is default feature of ZED ?

    2. When door sensor on/off, door sensor zed reported to gateway success but I didn't see linux gateway application received any report package => Do I miss something ? why gateway can auto receive report from temperature sensor but can not receive report from door sensor ?

    Thanks,

    Khai.

  • 1. If you don't so report configuration from gateway, it might be default value of your ZED. You should check user manual of your 3rd party device.

    2. Do you add CIE support in your Linux GW? If not, your GW might not be able to receive IAS zone state notification/report.

  • Dear Chen,

    Thank for your reply.

    Do you add CIE support in your Linux GW? If not, your GW might not be able to receive IAS zone state notification/report => But GW can receive report from temperature ZED, what's different between 2 report type ?

    Thanks,

    Khai.

  • As I know, TI Z-Stack Linux GW implements ZCL temperature cluster support by default so you can see temperature sensor work by default. However, CIE is not implemented by Z-Stack Linux GW reference design so you have to add it by yourself.

  • "TI Z-Stack Linux GW implements ZCL temperature cluster support by default" => Was This feature be implemented at Linux GW Application or ZNP CC2652RB ?

    When I check sniffer tool, ZNP CC2652RB can receive report package from door sensor (as picture I sent) but GW application don't receive any package from ZNP CC2652RP, I think package was filtered by ZNP CC2652RP. Do I understand correctly ?

  • I had replied you ZCL is implemented on Host instead of ZNP so the ZCL temperature cluster support is implemented on Linux GW application.

  • yes, I already remember your reply. thanks you.

  • Dear Chen,

    ZCL is implemented on Host instead of ZNP so the ZCL temperature cluster support is implemented on Linux GW application => I already print out raw message what ZNP send to GW application. I didn't see any raw package when ZED send report attribute, so I make sure ZNP didn't forward report package to GW application.

    When 3rd ZED door sensor send report attribute to GW, I didn't see APS package return from GW (picture below), I guess that why GW App can receive report attribute package => Do I miss something ?

    Do you can show me ZNP functions where handling package from ZED (Ex : response APS ack to ZED, or filter package from ZED).

    Thanks,

    Khai.

  • I would suggest you to use sniffer to check the process of temperature sensor joining process and how it report temperature instead of checking ZNP raw message.

  • In the ZNP firmware, once an endpoint has been registered locally then an application will be notified of any received data as an AF Incoming Data Indication through an OsalPort message. You can check MT_ProcessIncomingCommand -> case AF_INCOMING_MSG_CMD -> MT_AfIncomingMsg.  The host gateway application example only handles incoming temperature measurement reports by default in zb-gateway.js:

       // #################### Device Report - Incoming Report ####################################
      .on('hagateway:gw:report', function(data){
        // read incoming report based on what its ClusterID is
        switch(data.clusterId){
          // incoming temperature measurement
          case ZBL.HA_CLUSTER_ID.TEMPERATURE_MEASUREMENT:     
            if( (data.attributeRecordList[0].attributeId === ZBL.TEMPERATURE_MEASUREMENT_CLUSTER.MeasuredValue) && (data.attributeRecordList[0].attributeType === ZBL.DATA_TYPE.INT16)) {
              var raw_temp = data.attributeRecordList[0].attributeValue;
              raw_temp_string = reverse(raw_temp).toString('hex');
              raw_temp_int = parseInt(raw_temp_string, 16);
              var temp = raw_temp_int / 100;   
              console.log("Zb-Gateway: The temp is: ", temp);  
    
              var temp_data = {
                guid: data.guid,
                temp: temp
              };
    
              ZigbeeGatewayInstance.emit('zb-gateway:temp_device:temp', temp_data);
            }
          break;   
          
        }
      })

    Regards,
    Ryan