Commit 2d0a05ab authored by limm's avatar limm

v2.0

parent 3169de12
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -670,11 +670,6 @@
<type>1</type>
<locationURI>STUDIO_SDK_LOC/protocol/zigbee/app/framework/util/time-util.c</locationURI>
</link>
<link>
<name>zcl-framework-core/util.c</name>
<type>1</type>
<locationURI>STUDIO_SDK_LOC/protocol/zigbee/app/framework/util/util.c</locationURI>
</link>
<link>
<name>zcl-framework-core/zdo-cli.c</name>
<type>1</type>
......
......@@ -39,6 +39,7 @@
<attribute side="server" code="0x100a" define="FanMode" type="ENUM8" min="0x00" max="0x09" writable="true" default="0x00" optional="true" >FanMode</attribute>
<attribute side="server" code="0x100b" define="OnOff" type="BOOLEAN" min="0x00" max="0x01" writable="true" default="0x00" optional="true" >OnOff</attribute>
<attribute side="server" code="0x100c" define="NoDisturbMode" type="BOOLEAN" min="0x00" max="0x01" writable="true" default="0x00" optional="true" >NoDisturbMode</attribute>
<attribute side="server" code="0x100d" define="RunMode" type="INT8U" min="0x00" max="0x03" writable="true" default="0x00" optional="true" >RunMode</attribute>
</cluster>
</configurator>
......@@ -4,6 +4,7 @@
#include "app/framework/include/af.h"
#include "././00ikonke-app/general/ikk-debug.h"
#include "./general/ikk-module-def.h"
#include <00ikonke-app/general/ikk-cluster.h>
#define BUILD_UINT16(lowByte, highByte) \
((uint16_t)(((lowByte) & 0x00FF) + (((highByte) & 0x00FF) << 8)))
......@@ -23,7 +24,7 @@
#define FCC0_ATTR_Fan_Mode 0X100A
#define FCC0_ATTR_ON_OFF 0X100B
#define FCC0_ATTR_No_Disturb_Mode 0X100C
#define FCC0_ATTR_No_Run_Mode 0X100D
......@@ -31,6 +32,9 @@
#define Device_Type_Floor_Heating 2
#define Device_Type_Fan 3
#define MAX_QUEUE_SIZE 15
static uint8_t invalidMaskEui64[8] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
EmberStatus Write_Attr(bool Report,uint8_t ep,uint16_t cluster,uint16_t attr, uint8_t* dataPtr,EmberAfAttributeType datatype);
......@@ -67,11 +71,21 @@ typedef struct
uint8_t mcu_hardware_version;
}DEVICVE_INFO_ST;
typedef struct {
ZclReportControlInfoSt sReport_Info[MAX_QUEUE_SIZE];
uint8_t index[MAX_QUEUE_SIZE] ;
uint64_t add_data_begain_time[MAX_QUEUE_SIZE];
}ZclReportControlSt;
extern DEVICVE_INFO_ST g_sDevice_Info;
uint8_t Read_Zigbee_Version(void);
kk_err_t PrivateClusterHandler(EmberAfClusterCommand* cmd);
void kGetBindConfigInfo(void);
void Reset_Binding_Token(void);
void Check_Queue(void);
boolean IS_Resend_Report_Data(uint16_t attribute_id,ZclReportControlInfoSt *Report_info);
/**********************common interface*******************************/
uint8_t Get_Device_Endpoint(void);
uint8_t Get_Binding_Device_EP(void);
......
......@@ -262,12 +262,12 @@ void ikkUartRecvLoopCheck(UMsgNodeSt *pNode, int waitto_ms )
{
if( emberSerialReadAvailable(g_uManagerInsc.port)) {
while(emberSerialReadByte(g_uManagerInsc.port, &data) == EMBER_SUCCESS ) {
iKonkeAfSelfPrint(">>>>>>1111Recv Data %x\r\n", data);
// iKonkeAfSelfPrint(">>>>>>1111Recv Data %x\r\n", data);
currentTime = halCommonGetInt64uMillisecondTick();
//add by maozj 20200602
//When the data header is detected, fix the problem that the data is too long to verify successfully
if (currentTime - lastTime >= UART_MAX_RECV_INTERVAL_TIMEOUT){
iKonkeAfSelfPrint(">>>>>>>>>>1111New data package\r\n");
// iKonkeAfSelfPrint(">>>>>>>>>>1111New data package\r\n");
recving = false;
}
lastTime = currentTime;
......
......@@ -161,28 +161,22 @@ bool emberAfPreCommandReceivedCallback(EmberAfClusterCommand* cmd )
/*begin add by maozj 20191127 add get gateway EUI64*/
EmberNodeId sender = emberGetSender();
// Gateway Eui64 address cache.
EmberEUI64 eui64GatewayAddr = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
EmberEUI64 tmpEui64 = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
EmberStatus status = emberGetSenderEui64(eui64GatewayAddr);
EmberEUI64 senderEui64 = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
EmberEUI64 invalidEui64 = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
EmberStatus status = emberGetSenderEui64(senderEui64);
// iKonkeAfSelfPrint("Get EUI64 PreCommand: status(0x%x)%X%X%X%X%X%X%X%X\r\n",status, eui64GatewayAddr[7], eui64GatewayAddr[6]
// , eui64GatewayAddr[5], eui64GatewayAddr[4], eui64GatewayAddr[3], eui64GatewayAddr[2]
// , eui64GatewayAddr[1], eui64GatewayAddr[0]);
iKonkeAfSelfPrint("####emberAfPreCommandReceivedCallback,dir(%d),mfgSpe(%d),id(%d),cluSpe(%d),####\r\n", cmd->direction, cmd->mfgSpecific, cmd->apsFrame->clusterId, cmd->clusterSpecific);
//source is gateway
if (sender == 0x0000){
kNwkGetGateWayEui64(eui64GatewayAddr);
//iKonkeAfSelfPrint("----xxx getEui64FromFlash %x%x%x%x%x%x%x%x --",g_Eui64GatewayAddr[7], g_Eui64GatewayAddr[6], \
// g_Eui64GatewayAddr[5], g_Eui64GatewayAddr[4], g_Eui64GatewayAddr[3], g_Eui64GatewayAddr[2], g_Eui64GatewayAddr[1],g_Eui64GatewayAddr[0]);
if(MEMCOMPARE(eui64GatewayAddr, tmpEui64, EUI64_SIZE)){
kNwkGetGateWayEui64(senderEui64);
if(MEMCOMPARE(senderEui64, invalidEui64, EUI64_SIZE)){
// iKonkeAfSelfPrint("Get EUI64 PreCommand is existed\r\n");
}else {
EmberStatus status = emberGetSenderEui64(eui64GatewayAddr);
EmberStatus status = emberGetSenderEui64(senderEui64);
if (status == EMBER_SUCCESS){
if(kUtilsIsValidEui64Addr(eui64GatewayAddr)) {
kNwkSetGateWayEui64(eui64GatewayAddr);
iKonkeAfSelfPrint("Get EUI64 PreCommand: %X%X%X%X%X%X%X%X\r\n", eui64GatewayAddr[7], eui64GatewayAddr[6]
, eui64GatewayAddr[5], eui64GatewayAddr[4], eui64GatewayAddr[3], eui64GatewayAddr[2]
, eui64GatewayAddr[1], eui64GatewayAddr[0]);
if(kUtilsIsValidEui64Addr(senderEui64)) {
kNwkSetGateWayEui64(senderEui64);
}
}else {
iKonkeAfSelfPrint("Get EUI64 failed\r\n");
......@@ -336,6 +330,7 @@ bool emberAfPreCommandReceivedCallback(EmberAfClusterCommand* cmd )
case (ZCL_ON_OFF_CLUSTER_ID):
{
ZclOnOffControlInfoSt ZclOnOffControlInfo;
if( (cmd->clusterSpecific) && (cmd->direction == (uint8_t)ZCL_DIRECTION_CLIENT_TO_SERVER) &&
(!cmd->mfgSpecific)) {
switch(cmd->commandId) {
......@@ -345,7 +340,13 @@ bool emberAfPreCommandReceivedCallback(EmberAfClusterCommand* cmd )
{
//add by maozj 20191224
if (g_pfSceneClusterRecallCallback){
g_pfSceneClusterRecallCallback(cmd->apsFrame->destinationEndpoint, cmd->apsFrame->clusterId, cmd->commandId, true, false, true, true, NULL);//restore immediately report
//KKK
ZclOnOffControlInfo.isMultiContorl = false;
ZclOnOffControlInfo.onOffValue = cmd->commandId;
ZclOnOffControlInfo.endpoint = cmd->apsFrame->destinationEndpoint;
ZclOnOffControlInfo.dest_endpoint = RESET_ENDPOINT;
MEMCOPY(ZclOnOffControlInfo.maskEui64Addr, invalidEui64, EUI64_SIZE);
g_pfSceneClusterRecallCallback(cmd->apsFrame->destinationEndpoint, cmd->apsFrame->clusterId, cmd->commandId, true, false, true, true, (ZclOnOffControlInfoSt*)&ZclOnOffControlInfo);//restore immediately report
}
break;
......@@ -398,17 +399,22 @@ bool emberAfPreCommandReceivedCallback(EmberAfClusterCommand* cmd )
{
case 0x00:
case 0x01:
{
emberAfWriteServerAttribute(cmd->apsFrame->destinationEndpoint,
ZCL_ON_OFF_CLUSTER_ID,
ZCL_ON_OFF_ATTRIBUTE_ID,
(uint8_t *)&onOffValue,
ZCL_BOOLEAN_ATTRIBUTE_TYPE);
}
break;
case 0x02:
{
// emberAfWriteServerAttribute(cmd->apsFrame->destinationEndpoint,
// ZCL_ON_OFF_CLUSTER_ID,
// ZCL_ON_OFF_ATTRIBUTE_ID,
// (uint8_t *)&onOffValue,
// ZCL_BOOLEAN_ATTRIBUTE_TYPE);
//KKK 记录当前 rcv ieee
ZclOnOffControlInfo.endpoint = cmd->apsFrame->destinationEndpoint;
ZclOnOffControlInfo.dest_endpoint = cmd->apsFrame->sourceEndpoint;
ZclOnOffControlInfo.isMultiContorl = true;
ZclOnOffControlInfo.onOffValue = onOffValue;
MEMCOPY(ZclOnOffControlInfo.maskEui64Addr, senderEui64, EUI64_SIZE);
g_pfSceneClusterRecallCallback(cmd->apsFrame->destinationEndpoint, cmd->apsFrame->clusterId, onOffValue, true, false, true, true, (ZclOnOffControlInfoSt*)&ZclOnOffControlInfo);//restore immediately report
break;
}
default:
break;
}
......@@ -1480,13 +1486,16 @@ bool kZclClusterGetPermitReportInfo(uint8_t endpoint, EmberAfClusterId cluster,
zclReportPermit->sceneRecallFlg = g_stZclClusterReportPermitTable.g_stZclReportPermitList[index].sceneRecallFlg;
zclReportPermit->reportGatewayEnable = g_stZclClusterReportPermitTable.g_stZclReportPermitList[index].reportGatewayEnable;
zclReportPermit->reportChildDeviceEnable = g_stZclClusterReportPermitTable.g_stZclReportPermitList[index].reportChildDeviceEnable;
//KKK
MEMCOPY(zclReportPermit->maskEui64Addr, g_stZclClusterReportPermitTable.g_stZclReportPermitList[index].maskEui64Addr, EUI64_SIZE);
zclReportPermit->dest_endpoint = g_stZclClusterReportPermitTable.g_stZclReportPermitList[index].dest_endpoint;
return true;
}
return false;
}
//permit info set
bool kZclClusterSetPermitReportInfo(uint8_t endpoint, EmberAfClusterId cluster, bool reportEnable, bool sceneRecallFlg, bool reportGatewayEnable, bool reportChildDeviceEnable)
bool kZclClusterSetPermitReportInfo(uint8_t endpoint, EmberAfClusterId cluster, bool reportEnable, bool sceneRecallFlg, bool reportGatewayEnable, bool reportChildDeviceEnable, uint8_t *maskEui64Addr,uint8_t dest_endpoint)
{
bool ret = false;
......@@ -1503,6 +1512,12 @@ bool kZclClusterSetPermitReportInfo(uint8_t endpoint, EmberAfClusterId cluster,
g_stZclClusterReportPermitTable.g_stZclReportPermitList[index].sceneRecallFlg = sceneRecallFlg;
g_stZclClusterReportPermitTable.g_stZclReportPermitList[index].reportGatewayEnable = reportGatewayEnable;
g_stZclClusterReportPermitTable.g_stZclReportPermitList[index].reportChildDeviceEnable = reportChildDeviceEnable;
if (maskEui64Addr != NULL){
MEMCOPY(g_stZclClusterReportPermitTable.g_stZclReportPermitList[index].maskEui64Addr, maskEui64Addr, EUI64_SIZE);
} else {
MEMSET(g_stZclClusterReportPermitTable.g_stZclReportPermitList[index].maskEui64Addr, 0xFF, EUI64_SIZE);
}
g_stZclClusterReportPermitTable.g_stZclReportPermitList[index].dest_endpoint = dest_endpoint;
ret = true;
}
}else { //广播
......@@ -1514,6 +1529,12 @@ bool kZclClusterSetPermitReportInfo(uint8_t endpoint, EmberAfClusterId cluster,
g_stZclClusterReportPermitTable.g_stZclReportPermitList[index].sceneRecallFlg = sceneRecallFlg;
g_stZclClusterReportPermitTable.g_stZclReportPermitList[index].reportGatewayEnable = reportGatewayEnable;
g_stZclClusterReportPermitTable.g_stZclReportPermitList[index].reportChildDeviceEnable = reportChildDeviceEnable;
if (maskEui64Addr != NULL){
MEMCOPY(g_stZclClusterReportPermitTable.g_stZclReportPermitList[index].maskEui64Addr, maskEui64Addr, EUI64_SIZE);
} else {
MEMSET(g_stZclClusterReportPermitTable.g_stZclReportPermitList[index].maskEui64Addr, 0xFF, EUI64_SIZE);
}
g_stZclClusterReportPermitTable.g_stZclReportPermitList[index].dest_endpoint = dest_endpoint;
ret = true;
}
}
......
......@@ -11,6 +11,7 @@
#include "kkAllInOneFloorHeatingMG21SDK665V1.h"
#define DEFAULT_TRANSITION_TIME_S (3)
#define RESET_ENDPOINT 0xFE
// sleepy device poll procedule control manager
typedef struct tag_poll_control_manager {
......@@ -27,6 +28,9 @@ typedef struct tag_zcl_report_table{
bool sceneRecallFlg;
bool reportGatewayEnable;
bool reportChildDeviceEnable;
EmberEUI64 maskEui64Addr;
uint8_t dest_endpoint;
}ZclReportTableSt;
typedef struct {
......@@ -37,7 +41,16 @@ typedef struct {
bool isMultiContorl; //whether multi-control, used to judge whether send response or multi-control
bool isSendResponse;
}ZclLevelControlInfoSt;
typedef struct {
uint8_t endpoint;
uint8_t onOffValue;
uint16_t cluster;
uint16_t attribute;
bool isMultiContorl; //whether multi-control, used to judge whether send response or multi-control
bool isSendResponse;
EmberEUI64 maskEui64Addr;
uint8_t dest_endpoint;
}ZclReportControlInfoSt;
typedef enum{ EOOC_OFF = 0, EOOC_ON, EOOC_TOGGLE, EOOC_UNKNOW }OnOffCtrlEnum;
typedef enum{ EOOS_OFF = 0, EOOS_ON, EOOS_UNKNOW }OnOffStatusEnum;
......@@ -146,8 +159,7 @@ void kZclClusterPermitReportTableInit(BindObjSt clusterBindList[], uint8_t size)
bool kZclClusterGetPermitReportInfo(uint8_t endpoint, EmberAfClusterId cluster, ZclReportTableSt *zclReportPermit);
bool kZclClusterSetPermitReportInfo(uint8_t endpoint, EmberAfClusterId cluster, bool reportEnable, bool sceneRecallFlg
, bool reportGatewayEnable, bool reportChildDeviceEnable);
bool kZclClusterSetPermitReportInfo(uint8_t endpoint, EmberAfClusterId cluster, bool reportEnable, bool sceneRecallFlg, bool reportGatewayEnable, bool reportChildDeviceEnable, uint8_t *maskEui64Addr,uint8_t dest_endpoint);
#if 0
/* DESP: Send different data separately according to whether or not to bind multiple controllers
* Auth: maozj.20200511.
......
......@@ -25,6 +25,7 @@ uint8_t g_tmp_buffer[OPTTUNNEL_CHUNK_MAXLEN+1] = { 0 }, g_tmp_length = 0;
EmberEventControl kOptTunnelMtoRRDelayRspEventControl;
static uint8_t ucReceived_Many_To_One_Cmd = 0;
EmberAfStatus emAfReadOrWriteAttribute(EmberAfAttributeSearchRecord *attRecord,
EmberAfAttributeMetadata **metadata,
uint8_t *buffer,
......@@ -358,7 +359,11 @@ void kOptTunnelMtoRRDelayRspEventHandler(void )
emberEventControlSetInactive(kOptTunnelMtoRRDelayRspEventControl);
iKonkeAfSelfPrint("####### MtoO report time(%llu)\r\n", halCommonGetInt64uMillisecondTick());
//Prevent interference when reading CMEI Or ISN Or installation code, resulting in error report
if(ucReceived_Many_To_One_Cmd == 1)
{
ucReceived_Many_To_One_Cmd = 0;
kOptTunnelCommonReport(ECA_OPTDATA);
}
emberEventControlSetInactive(kOptTunnelMtoRRDelayRspEventControl);
}
......@@ -372,6 +377,7 @@ void kOptTunnelMessageResponse(OptMethodEm method, uint16_t attribute_id, EmberA
// command ack.
iKonkeAfSelfPrint("kOptTunnelMessageResponse ->>1 method(%d), attr(%2x), status(%d) length(%d) rspLenth(%d)\r\n",\
method, attribute_id, status, length, appResponseLength);
if( method == EOM_READ ) {
emberAfPutInt8uInResp(ZCL_READ_ATTRIBUTES_RESPONSE_COMMAND_ID );
}else {
......@@ -466,6 +472,7 @@ kk_err_t kOptTunnelMessageIncoming(OptMethodEm method, uint16_t attribute_id, ui
//kOptTunnelAttrChunkLocalWrite(attribute_id, (uint8_t *)&rand_value, sizeof(uint16_t));
emberEventControlSetDelayMS(kOptTunnelMtoRRDelayRspEventControl, rand_value);
ucReceived_Many_To_One_Cmd = 1;
iKonkeAfSelfPrint("$$$$$$$$$$$$$ RSP-RANDOM: pay(%d, %d), %d\r\n", payload[0], payload[1], rand_value);
break;
}
......
......@@ -96,6 +96,7 @@ typedef struct
uint8_t no_disturb_mode; //勿扰模式
uint8_t air_brand; //空调品牌
uint8_t air_type; //空调类型
uint8_t operate_mode; //风机盘管模式
}__attribute__((packed))AIR_ATTR_ST;
typedef struct
{
......
......@@ -43,22 +43,24 @@ efr32~family[M]~series[2]~device_configuration[1]~performance[A]~radio[020]~flas
on
}
{setupId:debugConfiguration
off
on
area name off
appSerial=1
compile,DEBUG
compile,EMBER_AF_PLUGIN_NVM3
compile,EMBER_AF_PLUGIN_REPORTING
compile,EMBER_AF_PLUGIN_UPDATE_TC_LINK_KEY
compile,EMBER_AF_PLUGIN_ZIGBEE_PRO_LIBRARY
compile,ON_OFF_CLUSTER
compile,SCENES_CLUSTER
compile,ZDO
enable,DEBUG
enable,EMBER_AF_PLUGIN_NVM3
enable,EMBER_AF_PLUGIN_REPORTING
enable,EMBER_AF_PLUGIN_UPDATE_TC_LINK_KEY
enable,EMBER_AF_PLUGIN_ZIGBEE_PRO_LIBRARY
enable,ON_OFF_CLUSTER
enable,SCENES_CLUSTER
disable,ZDO
}
{setupId:eventConfiguration
ikkUartRecvLoopCheckEventControl,ikkUartRecvLoopCheckEventHandler
......@@ -78,6 +80,7 @@ kDelayClearSequenceEventControl,kDelayClearSequenceEventHandler
ikkGetBindInfoEventControl,ikkGetBindInfoEventHandler
ikkDelayRebootEventControl,ikkDelayRebootEventHandler
kDelayClearFlagEventControl,kDelayClearFlagEventHandler
ikkReportInfoCheckEventControl,ikkReportInfoCheckEventHandler
}
{setupId:halOptions
}
......@@ -140,6 +143,20 @@ beginAttrList:OPTIONAL
cl:0xFCC0, at:0x100A, di:server, mf:0x0000
cl:0xFCC0, at:0x100B, di:server, mf:0x0000
cl:0xFCC0, at:0x100C, di:server, mf:0x0000
cl:0xFCC0, at:0x1000, di:server, mf:0x0000
cl:0xFCC0, at:0x1001, di:server, mf:0x0000
cl:0xFCC0, at:0x1002, di:server, mf:0x0000
cl:0xFCC0, at:0x1003, di:server, mf:0x0000
cl:0xFCC0, at:0x1004, di:server, mf:0x0000
cl:0xFCC0, at:0x1005, di:server, mf:0x0000
cl:0xFCC0, at:0x1006, di:server, mf:0x0000
cl:0xFCC0, at:0x1007, di:server, mf:0x0000
cl:0xFCC0, at:0x1008, di:server, mf:0x0000
cl:0xFCC0, at:0x1009, di:server, mf:0x0000
cl:0xFCC0, at:0x100A, di:server, mf:0x0000
cl:0xFCC0, at:0x100B, di:server, mf:0x0000
cl:0xFCC0, at:0x100C, di:server, mf:0x0000
cl:0xFCC0, at:0x100D, di:server, mf:0x0000
endAttrList:OPTIONAL
beginAttrList:SAVED_TO_FLASH
cl:0x0006, at:0x0000, di:server, mf:0x0000
......@@ -153,23 +170,31 @@ beginAttrList:REPORTABLE
cl:0xFCC0, at:0x1000, di:server, mf:0x0000
cl:0xFCC0, at:0x1001, di:server, mf:0x0000
cl:0xFCC0, at:0x1002, di:server, mf:0x0000
cl:0xFCC0, at:0x1003, di:server, mf:0x0000
cl:0xFCC0, at:0x1004, di:server, mf:0x0000
cl:0xFCC0, at:0x1005, di:server, mf:0x0000
cl:0xFCC0, at:0x1006, di:server, mf:0x0000
cl:0xFCC0, at:0x1007, di:server, mf:0x0000
cl:0xFCC0, at:0x1008, di:server, mf:0x0000
cl:0xFCC0, at:0x1009, di:server, mf:0x0000
cl:0xFCC0, at:0x100A, di:server, mf:0x0000
cl:0xFCC0, at:0x100B, di:server, mf:0x0000
cl:0xFCC0, at:0x100C, di:server, mf:0x0000
cl:0xFCC0, at:0x1000, di:server, mf:0x0000
cl:0xFCC0, at:0x1001, di:server, mf:0x0000
cl:0xFCC0, at:0x1002, di:server, mf:0x0000
cl:0xFCC0, at:0x1004, di:server, mf:0x0000
cl:0xFCC0, at:0x1006, di:server, mf:0x0000
cl:0xFCC0, at:0x1008, di:server, mf:0x0000
cl:0xFCC0, at:0x100A, di:server, mf:0x0000
cl:0xFCC0, at:0x100B, di:server, mf:0x0000
cl:0xFCC0, at:0x100C, di:server, mf:0x0000
cl:0xFCC0, at:0x1005, di:server, mf:0x0000
cl:0xFCC0, at:0x1009, di:server, mf:0x0000
cl:0xFCC0, at:0x1007, di:server, mf:0x0000
endAttrList:REPORTABLE
beginAttributeDefaults
cl:0x0000, at:0x0001, di:server, mf:0x0000 => 0x14
cl:0x0000, at:0x0001, di:server, mf:0x0000 => 0x21
cl:0x0000, at:0x0003, di:server, mf:0x0000 => 0x10
cl:0x0000, at:0x0004, di:server, mf:0x0000 => Konke
cl:0x0000, at:0x0005, di:server, mf:0x0000 => 3AFE101003008611
cl:0x0000, at:0x0006, di:server, mf:0x0000 => 20201126
cl:0x0000, at:0x0005, di:server, mf:0x0000 => 3AFE211003008611
cl:0x0000, at:0x0006, di:server, mf:0x0000 => 20210309
cl:0x0000, at:0x0007, di:server, mf:0x0000 => 0x01
cl:0x0000, at:0x0000, di:server, mf:0x0000 => 0x01
cl:0x0000, at:0x0002, di:server, mf:0x0000 => 0x01
......@@ -184,6 +209,20 @@ cl:0x0201, at:0x001E, di:server, mf:0x0000 => 1,0:0
cl:0x0402, at:0x0000, di:server, mf:0x0000 => 1,0:0
cl:0x0202, at:0x0000, di:server, mf:0x0000 => 1,0:0
cl:0x0201, at:0x0010, di:server, mf:0x0000 => 1,0:0
cl:0xFCC0, at:0x1000, di:server, mf:0x0000 => 1,0:0
cl:0xFCC0, at:0x1001, di:server, mf:0x0000 => 1,0:0
cl:0xFCC0, at:0x1002, di:server, mf:0x0000 => 1,0:0
cl:0xFCC0, at:0x1003, di:server, mf:0x0000 => 1,0:0
cl:0xFCC0, at:0x1004, di:server, mf:0x0000 => 1,0:0
cl:0xFCC0, at:0x1005, di:server, mf:0x0000 => 1,0:0
cl:0xFCC0, at:0x1006, di:server, mf:0x0000 => 1,0:0
cl:0xFCC0, at:0x1007, di:server, mf:0x0000 => 1,0:0
cl:0xFCC0, at:0x1008, di:server, mf:0x0000 => 1,0:0
cl:0xFCC0, at:0x1009, di:server, mf:0x0000 => 1,0:0
cl:0xFCC0, at:0x100A, di:server, mf:0x0000 => 1,0:0
cl:0xFCC0, at:0x100B, di:server, mf:0x0000 => 1,0:0
cl:0xFCC0, at:0x100C, di:server, mf:0x0000 => 1,0:0
cl:0xFCC0, at:0x100D, di:server, mf:0x0000 => 1,0:0
endAttributeDefaultReportingConfig
configuredNetwork:*type:ZIGBEE_PRO, name:Primary
beginEndpointType:Primary
......@@ -803,9 +842,9 @@ AppPluginOption(efr32~family[M]~series[2]~device_configuration[1]~performance[A]
AppPluginOption(efr32~family[M]~series[2]~device_configuration[1]~performance[A]~radio[020]~flash[768K]~temp[I]~package[M]~pins[32]~!module+iar):EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_HARDWARE_VERSION,0x10
AppPluginOption(efr32~family[M]~series[2]~device_configuration[1]~performance[A]~radio[020]~flash[768K]~temp[I]~package[M]~pins[32]~!module+iar):EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_IMAGE_TYPE_ID,17061
AppPluginOption(efr32~family[M]~series[2]~device_configuration[1]~performance[A]~radio[020]~flash[768K]~temp[I]~package[M]~pins[32]~!module+iar):EMBER_AF_PLUGIN_NVM3_MAX_OBJECT_SIZE,254
AppPluginOption(efr32~family[M]~series[2]~device_configuration[1]~performance[A]~radio[020]~flash[768K]~temp[I]~package[M]~pins[32]~!module+iar):EMBER_AF_PLUGIN_REPORTING_TABLE_SIZE,62
AppPluginOption(efr32~family[M]~series[2]~device_configuration[1]~performance[A]~radio[020]~flash[768K]~temp[I]~package[M]~pins[32]~!module+iar):EMBER_AF_PLUGIN_NVM3_CACHE_SIZE,335
AppPluginOption(efr32~family[M]~series[2]~device_configuration[1]~performance[A]~radio[020]~flash[768K]~temp[I]~package[M]~pins[32]~!module+iar):EMBER_PACKET_BUFFER_COUNT,200
AppPluginOption(efr32~family[M]~series[2]~device_configuration[1]~performance[A]~radio[020]~flash[768K]~temp[I]~package[M]~pins[32]~!module+iar):EMBER_APS_UNICAST_MESSAGE_COUNT,64
AppPluginOption(efr32~family[M]~series[2]~device_configuration[1]~performance[A]~radio[020]~flash[768K]~temp[I]~package[M]~pins[32]~!module+iar):EMBER_BROADCAST_TABLE_SIZE,64
AppPluginOption(efr32~family[M]~series[2]~device_configuration[1]~performance[A]~radio[020]~flash[768K]~temp[I]~package[M]~pins[32]~!module+iar):EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_FIRMWARE_VERSION,0x14
AppPluginOption(efr32~family[M]~series[2]~device_configuration[1]~performance[A]~radio[020]~flash[768K]~temp[I]~package[M]~pins[32]~!module+iar):EMBER_AF_PLUGIN_REPORTING_TABLE_SIZE,62
AppPluginOption(efr32~family[M]~series[2]~device_configuration[1]~performance[A]~radio[020]~flash[768K]~temp[I]~package[M]~pins[32]~!module+iar):EMBER_AF_PLUGIN_NVM3_CACHE_SIZE,400
AppPluginOption(efr32~family[M]~series[2]~device_configuration[1]~performance[A]~radio[020]~flash[768K]~temp[I]~package[M]~pins[32]~!module+iar):EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_FIRMWARE_VERSION,0x21
......@@ -25,6 +25,7 @@
extern EmberEventControl emberAfPluginUpdateTcLinkKeyBeginTcLinkKeyUpdateEventControl; \
extern EmberEventControl ikkDelayRebootEventControl; \
extern EmberEventControl ikkGetBindInfoEventControl; \
extern EmberEventControl ikkReportInfoCheckEventControl; \
extern EmberEventControl ikkUartMsgDispatchEventControl; \
extern EmberEventControl ikkUartRecvLoopCheckEventControl; \
extern EmberEventControl ikkUartSentLoopCheckEventControl; \
......@@ -50,6 +51,7 @@
extern void emberAfPluginUpdateTcLinkKeyBeginTcLinkKeyUpdateEventHandler(void); \
extern void ikkDelayRebootEventHandler(void); \
extern void ikkGetBindInfoEventHandler(void); \
extern void ikkReportInfoCheckEventHandler(void); \
extern void ikkUartMsgDispatchEventHandler(void); \
extern void ikkUartRecvLoopCheckEventHandler(void); \
extern void ikkUartSentLoopCheckEventHandler(void); \
......@@ -98,6 +100,7 @@
{ &emberAfPluginUpdateTcLinkKeyBeginTcLinkKeyUpdateEventControl, emberAfPluginUpdateTcLinkKeyBeginTcLinkKeyUpdateEventHandler }, \
{ &ikkDelayRebootEventControl, ikkDelayRebootEventHandler }, \
{ &ikkGetBindInfoEventControl, ikkGetBindInfoEventHandler }, \
{ &ikkReportInfoCheckEventControl, ikkReportInfoCheckEventHandler }, \
{ &ikkUartMsgDispatchEventControl, ikkUartMsgDispatchEventHandler }, \
{ &ikkUartRecvLoopCheckEventControl, ikkUartRecvLoopCheckEventHandler }, \
{ &ikkUartSentLoopCheckEventControl, ikkUartSentLoopCheckEventHandler }, \
......@@ -132,6 +135,7 @@
"Update TC Link Key Plugin BeginTcLinkKeyUpdate", \
"Ikk delay reboot event control", \
"Ikk get bind info event control", \
"Event data", \
"Ikk uart msg dispatch event control", \
"Ikk uart recv loop check event control", \
"Ikk uart sent loop check event control", \
......
......@@ -16,6 +16,8 @@
EmberEventControl emberAfIdentifyClusterServerTickCallbackControl3; \
EmberEventControl emberAfOtaBootloadClusterClientTickCallbackControl3; \
extern EmberEventControl emberAfPluginFormAndJoinCleanupEventControl; \
extern EmberEventControl emberAfPluginGreenPowerClientChannelEventControl; \
extern EmberEventControl emberAfPluginGreenPowerClientExitCommissioningEventControl; \
extern EmberEventControl emberAfPluginNetworkSteeringFinishSteeringEventControl; \
extern EmberEventControl emberAfPluginOtaStorageSimpleEepromPageEraseEventControl; \
extern EmberEventControl emberAfPluginReportingTickEventControl; \
......@@ -39,6 +41,8 @@
extern EmberEventControl kUserJoinSucceedProcedureEventControl; \
extern EmberEventControl kkSystemSetUpEventControl; \
extern void emberAfPluginFormAndJoinCleanupEventHandler(void); \
extern void emberAfPluginGreenPowerClientChannelEventHandler(void); \
extern void emberAfPluginGreenPowerClientExitCommissioningEventHandler(void); \
extern void emberAfPluginNetworkSteeringFinishSteeringEventHandler(void); \
extern void emberAfPluginOtaStorageSimpleEepromPageEraseEventHandler(void); \
extern void emberAfPluginReportingTickEventHandler(void); \
......@@ -85,6 +89,8 @@
{ &emberAfIdentifyClusterServerTickCallbackControl3, emberAfIdentifyClusterServerTickCallbackWrapperFunction3 }, \
{ &emberAfOtaBootloadClusterClientTickCallbackControl3, emberAfOtaBootloadClusterClientTickCallbackWrapperFunction3 }, \
{ &emberAfPluginFormAndJoinCleanupEventControl, emberAfPluginFormAndJoinCleanupEventHandler }, \
{ &emberAfPluginGreenPowerClientChannelEventControl, emberAfPluginGreenPowerClientChannelEventHandler }, \
{ &emberAfPluginGreenPowerClientExitCommissioningEventControl, emberAfPluginGreenPowerClientExitCommissioningEventHandler }, \
{ &emberAfPluginNetworkSteeringFinishSteeringEventControl, emberAfPluginNetworkSteeringFinishSteeringEventHandler }, \
{ &emberAfPluginOtaStorageSimpleEepromPageEraseEventControl, emberAfPluginOtaStorageSimpleEepromPageEraseEventHandler }, \
{ &emberAfPluginReportingTickEventControl, emberAfPluginReportingTickEventHandler }, \
......@@ -117,6 +123,8 @@
"Identify Cluster Server EP 3", \
"Over the Air Bootloading Cluster Client EP 3", \
"Form and Join Library Plugin Cleanup", \
"Green Power Client Plugin Channel", \
"Green Power Client Plugin ExitCommissioning", \
"Network Steering Plugin FinishSteering", \
"OTA Simple Storage EEPROM Driver Plugin PageErase", \
"Reporting Plugin Tick", \
......
......@@ -4786,6 +4786,7 @@
#define ZCL_FanMode_ATTRIBUTE_ID 0x100A // Ver.: always
#define ZCL_OnOff_ATTRIBUTE_ID 0x100B // Ver.: always
#define ZCL_NoDisturbMode_ATTRIBUTE_ID 0x100C // Ver.: always
#define ZCL_RunMode_ATTRIBUTE_ID 0x100D // Ver.: always
#endif // SILABS_EMBER_AF_ATTRIBUTE_ID
......@@ -1389,35 +1389,6 @@ bool emberAfPluginReportingGetDefaultReportingConfigCallback(EmberAfPluginReport
return true;
}
/** @brief Pre Attribute Change
*
* This function is called by the application framework before it changes an
* attribute value. The value passed into this callback is the value to which
* the attribute is to be set by the framework. The application should return
* ::EMBER_ZCL_STATUS_SUCCESS to permit the change or any other ::EmberAfStatus
* to reject it.
*
* @param endpoint Ver.: always
* @param clusterId Ver.: always
* @param attributeId Ver.: always
* @param mask Ver.: always
* @param manufacturerCode Ver.: always
* @param type Ver.: always
* @param size Ver.: always
* @param value Ver.: always
*/
EmberAfStatus emberAfPreAttributeChangeCallback(uint8_t endpoint,
EmberAfClusterId clusterId,
EmberAfAttributeId attributeId,
uint8_t mask,
uint16_t manufacturerCode,
uint8_t type,
uint8_t size,
uint8_t* value)
{
return EMBER_ZCL_STATUS_SUCCESS;
}
/** @brief Pre Cli Send
*
* This function is called by the framework when it is about to pass a message
......
......@@ -90,14 +90,14 @@ def GBL():
def OTA():
if not '"%PROJECT_DIR%\..\\..\\..\\..\\..\\..\\SiliconLabs\\SimplicityStudio\\v4\\developer\\sdks\\gecko_sdk_suite\\v2.6\\protocol\\zigbee\\tool\\image-builder\\image-builder-windows.exe" --create "%TARGET_BPATH%.ota" --version 0x14 --manuf-id 0x1268 --image-type 17061 --tag-id 0x0000 --tag-file "%TARGET_BPATH%.gbl" --string "EBL kkAllInOneFloorHeatingMG21SDK665V1"':
if not '"%PROJECT_DIR%\..\\..\\..\\..\\..\\..\\SiliconLabs\\SimplicityStudio\\v4\\developer\\sdks\\gecko_sdk_suite\\v2.6\\protocol\\zigbee\\tool\\image-builder\\image-builder-windows.exe" --create "%TARGET_BPATH%.ota" --version 0x21 --manuf-id 0x1268 --image-type 17061 --tag-id 0x0000 --tag-file "%TARGET_BPATH%.gbl" --string "EBL kkAllInOneFloorHeatingMG21SDK665V1"':
sys.exit(0)
print (" ")
print ("This creates a ZigBee OTA file if the OTA Client Policy Plugin has been enabled.")
print ("It uses the parameters defined there. ")
print (" ")
# wine needed by postbuild script under studio for mac/linux
IMAGE_BUILDER = '"%PROJECT_DIR%\..\\..\\..\\..\\..\\..\\SiliconLabs\\SimplicityStudio\\v4\\developer\\sdks\\gecko_sdk_suite\\v2.6\\protocol\\zigbee\\tool\\image-builder\\image-builder-windows.exe" --create "%TARGET_BPATH%.ota" --version 0x14 --manuf-id 0x1268 --image-type 17061 --tag-id 0x0000 --tag-file "%TARGET_BPATH%.gbl" --string "EBL kkAllInOneFloorHeatingMG21SDK665V1"'.replace("\t", "\\t")
IMAGE_BUILDER = '"%PROJECT_DIR%\..\\..\\..\\..\\..\\..\\SiliconLabs\\SimplicityStudio\\v4\\developer\\sdks\\gecko_sdk_suite\\v2.6\\protocol\\zigbee\\tool\\image-builder\\image-builder-windows.exe" --create "%TARGET_BPATH%.ota" --version 0x21 --manuf-id 0x1268 --image-type 17061 --tag-id 0x0000 --tag-file "%TARGET_BPATH%.gbl" --string "EBL kkAllInOneFloorHeatingMG21SDK665V1"'.replace("\t", "\\t")
WINE_CMD = WINE.replace("cmd /C ","") if not "echo" in IMAGE_BUILDER else WINE
OTA_COMMAND = WINE_CMD + IMAGE_BUILDER
OTA_COMMAND = OTA_COMMAND.replace("%PROJECT_DIR%", PROJECT_DIR)
......
......@@ -90,14 +90,14 @@ def GBL():
def OTA():
if not '"%PROJECT_DIR%\..\\..\\..\\..\\..\\..\\SiliconLabs\\SimplicityStudio\\v4\\developer\\sdks\\gecko_sdk_suite\\v2.6\\protocol\\zigbee\\tool\\image-builder\\image-builder-windows.exe" --create "%TARGET_BPATH%.ota" --version 0x13 --manuf-id 0x1268 --image-type 17061 --tag-id 0x0000 --tag-file "%TARGET_BPATH%.gbl" --string "EBL kkAllInOneFloorHeatingMG21SDK665V1"':
if not '"%PROJECT_DIR%\..\\..\\..\\..\\..\\..\\SiliconLabs\\SimplicityStudio\\v4\\developer\\sdks\\gecko_sdk_suite\\v2.6\\protocol\\zigbee\\tool\\image-builder\\image-builder-windows.exe" --create "%TARGET_BPATH%.ota" --version 0x20 --manuf-id 0x1268 --image-type 17061 --tag-id 0x0000 --tag-file "%TARGET_BPATH%.gbl" --string "EBL kkAllInOneFloorHeatingMG21SDK665V1"':
sys.exit(0)
print (" ")
print ("This creates a ZigBee OTA file if the OTA Client Policy Plugin has been enabled.")
print ("It uses the parameters defined there. ")
print (" ")
# wine needed by postbuild script under studio for mac/linux
IMAGE_BUILDER = '"%PROJECT_DIR%\..\\..\\..\\..\\..\\..\\SiliconLabs\\SimplicityStudio\\v4\\developer\\sdks\\gecko_sdk_suite\\v2.6\\protocol\\zigbee\\tool\\image-builder\\image-builder-windows.exe" --create "%TARGET_BPATH%.ota" --version 0x13 --manuf-id 0x1268 --image-type 17061 --tag-id 0x0000 --tag-file "%TARGET_BPATH%.gbl" --string "EBL kkAllInOneFloorHeatingMG21SDK665V1"'.replace("\t", "\\t")
IMAGE_BUILDER = '"%PROJECT_DIR%\..\\..\\..\\..\\..\\..\\SiliconLabs\\SimplicityStudio\\v4\\developer\\sdks\\gecko_sdk_suite\\v2.6\\protocol\\zigbee\\tool\\image-builder\\image-builder-windows.exe" --create "%TARGET_BPATH%.ota" --version 0x20 --manuf-id 0x1268 --image-type 17061 --tag-id 0x0000 --tag-file "%TARGET_BPATH%.gbl" --string "EBL kkAllInOneFloorHeatingMG21SDK665V1"'.replace("\t", "\\t")
WINE_CMD = WINE.replace("cmd /C ","") if not "echo" in IMAGE_BUILDER else WINE
OTA_COMMAND = WINE_CMD + IMAGE_BUILDER
OTA_COMMAND = OTA_COMMAND.replace("%PROJECT_DIR%", PROJECT_DIR)
......
......@@ -222,7 +222,7 @@
<state>APPLICATION_MFG_TOKEN_HEADER="znet-mfg-token.h"</state>
<state>MBEDTLS_DEVICE_ACCELERATION_CONFIG_FILE="configs/config-device-acceleration.h"</state>
<state>MBEDTLS_DEVICE_ACCELERATION_CONFIG_APP_FILE="config-device-acceleration-app.h"</state>
<state>NVM3_FLASH_PAGES=8</state><state>NVM3_DEFAULT_CACHE_SIZE=335</state><state>NVM3_MAX_OBJECT_SIZE=254</state><state>NVM3_DEFAULT_REPACK_HEADROOM=0</state><state>PHY_RAIL=1</state>
<state>NVM3_FLASH_PAGES=8</state><state>NVM3_DEFAULT_CACHE_SIZE=400</state><state>NVM3_MAX_OBJECT_SIZE=254</state><state>NVM3_DEFAULT_REPACK_HEADROOM=0</state><state>PHY_RAIL=1</state>
</option>
<option>
<name>CCPreprocFile</name>
......@@ -610,7 +610,7 @@
<state>APPLICATION_MFG_TOKEN_HEADER="znet-mfg-token.h"</state>
<state>MBEDTLS_DEVICE_ACCELERATION_CONFIG_FILE="configs/config-device-acceleration.h"</state>
<state>MBEDTLS_DEVICE_ACCELERATION_CONFIG_APP_FILE="config-device-acceleration-app.h"</state>
<state>NVM3_FLASH_PAGES=8</state><state>NVM3_DEFAULT_CACHE_SIZE=335</state><state>NVM3_MAX_OBJECT_SIZE=254</state><state>NVM3_DEFAULT_REPACK_HEADROOM=0</state><state>PHY_RAIL=1</state>
<state>NVM3_FLASH_PAGES=8</state><state>NVM3_DEFAULT_CACHE_SIZE=400</state><state>NVM3_MAX_OBJECT_SIZE=254</state><state>NVM3_DEFAULT_REPACK_HEADROOM=0</state><state>PHY_RAIL=1</state>
</option>
<option>
<name>AList</name>
......
......@@ -64,6 +64,7 @@
#define ZCL_USING_OPT_TUNNEL_CLUSTER_FanMode_ATTRIBUTE
#define ZCL_USING_OPT_TUNNEL_CLUSTER_OnOff_ATTRIBUTE
#define ZCL_USING_OPT_TUNNEL_CLUSTER_NoDisturbMode_ATTRIBUTE
#define ZCL_USING_OPT_TUNNEL_CLUSTER_RunMode_ATTRIBUTE
#define EMBER_AF_MANUFACTURER_CODE 0x1268
#define EMBER_AF_DEFAULT_RESPONSE_POLICY_CONDITIONAL
......@@ -204,20 +205,20 @@
/**** Debug printing section ****/
// Global switch
// #define EMBER_AF_PRINT_ENABLE
#define EMBER_AF_PRINT_ENABLE
// Individual areas
#define EMBER_AF_PRINT_CORE 0x0001
#define EMBER_AF_PRINT_APP 0x0002
#define EMBER_AF_PRINT_ATTRIBUTES 0x0004
#define EMBER_AF_PRINT_ZDO 0x0008
#define EMBER_AF_PRINT_DEBUG 0x0002
#define EMBER_AF_PRINT_APP 0x0004
#define EMBER_AF_PRINT_ATTRIBUTES 0x0008
#define EMBER_AF_PRINT_SCENES_CLUSTER 0x0010
#define EMBER_AF_PRINT_ON_OFF_CLUSTER 0x0020
#define EMBER_AF_PRINT_BITS { 0x3F }
#define EMBER_AF_PRINT_NAMES { \
"Core",\
"Debug",\
"Application",\
"Attributes",\
"ZDO (ZigBee Device Object)",\
"Scenes",\
"On/off",\
NULL\
......@@ -333,7 +334,7 @@
#define EMBER_AF_PLUGIN_NVM3
// User options for plugin NVM3 Library
#define EMBER_AF_PLUGIN_NVM3_FLASH_PAGES 8
#define EMBER_AF_PLUGIN_NVM3_CACHE_SIZE 335
#define EMBER_AF_PLUGIN_NVM3_CACHE_SIZE 400
#define EMBER_AF_PLUGIN_NVM3_MAX_OBJECT_SIZE 254
#define EMBER_AF_PLUGIN_NVM3_USER_REPACK_HEADROOM 0
......@@ -369,7 +370,7 @@
#define CUSTOMER_APPLICATION_VERSION EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_FIRMWARE_VERSION
// User options for plugin OTA Bootload Cluster Client Policy
#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_IMAGE_TYPE_ID 17061
#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_FIRMWARE_VERSION 20
#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_FIRMWARE_VERSION 33
#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_HARDWARE_VERSION 16
#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_EBL_VERIFICATION
#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_DELETE_FAILED_DOWNLOADS
......
......@@ -64,6 +64,7 @@
#define ZCL_USING_OPT_TUNNEL_CLUSTER_FanMode_ATTRIBUTE
#define ZCL_USING_OPT_TUNNEL_CLUSTER_OnOff_ATTRIBUTE
#define ZCL_USING_OPT_TUNNEL_CLUSTER_NoDisturbMode_ATTRIBUTE
#define ZCL_USING_OPT_TUNNEL_CLUSTER_RunMode_ATTRIBUTE
#define EMBER_AF_MANUFACTURER_CODE 0x1268
#define EMBER_AF_DEFAULT_RESPONSE_POLICY_CONDITIONAL
......@@ -204,20 +205,20 @@
/**** Debug printing section ****/
// Global switch
// #define EMBER_AF_PRINT_ENABLE
#define EMBER_AF_PRINT_ENABLE
// Individual areas
#define EMBER_AF_PRINT_CORE 0x0001
#define EMBER_AF_PRINT_APP 0x0002
#define EMBER_AF_PRINT_ATTRIBUTES 0x0004
#define EMBER_AF_PRINT_ZDO 0x0008
#define EMBER_AF_PRINT_DEBUG 0x0002
#define EMBER_AF_PRINT_APP 0x0004
#define EMBER_AF_PRINT_ATTRIBUTES 0x0008
#define EMBER_AF_PRINT_SCENES_CLUSTER 0x0010
#define EMBER_AF_PRINT_ON_OFF_CLUSTER 0x0020
#define EMBER_AF_PRINT_BITS { 0x3F }
#define EMBER_AF_PRINT_NAMES { \
"Core",\
"Debug",\
"Application",\
"Attributes",\
"ZDO (ZigBee Device Object)",\
"Scenes",\
"On/off",\
NULL\
......@@ -333,7 +334,7 @@
#define EMBER_AF_PLUGIN_NVM3
// User options for plugin NVM3 Library
#define EMBER_AF_PLUGIN_NVM3_FLASH_PAGES 8
#define EMBER_AF_PLUGIN_NVM3_CACHE_SIZE 335
#define EMBER_AF_PLUGIN_NVM3_CACHE_SIZE 400
#define EMBER_AF_PLUGIN_NVM3_MAX_OBJECT_SIZE 254
#define EMBER_AF_PLUGIN_NVM3_USER_REPACK_HEADROOM 0
......@@ -369,7 +370,7 @@
#define CUSTOMER_APPLICATION_VERSION EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_FIRMWARE_VERSION
// User options for plugin OTA Bootload Cluster Client Policy
#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_IMAGE_TYPE_ID 17061
#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_FIRMWARE_VERSION 19
#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_FIRMWARE_VERSION 32
#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_HARDWARE_VERSION 16
#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_EBL_VERIFICATION
#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_DELETE_FAILED_DOWNLOADS
......
......@@ -91,6 +91,7 @@
#include "znet-bookkeeping.h"
#include "../00ikonke-app/general/ikk-debug.h"
#include "../00ikonke-app/general/ikk-cluster.h"
//------------------------------------------------------------------------------
#define INVALID_MESSAGE_TAG 0xFF
......@@ -564,15 +565,8 @@ EmberStatus emberAfSendUnicastToBindingsWithCallback(EmberApsFrame *apsFrame,
uint8_t endpoint_mark = apsFrame->sourceEndpoint;
uint16_t cluster_mark = apsFrame->clusterId;
//add by maozj 20200426
typedef struct tag_zcl_report_table{
uint8_t endpoint;
EmberAfClusterId clusterId;
bool reportEnable;
bool sceneRecallFlg;
bool reportGatewayEnable;
bool reportChildDeviceEnable;
}ZclReportTableSt;
EmberEUI64 invalidMaskEui64 = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
EmberEUI64 eui64GatewayAddr;
extern void kNwkGetGateWayEui64(EmberEUI64 eui64);
kNwkGetGateWayEui64(eui64GatewayAddr);
......@@ -592,22 +586,37 @@ EmberStatus emberAfSendUnicastToBindingsWithCallback(EmberApsFrame *apsFrame,
#if 1
//add by maozj 20200512, send to gateway,and multi-control report
bool permitStatus = kZclClusterGetPermitReportInfo(binding.local, binding.clusterId, &zclReportInfo);
if (permitStatus && (!zclReportInfo.reportGatewayEnable || !zclReportInfo.reportChildDeviceEnable)){
if (permitStatus && (!zclReportInfo.reportGatewayEnable || !zclReportInfo.reportChildDeviceEnable)){ // use flag to not send
//iKonkeAfSelfPrint("\r\n###2222 maskEui64Addr");
//iKonkeAfSelfPrintBuffer(zclReportInfo.maskEui64Addr, 8, true);
if ((zclReportInfo.reportGatewayEnable && !MEMCOMPARE(eui64GatewayAddr, binding.identifier, EUI64_SIZE)) \
|| (zclReportInfo.reportChildDeviceEnable && MEMCOMPARE(eui64GatewayAddr, binding.identifier, EUI64_SIZE))){
iKonkeAfSelfPrint("\r\n###1111 ep(%d),cluster(%02x)Send child(%d), gateway(%d)\r\n",binding.local, binding.clusterId, zclReportInfo.reportChildDeviceEnable, zclReportInfo.reportGatewayEnable );
iKonkeAfSelfPrint("###1111 ep(%d),cluster(%02x)Send child(%d), gateway(%d)\r\n",binding.local, binding.clusterId, zclReportInfo.reportChildDeviceEnable, zclReportInfo.reportGatewayEnable );
//continue;
}else {
iKonkeAfSelfPrint("\r\n###2222 ep(%d),cluster(%02x)Send child(%d), gateway(%d)\r\n",binding.local, binding.clusterId, zclReportInfo.reportChildDeviceEnable, zclReportInfo.reportGatewayEnable );
iKonkeAfSelfPrint("###2222 ep(%d),cluster(%02x)Send child(%d), gateway(%d)\r\n",binding.local, binding.clusterId, zclReportInfo.reportChildDeviceEnable, zclReportInfo.reportGatewayEnable );
continue;
}
iKonkeAfSelfPrint("\r\n###3333 ep(%d),cluster(%02x)Send child(%d), gateway(%d)\r\n",binding.local, binding.clusterId, zclReportInfo.reportChildDeviceEnable, zclReportInfo.reportGatewayEnable );
iKonkeAfSelfPrint("###3333 ep(%d),cluster(%02x)Send child(%d), gateway(%d)\r\n",binding.local, binding.clusterId, zclReportInfo.reportChildDeviceEnable, zclReportInfo.reportGatewayEnable );
}else if (!permitStatus){
iKonkeAfSelfPrint("\r\n###4444 ep(%d),cluster(%02x)Send child(%d), gateway(%d)\r\n",binding.local, binding.clusterId, zclReportInfo.reportChildDeviceEnable, zclReportInfo.reportGatewayEnable );
iKonkeAfSelfPrint("###4444 ep(%d),cluster(%02x)Send child(%d), gateway(%d)\r\n",binding.local, binding.clusterId, zclReportInfo.reportChildDeviceEnable, zclReportInfo.reportGatewayEnable );
continue;
}
if (!MEMCOMPARE(zclReportInfo.maskEui64Addr, binding.identifier, EUI64_SIZE) && (zclReportInfo.dest_endpoint == binding.remote) && (zclReportInfo.endpoint == binding.local)) { //1y??μ??·oí·¢?í?üá?°ó?¨±í?Dμ??·??ó|£?2?·¢?í?üá?, ??3yμ??·
MEMSET(zclReportInfo.maskEui64Addr, 0xff, EUI64_SIZE);
zclReportInfo.endpoint = RESET_ENDPOINT;
zclReportInfo.dest_endpoint = RESET_ENDPOINT;
//KKK clear addr
iKonkeAfSelfPrint("###5555 ep(%d),cluster(%02x)Send child(%d), gateway(%d)\r\n",binding.local, binding.clusterId, zclReportInfo.reportChildDeviceEnable, zclReportInfo.reportGatewayEnable );
kZclClusterSetPermitReportInfo(endpoint_mark, zclReportInfo.cluster, zclReportInfo.reportEnable, \
zclReportInfo.sceneRecallFlg, zclReportInfo.reportGatewayEnable, zclReportInfo.reportChildDeviceEnable, invalidMaskEui64, RESET_ENDPOINT);
continue;
}
#endif
// if (!MEMCOMPARE(eui64GatewayAddr, binding.identifier, EUI64_SIZE)){
iKonkeAfSelfPrint("###6666 send\r\n");
status = send(EMBER_OUTGOING_VIA_BINDING,
i,
apsFrame,
......@@ -625,8 +634,8 @@ EmberStatus emberAfSendUnicastToBindingsWithCallback(EmberApsFrame *apsFrame,
}
kZclClusterGetPermitReportInfo(endpoint_mark, cluster_mark, &zclReportInfo);
if (zclReportInfo.reportChildDeviceEnable == true){
kZclClusterSetPermitReportInfo(endpoint_mark, zclReportInfo.reportEnable, zclReportInfo.sceneRecallFlg, zclReportInfo.reportGatewayEnable, false);
if (zclReportInfo.reportChildDeviceEnable == true){ // clear report child attr
kZclClusterSetPermitReportInfo(endpoint_mark, zclReportInfo.cluster, zclReportInfo.reportEnable, zclReportInfo.sceneRecallFlg, zclReportInfo.reportGatewayEnable, false, invalidMaskEui64, RESET_ENDPOINT);
}
return status;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment