ArduinoPcap icon indicating copy to clipboard operation
ArduinoPcap copied to clipboard

Packet data is Zero - Packet size limited during capture

Open ShlomiRex opened this issue 6 years ago • 4 comments

Screenshot from 2019-09-13 03-11-55

ESP32 using NodeMCU. No modification were done to the origional code. Baud rate was 921600.

ShlomiRex avatar Sep 13 '19 00:09 ShlomiRex

Also getting this error.

wgaylord avatar Nov 07 '19 23:11 wgaylord

Getting the same error. Any updates on this issue?

MIst3rM avatar Jan 27 '20 01:01 MIst3rM

Same issue here on a TTGO-T Cell 18650 ESP32 Board. So I checked the code and found out, that un-commenting

#if defined(ESP32) if(incl_len > snaplen) incl_len = snaplen; /* safty check that the packet isn't too big (I ran into problems with the ESP8266 here) */ #endif

line 80-82 in PCAP.cpp solves that issue, but brings the "Malformed Packet" issue. Btw: snaplen is defined as uint32_t snaplen = sizeof(int); which in my simple knowledge is 4? Almost every received packet is greater than 4, such that the data will be virtually removed?

realfogman avatar May 14 '20 10:05 realfogman

I set snaplen to 2500 now. That should do the trick for WiFi.
I think originally it was suppose to use the max value of an integer there but I must have failed horribly.

Thanks for pointing out the source of the issue. Haven't touched this code in forever.

spacehuhn avatar May 27 '20 11:05 spacehuhn