Skip to content

Asyncudp No Packet Information about port, ipadress ... #4923

Closed
@friedrichengel

Description

@friedrichengel

Hardware:

Board: ESP32_Ethernet_Kit_A_V1.2
Core Installation version: Espressif32 3.1.0
IDE name: Platform.io
PSRAM enabled: yes
Upload Speed: 115200
Computer OS: Windows 10

Description:

With an Update von Espressif32 3.0.0 to 3.1.0 the ASYNCUDP Library doenst work properly anymore.

In "AsyncUDPPacket packet" the Variables: packet.remoteIP(), packet.localIP(), packet.remotePort() are empty,
packet.length and packet.data[] are still working. If i want to answer to an adress on that i received the packet it always sends to 0.0.0.0:XXXX. XXXX randomly changes each start of the esp.

Changing the Espressif32 back to 3.0.0 and everything works again.

Sketch: (leave the backquotes for code formatting)

    bacnet_udp.onPacket([](AsyncUDPPacket packet) {
        bacnet_packet->length = packet.length();
        Serial.print(String(packet.length(), DEC) + " - ");
        Serial.print(packet.remoteIP().toString() + " - ");        
        ip_endpoint->remoteAdress = packet.remoteIP();
        ip_endpoint->destinationAdress = packet.localIP();
        Serial.print(packet.localIP().toString() + " - ");
        ip_endpoint->remotePort = packet.remotePort();
        Serial.println(String(packet.remotePort(), DEC));
        for (int i=0;i<(packet.length());i++){
          bacnet_packet->data[i] =  ((char*)packet.data())[i];
        }
  }

Debug Messages:

There is no Debug Message only the vaiables are empty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions