Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Missing TCPIP Lock in AsyncUDP multicast #10758

Copy link
Copy link
Closed
@wladwnt

Description

@wladwnt
Issue body actions

Board

ESP32dev

Device Description

Custom ESP32 with ESP32-WROOM-32E-N4

Hardware Configuration

Not relevant

Version

v3.1.0

IDE Name

VSCode

Operating System

Windows 11

Flash frequency

40 MHz

PSRAM enabled

no

Upload speed

115200

Description

Call AsyncUDP.listenMulticast(addr,port) lead to reboot with message Required to lock TCPIP core functionality!
AsyncUDP.listenMulticast(addr,port) fails apparently because there is no TCPIP lock implemented for call igmp_joingroup()

No issue with v3.1.0-rc1 (before TCPIP lock introduced)

Sketch

#include "WiFi.h"
#include "AsyncUDP.h"

const char *ssid = "*******";
const char *password = "*******";

AsyncUDP udp;

AsyncUDP udp_multicast;
static const IPAddress SSDP_MULTICAST_ADDR(239, 255, 255, 250);

void setup() {
   Serial.begin(115200);
  WiFi.mode(WIFI_STA);
  WiFi.begin(ssid, password);
  while (WiFi.waitForConnectResult() != WL_CONNECTED) {
    Serial.println("WiFi Failed");
    delay(1000);
  }
  Serial.println("WiFi connected");
  udp_multicast.listenMulticast(SSDP_MULTICAST_ADDR, 1900);
  udp_multicast.onPacket([&](AsyncUDPPacket packet) {
      Serial.println("Got packet!");
  });
}

void loop() {
  delay(1000);
}

Debug Message

assert failed: igmp_joingroup /IDF/components/lwip/lwip/src/core/ipv4/igmp.c:460 (Required to lock TCPIP core functionality!)    

Backtrace: 0x400832e5:0x3ffb2020 0x4008c171:0x3ffb2040 0x4009234e:0x3ffb2060 0x400ec747:0x3ffb2190 0x400d2ff1:0x3ffb21b0 0x400d31d1:0x3ffb21e0 0x400d293d:0x3ffb2220 0x400d60bb:0x3ffb2270 0x4008cb76:0x3ffb2290
  #0  0x400832e5 in panic_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/panic.c:463
  #1  0x4008c171 in esp_system_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/port/esp_system_chip.c:92
  #2  0x4009234e in __assert_func at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/newlib/assert.c:80
  #3  0x400ec747 in igmp_joingroup at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/core/ipv4/igmp.c:460 (discriminator 1)
  #4  0x400d2ff1 in AsyncUDP::listenMulticast(ip_addr const*, unsigned short, unsigned char, tcpip_adapter_if_t) at C:/Users/xxx/.platformio/packages/framework-arduinoespressif32/libraries/AsyncUDP/src/AsyncUDP.cpp:642
      (inlined by) AsyncUDP::listenMulticast(ip_addr const*, unsigned short, unsigned char, tcpip_adapter_if_t) at C:/Users/xxx/.platformio/packages/framework-arduinoespressif32/libraries/AsyncUDP/src/AsyncUDP.cpp:681
  #5  0x400d31d1 in AsyncUDP::listenMulticast(IPAddress, unsigned short, unsigned char, tcpip_adapter_if_t) at C:/Users/xxx/.platformio/packages/framework-arduinoespressif32/libraries/AsyncUDP/src/AsyncUDP.cpp:764
  #6  0x400d293d in setup() at src/test_udp.cpp:21 (discriminator 2)
  #7  0x400d60bb in loopTask(void*) at C:/Users/xxx/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:59   
  #8  0x4008cb76 in vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:139

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: RegressionResult of unforeseen consequences of a previous changeResult of unforeseen consequences of a previous change

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.