spacehuhn/ArduinoPcap

Packet size limited during capture

SensorsIot opened this issue · 6 comments

I think this is a cool project (I am working on a similar one to detect MAC addresses in the proximity to control things).
I tried your sketch on an ESP32 and it worked quite well. But unfortunately, I got the message "Data [ Packet size limited during capture] and did not find any MAC addresses. in Wireshark.

Ah thanks for opening the issue.
Sometimes some bytes are beeing dropped, not sure when this happens in the code but I'm working on a new script for the Esp32 anyway, which is waaaay more stable.
(this one is here really just was a quick and dirty proof of concept).

So easiest thing would probably to invite you to the currently private repo, so you can build your human sensor ;)

Hi gyus, after remove this check
#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

work pretty well !

bcgav commented

Possible to get an invite to the private repo? Working on a similar project. Thanks.

It's already released :)
https://github.com/spacehuhn/PacketMonitor32/

(though I have to rework a bit of the code but I want to finish my deauther 2.0 first)

bcgav commented

Thanks!

I love https://github.com/spacehuhn/PacketMonitor32/, but it's not a perfect substitute for this project. It was useful to me to download the info as a straight up pcap file.

I think that the value of 4 bytes at

uint32_t snaplen = sizeof(int);
is too small. I suggest changing it to 0xFF for ESP32. It certainly doesn't have trouble keeping up in my tests here. SD wouldn't have any bandwidth issues, and serial Should be able to handle over 500 packets per second at the current baud rate.

P.S. Instead of messing with SD cards, I just used the serial port to save to a local file, and then imported that into wireshark. Worked like a charm!