Networking-for-Arduino / EthernetENC

Ethernet library for ENC28J60. This is a modern version of the UIPEthernet library. EthernetENC library is compatible with all Arduino architectures with Arduino SPI library with transactions support. Only include EthernetENC.h instead of Ethernet.h
127 stars 28 forks source link

Fragmented Packets #13

Closed rvlietstra closed 3 years ago

rvlietstra commented 3 years ago

Hi! Thanks for all your work.

I'm trying to read a UDP packet from a device. After checking out the packet with wireshark I realized it is a fragmented packet, of about 4500 bytes. I do see packets of < 1500 bytes on the enc28j60.

I found the UIP_REASSEMBLY define in uipopt.h, I tried setting it to 1 and increasing UIP_BUFSIZE and UIP_REASS_MAXAGE but I'm still not seeing my packets.

Am I missing something ? Should this be possible ? I'm using an esp32.

Thanks!

JAndrassy commented 3 years ago

the library uses the 8 kB RAM of the ens28j60 to store received packets. 2 kB is RX buffer, 6 kB is to store packets for the application and to compose outgoing packets. the library was developed for ATmega328p with 2 kB SRAM.

so what I recommend to do for esp32, is to buy a LAN8720 PHY module and use it with native support of esp32 and esp32 Arduino core.

rvlietstra commented 3 years ago

Thank you very much for you quick reply and suggestion, I'm looking at the LAN8720. The device also supports TCP comms. Does TCP have the same restrictions ? Are there fragmented packets that would need reassembly ? Thanks!

JAndrassy commented 3 years ago

LAN8720 is only simple circuit and a connector. The esp32 has a Ethernet MAC peripheral. The esp32 SDK has a TCP/IP stack (LwIP). which handles TCP/IP for WiFi station, foe WiFi SoftAP and for the Ethernet peripheral. So you could say that the WiFi library handles Ethernet then.