Network Packet CaptureÂķ
ArduPilot can capture on-target network traffic for troubleshooting Ethernet and PPP links. Captures are written in standard pcap format and can be opened in tools such as Wireshark or tcpdump.
OverviewÂķ
When enabled, packets handled by the networking stack are written to capture files on the microSD card:
Ethernet:
eth0.capPPP:
pppN.cap(e.g.ppp0.capfor the first PPP interface)
Capture can be enabled or disabled at runtime by toggling bit 7 in the NET_OPTIONS parameter â no reboot required.
Build RequirementÂķ
This feature must be included in your firmware build even if it already has the networking features since, by default, it is only included for SITL:
Use the ArduPilot Custom Build Server.
Under Networking, enable NetworkCapture.
Download and flash the resulting firmware to your flight controller.
Enabling CaptureÂķ
Confirm your firmware was built with NetworkCapture enabled.
Set bit 7 of the NET_OPTIONS bitmask.
Capture starts immediately; no reboot is required.
To stop capture, unset bit 7.
Files & FormatsÂķ
Location: Root of the flight controllerâs microSD card (e.g.
eth0.cap,ppp0.cap).Format:
pcap(compatible with Wireshark/tcpdump).
Notes & CaveatsÂķ
Capturing can increase CPU and I/O load; enable only when debugging.
Ensure the microSD card has sufficient free space and is functioning reliably.
PPP captures are per-interface (
ppp0.cap,ppp1.cap, âĶ).