[beken-72xx] Enable mDNS responder, set IGMP flag on netif
This commit is contained in:
@@ -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 | ❌ | ❌
|
||||
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -331,11 +331,15 @@ env.AddLibrary(
|
||||
"+<lwip-2.0.2/port/*.c>",
|
||||
"+<lwip-2.0.2/src/api/*.c>",
|
||||
"+<lwip-2.0.2/src/apps/ping/*.c>",
|
||||
"+<lwip-2.0.2/src/apps/mdns/*.c>",
|
||||
"+<lwip-2.0.2/src/core/*.c>",
|
||||
"+<lwip-2.0.2/src/core/ipv4/*.c>",
|
||||
"+<lwip-2.0.2/src/core/ipv6/*.c>",
|
||||
"+<lwip-2.0.2/src/netif/ethernet.c>",
|
||||
"+<dhcpd/*.c>",
|
||||
# use ethernetif.c from AliOS since it enables netif IGMP flag
|
||||
"-<lwip-2.0.2/port/ethernetif.c>",
|
||||
"+<$SDK_DIR/beken378/alios/lwip-2.0.2/port/ethernetif.c>",
|
||||
],
|
||||
includes=[
|
||||
"+<lwip-2.0.2/port>",
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user