-
Notifications
You must be signed in to change notification settings - Fork 29
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
Limitation of length in UDP ? #37
Comments
I am using ESP32 connected to ENC28J60. |
try to reduce the SPI speed, in SPI_ETHERNET_SETTINGS in Enc28J60Network.cpp btw: IPAddress is printable. |
I changed to There is no change. It still receives only 18 bytes. |
how do you send the UDP message? |
Using PacketSender |
The observation is, if I broadcast a message from PacketSender, the message is received up to 18 characters. However, if it is directly addressed to the device IP address, then there is no such restriction. |
broadcast shouldn't be received at all with EthernetENC |
I reinstalled the library. Still the observation is same. 18 bytes of broadcasted data is received. |
I am finding that any packet more than 18 bytes is not being received by following code.
#include <SPI.h>
#include <EthernetENC.h>
// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = {
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192, 168, 1, 177);
unsigned int localPort = 35350; // local port to listen on
// An EthernetUDP instance to let us send and receive packets over UDP
EthernetUDP Udp;
char packetBuffer[1024]; //buffer to hold incoming packet,
void setup() {
// start the Ethernet and UDP:
Serial.begin(115200);
Ethernet.init(2);
Ethernet.begin(mac,ip);
Serial.println(Ethernet.localIP());
Udp.begin(localPort);
}
void loop() {
int packetSize = Udp.parsePacket();
if(Udp.available())
{
Serial.print("Received packet of size ");
Serial.println(packetSize);
Serial.print("From ");
IPAddress remote = Udp.remoteIP();
for (int i =0; i < 4; i++)
{
Serial.print(remote[i], DEC);
if (i < 3)
{
Serial.print(".");
}
}
Serial.print(", port ");
Serial.println(Udp.remotePort());
}
}
The text was updated successfully, but these errors were encountered: