Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
friedrichengel opened this issue Mar 9, 2021 · 1 comment
Closed

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

friedrichengel opened this issue Mar 9, 2021 · 1 comment

Comments

@friedrichengel
Copy link

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.
@me-no-dev
Copy link
Member

Done :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants