You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read the documentation at readthedocs and the issue is not addressed there.
I have tested that the issue is present in current master branch (aka latest git).
I have searched the issue tracker for a similar issue.
If there is a stack dump, I have decoded it.
I have filled out all fields below.
Platform
Hardware: [ESP-12]
Core Version: 3.1.2
Development Env: [Platformio]
Operating System: [Windows]
Settings in IDE
Module: [Generic ESP8266 Module|]
Flash Mode: [qio]
Flash Size: [4MB]
lwip Variant: [v2 Lower Memory]
Reset Method: [ck|nodemcu]
Flash Frequency: [40Mhz]
CPU Frequency: [80Mhz|]
Upload Using: [SERIAL]
Upload Speed: [115200
Problem Description
it it previously indicated that local loopback interface 127.0.0.1 is not available in lwip2 and advised against trying to use.
as documented in #6437
previous case suggests to use the local available real interface instead of 127.0.0.1 as loopback.
however as seen below, traffic routed to the local UDP socket is not received by the stack.
the UDP client listens to external traffic and sees traffic coming from netcat on another computer.
but not from internal stack
#include<Arduino.h>
#include<ESP8266WiFi.h>
#include<WiFiUdp.h>
#defineWIFI_SSID"xxxxxx"
#defineWIFI_PASSWORD"yyyyy"
#defineSYSLOG_SERVER"lmSyslog.local"
#defineSYSLOG_PORT514
WiFiUDP udpServer, udpClient;
unsignedint received_bytes = 0;
voidsetup()
{
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
}
digitalWrite(LED_PIN, HIGH);
Serial.begin(9600, SERIAL_8N1);
udpServer.begin(SYSLOG_PORT);
delay(100);
};
// the loop routine runs over and over again forever:voidloop()
{
Serial.print("Sending to loopback server on local interface not loopback 127.0.0.1 ");
delay(100);
udpClient.beginPacket(WiFi.localIP(), SYSLOG_PORT);
udpClient.write("Hello, world");
udpClient.endPacket();
delay(100);
received_bytes = udpServer.parsePacket();
Serial.printf("Relay loop on %s, UDP queue size %d \n", WiFi.localIP().toString().c_str(), received_bytes);
for (int i = 0; i < received_bytes; i++)
{
char c = udpServer.read();
Serial.printf("%c", c);
}
delay(1000);
};
Debug Messages
ing to loopback server on local interface not loopback 127.0.0.1 Relay loop on 192.168.0.171, UDP queue size 0
Sending to loopback server on local interface not loopback 127.0.0.1 Relay loop on 192.168.0.171, UDP queue size 0
Sending to loopback server on local interface not loopback 127.0.0.1 Relay loop on 192.168.0.171, UDP queue size 0
Sending to loopback server on local interface not loopback 127.0.0.1 Relay loop on 192.168.0.171, UDP queue size 0
Sending to loopback server on local interface not loopback 127.0.0.1 Relay loop on 192.168.0.171, UDP queue size 0
Sending to loopback server on local interface not loopback 127.0.0.1 Relay loop on 192.168.0.171, UDP queue size 0
Sending to loopback server on local interface not loopback 127.0.0.1 Relay loop on 192.168.0.171, UDP queue size 17
UDP test message
Sending to loopback server on local interface not loopback 127.0.0.1 Relay loop on 192.168.0.171, UDP queue size 0
Sending to loopback server on local interface not loopback 127.0.0.1 Relay loop on 192.168.0.171, UDP queue size 0
Sending to loopback server on local interface not loopback 127.0.0.1 Relay loop on 192.168.0.171, UDP queue size 0
The text was updated successfully, but these errors were encountered:
Then these packets are not retained so they should be(?) sent, and are lost in the network: they are probably discarded by the switch integrated in the AP because this is a non-sense to send a packet back to its sender.
This could also be checked using the included netdump library for which we have a provided example. It allows to monitor everything coming in to and out from all network interfaces of the esp8266. It often helps to understand what happens around the network interface (tcpdump-like).
Basic Infos
Platform
Settings in IDE
Problem Description
it it previously indicated that local loopback interface 127.0.0.1 is not available in lwip2 and advised against trying to use.
as documented in #6437
previous case suggests to use the local available real interface instead of 127.0.0.1 as loopback.
however as seen below, traffic routed to the local UDP socket is not received by the stack.
the UDP client listens to external traffic and sees traffic coming from netcat on another computer.
but not from internal stack
MCVE Sketch
Debug Messages
The text was updated successfully, but these errors were encountered: