Commit 6941e0c5 authored by dingmz's avatar dingmz

merge sdk3.1.1 to master-panel.Z3Light12W

parents d204f7e5 3b9389c0
一:SDK3.1_V1.1 2021.09.16
SDKV3.1.1-20210916
SDK更新内容:
1、SDK中上报网关,不需要defaultResponds,而多控保留defaultResponds的功能;
2、改编译脚本,修复频偏校准值未正常写入的问题;
1、SDK中上报网关,不需要defaultResponds,而多控保留defaultResponds的功能;
2、改编译脚本,修复频偏校准值未正常写入的问题;
ikonke_app更新内容:
1、为了兼容老设备token的位置,防止OTA之后设备进入产测等状况发送,本次模板修改了自定义token和mfg-token的位置,将灯控面板新加入的标志位等后移,使新模板中的token和原本SDK中的token一一对应,并设置了四字节的SDK版本token,使其在OTA之后,单板和整机的标志位能够自动写入产测通过对应的值。
本次修改的具体实现为:在脚本中定义一个SDK-token的特殊值,并通过脚本有选择地在合成.hex文件时加入特殊值,生成.ota文件时不加入,当旧版本固件OTA到新固件时该token为非特殊值,在初始化的时候产测标志位会被自动写入产测通过的数值。
由于插座等固件中的token位置与灯控不相同,之后会加入新的token,目前token已加,功能在下一次更新时实现。
2、修改了cmei、isn等数组写入时,当数据长度为33字节时会复位的问题,但是目前该类型数组数据长度依旧定义为34字节。
3、增加了LED群组控制,将系统灯、字符灯和按键灯等分组并控制亮灭,opcode为ED17,如果有其他设备使用可以手动修改内容;增加了ED17的错误码E0。
4、删掉了interpan使能标志位与token相关内容。
5、删掉了已经不启用的installcode中与token相关的内容。
6、修复了FCC0中installcode因长度判断有误而无法读取属性的问题;
7、修复私有协议指令长度错误的问题
8、修复按下按键之后立刻读取心跳,数据粘包的问题
9、修改了token id,全部改为1000开始;
SDKV3.1.0-20210916
1、初始版本;
......@@ -64,6 +64,10 @@ EmberAfStatus emberAfOnOffClusterSetValueCallback(uint8_t endpoint,
if ((!currentValue && command == ZCL_OFF_COMMAND_ID)
|| (currentValue && command == ZCL_ON_COMMAND_ID)) {
emberAfOnOffClusterPrintln("On/off already set to new value");
extern uint8_t kZclClusterAttrDelayReportQueueAdd(uint8_t endpoint, uint16_t clusterId, uint16_t attributeId);
kZclClusterAttrDelayReportQueueAdd(endpoint, ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID);
return EMBER_ZCL_STATUS_SUCCESS;
}
......
......@@ -616,6 +616,7 @@ EmberStatus emberAfSendUnicastToBindingsWithCallback(EmberApsFrame *apsFrame,
//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 ((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 );
......@@ -625,12 +626,12 @@ EmberStatus emberAfSendUnicastToBindingsWithCallback(EmberApsFrame *apsFrame,
continue;
}
iKonkeAfSelfPrint("\r\n###3333 ep(%d),cluster(%02x)Send child(%d), gateway(%d)\r\n",binding.local, binding.clusterId, zclReportInfo.reportChildDeviceEnable, zclReportInfo.reportGatewayEnable );
}else if (!permitStatus){
}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 );
continue;
}
if (!MEMCOMPARE(zclReportInfo.maskEui64Addr, binding.identifier, EUI64_SIZE) && (zclReportInfo.dest_endpoint == binding.remote) && (zclReportInfo.endpoint == binding.local) ){ //1y??|???????????? o????a??????????|?????a?????1???????|?????????????????????????a?D|???????????????????|????o?2???????????|?????a ?????1???????|?, ??3y|????????????
if (!MEMCOMPARE(zclReportInfo.maskEui64Addr, binding.identifier, EUI64_SIZE) && (zclReportInfo.dest_endpoint == binding.remote) && (zclReportInfo.endpoint == binding.local) ){ //1y??|?????????????????? o??????a????????????????|???????a???????1???????????|?????????????????????????????????????a?D|???????????????????????????|??????o?2?????????????????|???????a ???????1???????????|?, ??3y|??????????????????
MEMSET(zclReportInfo.maskEui64Addr, 0xff, EUI64_SIZE);
zclReportInfo.endpoint = RESET_ENDPOINT;
zclReportInfo.dest_endpoint = RESET_ENDPOINT;
......@@ -648,6 +649,15 @@ EmberStatus emberAfSendUnicastToBindingsWithCallback(EmberApsFrame *apsFrame,
else{
message[0] &= ~ZCL_DISABLE_DEFAULT_RESPONSE_MASK;
}
// if send to gateway, &
if (!MEMCOMPARE(eui64GatewayAddr, binding.identifier, EUI64_SIZE)) {
extern uint8_t kZclClusterAttrReportToGatewayIsEnabled(void);
if (kZclClusterAttrReportToGatewayIsEnabled()) {
continue;
}
}
status = send(EMBER_OUTGOING_VIA_BINDING,
i,
apsFrame,
......@@ -660,12 +670,11 @@ EmberStatus emberAfSendUnicastToBindingsWithCallback(EmberApsFrame *apsFrame,
if (status != EMBER_SUCCESS) {
return status;
}
// }
}
}
kZclClusterGetPermitReportInfo(endpoint_mark, cluster_mark, &zclReportInfo);
if (zclReportInfo.reportChildDeviceEnable == true){ // clear report child attr
if (zclReportInfo.reportChildDeviceEnable == true) { // clear report child attr
kZclClusterSetPermitReportInfo(endpoint_mark, zclReportInfo.cluster, zclReportInfo.reportEnable, zclReportInfo.sceneRecallFlg, zclReportInfo.reportGatewayEnable, false, NULL, RESET_ENDPOINT);
}
......
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