Skip to content

Commit 3ccd8ed

Browse files
authored
Merge branch 'master' into fix/network_warning
2 parents 332dfd3 + e680e7b commit 3ccd8ed

File tree

12 files changed

+118
-39
lines changed

12 files changed

+118
-39
lines changed

libraries/Ethernet/src/ETH.cpp

+47-13
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ bool ETHClass::begin(eth_phy_type_t type, int32_t phy_addr, int mdc, int mdio, i
271271
eth_mac_config.sw_reset_timeout_ms = 1000;
272272
eth_mac_config.rx_task_stack_size = _task_stack_size;
273273

274-
esp_eth_mac_t *mac = esp_eth_mac_new_esp32(&mac_config, &eth_mac_config);
275-
if (mac == NULL) {
274+
_mac = esp_eth_mac_new_esp32(&mac_config, &eth_mac_config);
275+
if (_mac == NULL) {
276276
log_e("esp_eth_mac_new_esp32 failed");
277277
return false;
278278
}
@@ -281,26 +281,25 @@ bool ETHClass::begin(eth_phy_type_t type, int32_t phy_addr, int mdc, int mdio, i
281281
phy_config.phy_addr = phy_addr;
282282
phy_config.reset_gpio_num = _pin_power;
283283

284-
esp_eth_phy_t *phy = NULL;
285284
switch (type) {
286285
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
287-
case ETH_PHY_GENERIC: phy = esp_eth_phy_new_generic(&phy_config); break;
286+
case ETH_PHY_GENERIC: _phy = esp_eth_phy_new_generic(&phy_config); break;
288287
#endif
289-
case ETH_PHY_LAN8720: phy = esp_eth_phy_new_lan87xx(&phy_config); break;
290-
case ETH_PHY_TLK110: phy = esp_eth_phy_new_ip101(&phy_config); break;
291-
case ETH_PHY_RTL8201: phy = esp_eth_phy_new_rtl8201(&phy_config); break;
292-
case ETH_PHY_DP83848: phy = esp_eth_phy_new_dp83848(&phy_config); break;
293-
case ETH_PHY_KSZ8041: phy = esp_eth_phy_new_ksz80xx(&phy_config); break;
294-
case ETH_PHY_KSZ8081: phy = esp_eth_phy_new_ksz80xx(&phy_config); break;
288+
case ETH_PHY_LAN8720: _phy = esp_eth_phy_new_lan87xx(&phy_config); break;
289+
case ETH_PHY_TLK110: _phy = esp_eth_phy_new_ip101(&phy_config); break;
290+
case ETH_PHY_RTL8201: _phy = esp_eth_phy_new_rtl8201(&phy_config); break;
291+
case ETH_PHY_DP83848: _phy = esp_eth_phy_new_dp83848(&phy_config); break;
292+
case ETH_PHY_KSZ8041: _phy = esp_eth_phy_new_ksz80xx(&phy_config); break;
293+
case ETH_PHY_KSZ8081: _phy = esp_eth_phy_new_ksz80xx(&phy_config); break;
295294
default: log_e("Unsupported PHY %d", type); break;
296295
}
297-
if (phy == NULL) {
296+
if (_phy == NULL) {
298297
log_e("esp_eth_phy_new failed");
299298
return false;
300299
}
301300

302301
_eth_handle = NULL;
303-
esp_eth_config_t eth_config = ETH_DEFAULT_CONFIG(mac, phy);
302+
esp_eth_config_t eth_config = ETH_DEFAULT_CONFIG(_mac, _phy);
304303
ret = esp_eth_driver_install(&eth_config, &_eth_handle);
305304
if (ret != ESP_OK) {
306305
log_e("Ethernet driver install failed: %d", ret);
@@ -1010,6 +1009,18 @@ bool ETHClass::fullDuplex() const {
10101009
return (link_duplex == ETH_DUPLEX_FULL);
10111010
}
10121011

1012+
bool ETHClass::setFullDuplex(bool on) {
1013+
if (_eth_handle == NULL) {
1014+
return false;
1015+
}
1016+
eth_duplex_t link_duplex = on ? ETH_DUPLEX_FULL : ETH_DUPLEX_HALF;
1017+
esp_err_t err = esp_eth_ioctl(_eth_handle, ETH_CMD_S_DUPLEX_MODE, &link_duplex);
1018+
if (err != ESP_OK) {
1019+
log_e("Failed to set duplex mode: 0x%x: %s", err, esp_err_to_name(err));
1020+
}
1021+
return err == ESP_OK;
1022+
}
1023+
10131024
bool ETHClass::autoNegotiation() const {
10141025
if (_eth_handle == NULL) {
10151026
return false;
@@ -1019,6 +1030,17 @@ bool ETHClass::autoNegotiation() const {
10191030
return auto_nego;
10201031
}
10211032

1033+
bool ETHClass::setAutoNegotiation(bool on) {
1034+
if (_eth_handle == NULL) {
1035+
return false;
1036+
}
1037+
esp_err_t err = esp_eth_ioctl(_eth_handle, ETH_CMD_S_AUTONEGO, &on);
1038+
if (err != ESP_OK) {
1039+
log_e("Failed to set auto negotiation: 0x%x: %s", err, esp_err_to_name(err));
1040+
}
1041+
return err == ESP_OK;
1042+
}
1043+
10221044
uint32_t ETHClass::phyAddr() const {
10231045
if (_eth_handle == NULL) {
10241046
return 0;
@@ -1028,7 +1050,7 @@ uint32_t ETHClass::phyAddr() const {
10281050
return phy_addr;
10291051
}
10301052

1031-
uint8_t ETHClass::linkSpeed() const {
1053+
uint16_t ETHClass::linkSpeed() const {
10321054
if (_eth_handle == NULL) {
10331055
return 0;
10341056
}
@@ -1037,6 +1059,18 @@ uint8_t ETHClass::linkSpeed() const {
10371059
return (link_speed == ETH_SPEED_10M) ? 10 : 100;
10381060
}
10391061

1062+
bool ETHClass::setLinkSpeed(uint16_t speed) {
1063+
if (_eth_handle == NULL) {
1064+
return false;
1065+
}
1066+
eth_speed_t link_speed = (speed == 10) ? ETH_SPEED_10M : ETH_SPEED_100M;
1067+
esp_err_t err = esp_eth_ioctl(_eth_handle, ETH_CMD_S_SPEED, &link_speed);
1068+
if (err != ESP_OK) {
1069+
log_e("Failed to set link speed: 0x%x: %s", err, esp_err_to_name(err));
1070+
}
1071+
return err == ESP_OK;
1072+
}
1073+
10401074
// void ETHClass::getMac(uint8_t* mac)
10411075
// {
10421076
// if(_eth_handle != NULL && mac != NULL){

libraries/Ethernet/src/ETH.h

+7-1
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,14 @@ class ETHClass : public NetworkInterface {
192192

193193
// ETH Handle APIs
194194
bool fullDuplex() const;
195-
uint8_t linkSpeed() const;
195+
bool setFullDuplex(bool on);
196+
197+
uint16_t linkSpeed() const;
198+
bool setLinkSpeed(uint16_t speed); //10 or 100
199+
196200
bool autoNegotiation() const;
201+
bool setAutoNegotiation(bool on);
202+
197203
uint32_t phyAddr() const;
198204

199205
esp_eth_handle_t handle() const;

libraries/Matter/src/MatterEndpoints/MatterColorLight.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ class MatterColorLight : public MatterEndPoint {
6666

6767
protected:
6868
bool started = false;
69-
bool onOffState = false; // default initial state is off, but it can be changed by begin(bool)
70-
espHsvColor_t colorHSV = {0}; // default initial color HSV is black, but it can be changed by begin(bool, espHsvColor_t)
69+
bool onOffState = false; // default initial state is off, but it can be changed by begin(bool)
70+
espHsvColor_t colorHSV = {0, 0, 0}; // default initial color HSV is black, but it can be changed by begin(bool, espHsvColor_t)
7171
EndPointOnOffCB _onChangeOnOffCB = NULL;
7272
EndPointRGBColorCB _onChangeColorCB = NULL;
7373
EndPointCB _onChangeCB = NULL;

libraries/Matter/src/MatterEndpoints/MatterEnhancedColorLight.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class MatterEnhancedColorLight : public MatterEndPoint {
9191
bool started = false;
9292
bool onOffState = false; // default initial state is off, but it can be changed by begin(bool)
9393
uint8_t brightnessLevel = 0; // default initial brightness is 0, but it can be changed by begin(bool, uint8_t)
94-
espHsvColor_t colorHSV = {0}; // default initial color HSV is black, but it can be changed by begin(bool, uint8_t, espHsvColor_t)
94+
espHsvColor_t colorHSV = {0, 0, 0}; // default initial color HSV is black, but it can be changed by begin(bool, uint8_t, espHsvColor_t)
9595
uint16_t colorTemperatureLevel = 0; // default initial color temperature is 0, but it can be changed by begin(bool, uint8_t, espHsvColor_t, uint16_t)
9696
EndPointOnOffCB _onChangeOnOffCB = NULL;
9797
EndPointBrightnessCB _onChangeBrightnessCB = NULL;

libraries/WiFi/src/WiFiGeneric.cpp

+51-19
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ bool wifiLowLevelInit(bool persistent) {
308308

309309
esp_err_t err = esp_wifi_init(&cfg);
310310
if (err) {
311-
log_e("esp_wifi_init %d", err);
311+
log_e("esp_wifi_init 0x%x: %s", err, esp_err_to_name(err));
312312
lowLevelInitDone = false;
313313
return lowLevelInitDone;
314314
}
@@ -375,7 +375,7 @@ static bool espWiFiStart() {
375375
esp_err_t err = esp_wifi_start();
376376
if (err != ESP_OK) {
377377
_esp_wifi_started = false;
378-
log_e("esp_wifi_start %d", err);
378+
log_e("esp_wifi_start 0x%x: %s", err, esp_err_to_name(err));
379379
return _esp_wifi_started;
380380
}
381381
return _esp_wifi_started;
@@ -389,7 +389,7 @@ static bool espWiFiStop() {
389389
_esp_wifi_started = false;
390390
err = esp_wifi_stop();
391391
if (err) {
392-
log_e("Could not stop WiFi! %d", err);
392+
log_e("Could not stop WiFi! 0x%x: %s", err, esp_err_to_name(err));
393393
_esp_wifi_started = true;
394394
return false;
395395
}
@@ -478,7 +478,7 @@ int WiFiGenericClass::setChannel(uint8_t primary, wifi_second_chan_t secondary)
478478

479479
ret = esp_wifi_get_country(&country);
480480
if (ret != ESP_OK) {
481-
log_e("Failed to get country info");
481+
log_e("Failed to get country info 0x%x: %s", ret, esp_err_to_name(ret));
482482
return ret;
483483
}
484484

@@ -492,7 +492,7 @@ int WiFiGenericClass::setChannel(uint8_t primary, wifi_second_chan_t secondary)
492492

493493
ret = esp_wifi_set_channel(primary, secondary);
494494
if (ret != ESP_OK) {
495-
log_e("Failed to set channel");
495+
log_e("Failed to set channel 0x%x: %s", ret, esp_err_to_name(ret));
496496
return ret;
497497
}
498498

@@ -562,13 +562,13 @@ bool WiFiGenericClass::mode(wifi_mode_t m) {
562562
if (((m & WIFI_MODE_STA) != 0) && ((cm & WIFI_MODE_STA) == 0)) {
563563
err = esp_netif_set_hostname(esp_netifs[ESP_IF_WIFI_STA], NetworkManager::getHostname());
564564
if (err) {
565-
log_e("Could not set hostname! %d", err);
565+
log_e("Could not set hostname! 0x%x: %s", err, esp_err_to_name(err));
566566
return false;
567567
}
568568
}
569569
err = esp_wifi_set_mode(m);
570570
if (err) {
571-
log_e("Could not set mode! %d", err);
571+
log_e("Could not set mode! 0x%x: %s", err, esp_err_to_name(err));
572572
return false;
573573
}
574574

@@ -585,17 +585,44 @@ bool WiFiGenericClass::mode(wifi_mode_t m) {
585585
if (m & WIFI_MODE_STA) {
586586
err = esp_wifi_set_protocol(WIFI_IF_STA, WIFI_PROTOCOL_LR);
587587
if (err != ESP_OK) {
588-
log_e("Could not enable long range on STA! %d", err);
588+
log_e("Could not enable long range on STA! 0x%x: %s", err, esp_err_to_name(err));
589589
return false;
590590
}
591591
}
592592
if (m & WIFI_MODE_AP) {
593593
err = esp_wifi_set_protocol(WIFI_IF_AP, WIFI_PROTOCOL_LR);
594594
if (err != ESP_OK) {
595-
log_e("Could not enable long range on AP! %d", err);
595+
log_e("Could not enable long range on AP! 0x%x: %s", err, esp_err_to_name(err));
596596
return false;
597597
}
598598
}
599+
} else {
600+
#if CONFIG_SOC_WIFI_HE_SUPPORT
601+
#define WIFI_PROTOCOL_DEFAULT (WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N | WIFI_PROTOCOL_11AX)
602+
#else
603+
#define WIFI_PROTOCOL_DEFAULT (WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N)
604+
#endif
605+
uint8_t current_protocol = 0;
606+
if (m & WIFI_MODE_STA) {
607+
err = esp_wifi_get_protocol(WIFI_IF_STA, &current_protocol);
608+
if (err == ESP_OK && current_protocol == WIFI_PROTOCOL_LR) {
609+
log_v("Disabling long range on STA");
610+
err = esp_wifi_set_protocol(WIFI_IF_STA, WIFI_PROTOCOL_DEFAULT);
611+
if (err != ESP_OK) {
612+
log_e("Could not disable long range on STA! 0x%x: %s", err, esp_err_to_name(err));
613+
}
614+
}
615+
}
616+
if (m & WIFI_MODE_AP) {
617+
err = esp_wifi_get_protocol(WIFI_IF_AP, &current_protocol);
618+
if (err == ESP_OK && current_protocol == WIFI_PROTOCOL_LR) {
619+
log_v("Disabling long range on AP");
620+
err = esp_wifi_set_protocol(WIFI_IF_AP, WIFI_PROTOCOL_DEFAULT);
621+
if (err != ESP_OK) {
622+
log_e("Could not disable long range on AP! 0x%x: %s", err, esp_err_to_name(err));
623+
}
624+
}
625+
}
599626
}
600627
if (!espWiFiStart()) {
601628
return false;
@@ -683,8 +710,9 @@ bool WiFiGenericClass::setSleep(wifi_ps_type_t sleepType) {
683710
if (sleepType != _sleepEnabled) {
684711
_sleepEnabled = sleepType;
685712
if (WiFi.STA.started()) {
686-
if (esp_wifi_set_ps(_sleepEnabled) != ESP_OK) {
687-
log_e("esp_wifi_set_ps failed!");
713+
esp_err_t err = esp_wifi_set_ps(_sleepEnabled);
714+
if (err != ESP_OK) {
715+
log_e("esp_wifi_set_ps failed!: 0x%x: %s", err, esp_err_to_name(err));
688716
return false;
689717
}
690718
}
@@ -748,8 +776,9 @@ bool WiFiGenericClass::initiateFTM(uint8_t frm_count, uint16_t burst_period, uin
748776
memcpy(ftmi_cfg.resp_mac, mac, 6);
749777
}
750778
// Request FTM session with the Responder
751-
if (ESP_OK != esp_wifi_ftm_initiate_session(&ftmi_cfg)) {
752-
log_e("Failed to initiate FTM session");
779+
esp_err_t err = esp_wifi_ftm_initiate_session(&ftmi_cfg);
780+
if (ESP_OK != err) {
781+
log_e("Failed to initiate FTM session: 0x%x: %s", err, esp_err_to_name(err));
753782
return false;
754783
}
755784
return true;
@@ -768,8 +797,9 @@ bool WiFiGenericClass::setDualAntennaConfig(uint8_t gpio_ant1, uint8_t gpio_ant2
768797

769798
esp_phy_ant_gpio_config_t wifi_ant_io;
770799

771-
if (ESP_OK != esp_phy_get_ant_gpio(&wifi_ant_io)) {
772-
log_e("Failed to get antenna configuration");
800+
esp_err_t err = esp_phy_get_ant_gpio(&wifi_ant_io);
801+
if (ESP_OK != err) {
802+
log_e("Failed to get antenna configuration: 0x%x: %s", err, esp_err_to_name(err));
773803
return false;
774804
}
775805

@@ -778,8 +808,9 @@ bool WiFiGenericClass::setDualAntennaConfig(uint8_t gpio_ant1, uint8_t gpio_ant2
778808
wifi_ant_io.gpio_cfg[1].gpio_num = gpio_ant2;
779809
wifi_ant_io.gpio_cfg[1].gpio_select = 1;
780810

781-
if (ESP_OK != esp_phy_set_ant_gpio(&wifi_ant_io)) {
782-
log_e("Failed to set antenna GPIO configuration");
811+
err = esp_phy_set_ant_gpio(&wifi_ant_io);
812+
if (ESP_OK != err) {
813+
log_e("Failed to set antenna GPIO configuration: 0x%x: %s", err, esp_err_to_name(err));
783814
return false;
784815
}
785816

@@ -827,8 +858,9 @@ bool WiFiGenericClass::setDualAntennaConfig(uint8_t gpio_ant1, uint8_t gpio_ant2
827858
}
828859

829860
set_ant:
830-
if (ESP_OK != esp_phy_set_ant(&ant_config)) {
831-
log_e("Failed to set antenna configuration");
861+
err = esp_phy_set_ant(&ant_config);
862+
if (ESP_OK != err) {
863+
log_e("Failed to set antenna configuration: 0x%x: %s", err, esp_err_to_name(err));
832864
return false;
833865
}
834866
#endif

libraries/Zigbee/examples/Zigbee_Temp_Hum_Sensor_Sleepy/Zigbee_Temp_Hum_Sensor_Sleepy.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ void loop() {
125125
int startTime = millis();
126126
while (digitalRead(button) == LOW) {
127127
delay(50);
128-
if ((millis() - startTime) > 3000) {
129-
// If key pressed for more than 3secs, factory reset Zigbee and reboot
128+
if ((millis() - startTime) > 10000) {
129+
// If key pressed for more than 10secs, factory reset Zigbee and reboot
130130
Serial.println("Resetting Zigbee to factory and rebooting in 1s.");
131131
delay(1000);
132132
Zigbee.factoryReset();

libraries/Zigbee/src/ep/ZigbeeAnalog.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ void ZigbeeAnalog::reportAnalogInput() {
9393
report_attr_cmd.direction = ESP_ZB_ZCL_CMD_DIRECTION_TO_CLI;
9494
report_attr_cmd.clusterID = ESP_ZB_ZCL_CLUSTER_ID_ANALOG_INPUT;
9595
report_attr_cmd.zcl_basic_cmd.src_endpoint = _endpoint;
96+
report_attr_cmd.manuf_code = ESP_ZB_ZCL_ATTR_NON_MANUFACTURER_SPECIFIC;
9697

9798
esp_zb_lock_acquire(portMAX_DELAY);
9899
esp_zb_zcl_report_attr_cmd_req(&report_attr_cmd);
@@ -107,7 +108,7 @@ void ZigbeeAnalog::setAnalogInputReporting(uint16_t min_interval, uint16_t max_i
107108
reporting_info.ep = _endpoint;
108109
reporting_info.cluster_id = ESP_ZB_ZCL_CLUSTER_ID_ANALOG_INPUT;
109110
reporting_info.cluster_role = ESP_ZB_ZCL_CLUSTER_SERVER_ROLE;
110-
reporting_info.attr_id = ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_VALUE_ID;
111+
reporting_info.attr_id = ESP_ZB_ZCL_ATTR_ANALOG_INPUT_PRESENT_VALUE_ID;
111112
reporting_info.u.send_info.min_interval = min_interval;
112113
reporting_info.u.send_info.max_interval = max_interval;
113114
reporting_info.u.send_info.def_min_interval = min_interval;

libraries/Zigbee/src/ep/ZigbeeCarbonDioxideSensor.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ void ZigbeeCarbonDioxideSensor::report() {
8585
report_attr_cmd.direction = ESP_ZB_ZCL_CMD_DIRECTION_TO_CLI;
8686
report_attr_cmd.clusterID = ESP_ZB_ZCL_CLUSTER_ID_CARBON_DIOXIDE_MEASUREMENT;
8787
report_attr_cmd.zcl_basic_cmd.src_endpoint = _endpoint;
88+
report_attr_cmd.manuf_code = ESP_ZB_ZCL_ATTR_NON_MANUFACTURER_SPECIFIC;
8889

8990
esp_zb_lock_acquire(portMAX_DELAY);
9091
esp_zb_zcl_report_attr_cmd_req(&report_attr_cmd);

libraries/Zigbee/src/ep/ZigbeeFlowSensor.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ void ZigbeeFlowSensor::report() {
7979
report_attr_cmd.direction = ESP_ZB_ZCL_CMD_DIRECTION_TO_CLI;
8080
report_attr_cmd.clusterID = ESP_ZB_ZCL_CLUSTER_ID_FLOW_MEASUREMENT;
8181
report_attr_cmd.zcl_basic_cmd.src_endpoint = _endpoint;
82+
report_attr_cmd.manuf_code = ESP_ZB_ZCL_ATTR_NON_MANUFACTURER_SPECIFIC;
8283

8384
esp_zb_lock_acquire(portMAX_DELAY);
8485
esp_zb_zcl_report_attr_cmd_req(&report_attr_cmd);

libraries/Zigbee/src/ep/ZigbeeOccupancySensor.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ void ZigbeeOccupancySensor::report() {
4949
report_attr_cmd.direction = ESP_ZB_ZCL_CMD_DIRECTION_TO_CLI;
5050
report_attr_cmd.clusterID = ESP_ZB_ZCL_CLUSTER_ID_OCCUPANCY_SENSING;
5151
report_attr_cmd.zcl_basic_cmd.src_endpoint = _endpoint;
52+
report_attr_cmd.manuf_code = ESP_ZB_ZCL_ATTR_NON_MANUFACTURER_SPECIFIC;
5253

5354
esp_zb_lock_acquire(portMAX_DELAY);
5455
esp_zb_zcl_report_attr_cmd_req(&report_attr_cmd);

libraries/Zigbee/src/ep/ZigbeePressureSensor.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ void ZigbeePressureSensor::report() {
7575
report_attr_cmd.direction = ESP_ZB_ZCL_CMD_DIRECTION_TO_CLI;
7676
report_attr_cmd.clusterID = ESP_ZB_ZCL_CLUSTER_ID_PRESSURE_MEASUREMENT;
7777
report_attr_cmd.zcl_basic_cmd.src_endpoint = _endpoint;
78+
report_attr_cmd.manuf_code = ESP_ZB_ZCL_ATTR_NON_MANUFACTURER_SPECIFIC;
7879

7980
esp_zb_lock_acquire(portMAX_DELAY);
8081
esp_zb_zcl_report_attr_cmd_req(&report_attr_cmd);

libraries/Zigbee/src/ep/ZigbeeTempSensor.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ void ZigbeeTempSensor::reportTemperature() {
7474
report_attr_cmd.direction = ESP_ZB_ZCL_CMD_DIRECTION_TO_CLI;
7575
report_attr_cmd.clusterID = ESP_ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT;
7676
report_attr_cmd.zcl_basic_cmd.src_endpoint = _endpoint;
77+
report_attr_cmd.manuf_code = ESP_ZB_ZCL_ATTR_NON_MANUFACTURER_SPECIFIC;
7778

7879
esp_zb_lock_acquire(portMAX_DELAY);
7980
esp_zb_zcl_report_attr_cmd_req(&report_attr_cmd);
@@ -116,6 +117,7 @@ void ZigbeeTempSensor::reportHumidity() {
116117
report_attr_cmd.direction = ESP_ZB_ZCL_CMD_DIRECTION_TO_CLI;
117118
report_attr_cmd.clusterID = ESP_ZB_ZCL_CLUSTER_ID_REL_HUMIDITY_MEASUREMENT;
118119
report_attr_cmd.zcl_basic_cmd.src_endpoint = _endpoint;
120+
report_attr_cmd.manuf_code = ESP_ZB_ZCL_ATTR_NON_MANUFACTURER_SPECIFIC;
119121

120122
esp_zb_lock_acquire(portMAX_DELAY);
121123
esp_zb_zcl_report_attr_cmd_req(&report_attr_cmd);

0 commit comments

Comments
 (0)