Skip to content

Commit 6bff270

Browse files
Manually add MDNS multicast Ethernet MACs to CYW43 (#1290)
SDK 1.5 changed the behavior of the underlying CYW43 blob, and it seems to block MDNS multicast by default. Manually add back the Ethernet MACs used for MDNS multicast in IPV4 and IPV6. Fixes #1267
1 parent 72f1e53 commit 6bff270

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

libraries/lwIP_CYW43/src/utility/CYW43shim.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,15 @@ bool CYW43::begin(const uint8_t* address, netif* netif) {
6868

6969
// Not currently possible to hook up igmp_mac_filter and mld_mac_filter
7070
// TODO: implement igmp_mac_filter and mld_mac_filter
71-
#if LWIP_IPV6
72-
// Implement cyw43_set_allmulti(_self, true) using exposed ioctl call
71+
// Implement cyw43_set_allmulti(_self, true) using exposed ioctl call (may not be functional in SDK 1.5?)
7372
uint8_t allmulti_true[] = { 'a', 'l', 'l', 'm', 'u', 'l', 't', 'i', 0, 1, 0, 0, 0 };
7473
cyw43_ioctl(&cyw43_state, CYW43_IOCTL_SET_VAR, sizeof allmulti_true, allmulti_true, CYW43_ITF_STA);
74+
// Add MDNS multicast MAC addresses manually, thanks Wikipedia!
75+
uint8_t mdnsV4[] = {0x01, 0x00, 0x5E, 0x00, 0x00, 0xFB};
76+
cyw43_wifi_update_multicast_filter(&cyw43_state, mdnsV4, true);
77+
#if LWIP_IPV6
78+
uint8_t mdnsV6[] = {0x33, 0x33, 0x00, 0x00, 0x00, 0xFB};
79+
cyw43_wifi_update_multicast_filter(&cyw43_state, mdnsV6, true);
7580
#endif
7681

7782
if (_bssid[0] | _bssid[1] | _bssid[2] | _bssid[3] | _bssid[4] | _bssid[5]) {

0 commit comments

Comments
 (0)