0
\$\begingroup\$

Currently architecting a side-project idea I have that requires tcpdump on an Arduino 101. This will be my first project and just wondering if this is possible or if maybe I should get a Raspberry Pi?

I won the Arduino 101 at a hackathon so I already have it and I think I need to order an Ethernet Shield but want to ask before I order parts.

Update: hrm, it appears I will need to do the packet sniffing with possibly libpcap. Found example here https://www.tcpdump.org/sniffex.c

\$\endgroup\$
3
\$\begingroup\$

You are better off with a Raspberry Pi or a Beaglebone board, as either of those are full-blown computers that are directly running Linux variants. You would find that the standard implementation of tcpdump would directly work on them (if it's not already included in the base operating system).

The Arduino Ethernet shield is basically a separate processor that implements some portions of the Ethernet stack and repackages it in a way that the simple micro controller in the Arduino can easily access. It will not provide low-level access to the OSI protocol stack. So I doubt that you would be able to get access to the full IP package contents.

\$\endgroup\$
  • \$\begingroup\$ Much thanks, so if I did want to use the Arduino, I would have to do the sniffing in C (no Linux apps like tcpdump) and it is likely I wouldn't have access to the actual packets, correct? \$\endgroup\$ – Elijah Lynn Feb 18 at 22:23
  • 1
    \$\begingroup\$ @ElijahLynn that's correct. Unless the IC in the Ethernet shield provides that functionality, which I seriously doubt. \$\endgroup\$ – Edgar Brown Feb 18 at 22:31
  • 1
    \$\begingroup\$ @ElijahLynn You might be able to convert the tcpdump source code to work on the Arduino, if it can fit in the amount of memory it has. \$\endgroup\$ – immibis Feb 19 at 4:41
  • \$\begingroup\$ Thanks, I am going to go the Pi route for this prototype! \$\endgroup\$ – Elijah Lynn Feb 27 at 4:10
  • \$\begingroup\$ Beware that Ethernet on the Beaglebone only works on something like 60% of power-on's, due to a longstanding design bug with the circuitry around the PHY that TI has zero interest in fixing. \$\endgroup\$ – Chris Stratton Feb 27 at 5:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.