diff --git a/README.md b/README.md index a77c56a..fe1973c 100644 --- a/README.md +++ b/README.md @@ -57,16 +57,16 @@ Wire | ❗ | ❌ Wi-Fi STA/AP/Mixed | ✔️ | ✔️/❌/❌ Wi-Fi Events | ✔️ | ❌ TCP Client (SSL) | ✔️ (✔️) | ✔️ (❗) -TCP Server | ✔️ | ❓ +TCP Server | ✔️ | ✔️ IPv6 | ❌ | ❌ HTTP Client (SSL) | ✔️ (✔️) | ❓ -HTTP Server | ✔️ | ❓ +HTTP Server | ✔️ | ✔️ NVS / Preferences | ❌ | ❌ SPIFFS | ❌ | ❌ BLE | - | ❌ NTP | ❌ | ❌ OTA | ✔️ | ❌ -MDNS | ✔️ | ❓ +MDNS | ✔️ | ✔️ MQTT | ✅ | ❌ SD | ❌ | ❌ diff --git a/arduino/libretuya/libraries/mDNS/LwIPmDNS.cpp b/arduino/libretuya/libraries/mDNS/LwIPmDNS.cpp index 5a1e491..4c813b9 100644 --- a/arduino/libretuya/libraries/mDNS/LwIPmDNS.cpp +++ b/arduino/libretuya/libraries/mDNS/LwIPmDNS.cpp @@ -59,15 +59,16 @@ mDNS::~mDNS() {} bool mDNS::begin(const char *hostname) { mdns_resp_init(); struct netif *netif = netif_list; + uint8_t enabled = 0; while (netif != NULL) { // TODO: detect mdns_netif_client_id by checking netif_get_client_data() // and finding the requested hostname in struct mdns_host - if (netif_is_up(netif) && mdns_resp_add_netif(netif, hostname, 255) != ERR_OK) { - return false; + if (netif_is_up(netif) && mdns_resp_add_netif(netif, hostname, 255) == ERR_OK) { + enabled++; } netif = netif->next; } - return true; + return enabled > 0; } void mDNS::end() { diff --git a/builder/frameworks/beken-72xx-sdk.py b/builder/frameworks/beken-72xx-sdk.py index c47668d..f652f2d 100644 --- a/builder/frameworks/beken-72xx-sdk.py +++ b/builder/frameworks/beken-72xx-sdk.py @@ -331,11 +331,15 @@ env.AddLibrary( "+", "+", "+", + "+", "+", "+", "+", "+", "+", + # use ethernetif.c from AliOS since it enables netif IGMP flag + "-", + "+<$SDK_DIR/beken378/alios/lwip-2.0.2/port/ethernetif.c>", ], includes=[ "+", diff --git a/platform/beken-72xx/fixups/inc/lwipopts.h b/platform/beken-72xx/fixups/inc/lwipopts.h index 2d98583..71aeec2 100644 --- a/platform/beken-72xx/fixups/inc/lwipopts.h +++ b/platform/beken-72xx/fixups/inc/lwipopts.h @@ -4,4 +4,5 @@ #include_next "lwipopts.h" -#define LWIP_MDNS_RESPONDER 1 +#define LWIP_MDNS_RESPONDER 1 +#define LWIP_NUM_NETIF_CLIENT_DATA 1