Skip to content

Commit 2d6145b

Browse files
committed
document network capture
ArduPilot/ardupilot#30637
1 parent ef1a683 commit 2d6145b

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed

common/source/docs/common-advanced-configuration.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ tuning options for the vehicle.
5555
EKF Affinity & Lane Switching <common-ek3-affinity-lane-switching>
5656
EKF Sources and Selection <common-ekf-sources>
5757
Ethernet/Network Setup <common-network>
58+
Network Capture <common-network-capture>
5859
[site wiki="copter,rover,sub"]
5960
Fence Failsafes <common-geofencing-landing-page>
6061
[/site]
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
.. _common-network-capture:
2+
3+
=====================
4+
Network Packet Capture
5+
=====================
6+
7+
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.
8+
9+
Overview
10+
--------
11+
12+
When enabled, packets handled by the networking stack are written to capture files on the microSD card:
13+
14+
- **Ethernet:** ``eth0.cap``
15+
- **PPP:** ``pppN.cap`` (e.g. ``ppp0.cap`` for the first PPP interface)
16+
17+
Capture can be enabled or disabled at runtime by toggling a bit in the :ref:`NETWORK_OPTIONS <parameter-NETWORK_OPTIONS>` parameter — no reboot required.
18+
19+
Build Requirement
20+
-----------------
21+
22+
This feature must be included in your firmware build:
23+
24+
1. Use the `ArduPilot Custom Build Server <https://custom.ardupilot.org/>`__.
25+
2. Under **Networking**, enable **NetworkCapture**.
26+
3. Download and flash the resulting firmware to your flight controller.
27+
28+
Enabling Capture
29+
----------------
30+
31+
1. Confirm your firmware was built with **NetworkCapture** enabled.
32+
2. Set bit **7** of the :ref:`NETWORK_OPTIONS<NETWORK_OPTIONS>` bitmask.
33+
3. Capture starts immediately; **no reboot is required**.
34+
4. To stop capture, **unset** bit 7.
35+
36+
Files & Formats
37+
---------------
38+
39+
- **Location:** Root of the flight controller’s microSD card (e.g. ``eth0.cap``, ``ppp0.cap``).
40+
- **Format:** ``pcap`` (compatible with Wireshark/tcpdump).
41+
42+
Notes & Caveats
43+
---------------
44+
45+
- Capturing can increase CPU and I/O load; enable only when debugging.
46+
- Ensure the microSD card has sufficient free space and is functioning reliably.
47+
- PPP captures are per-interface (``ppp0.cap``, ``ppp1.cap``, …).

common/source/docs/common-network.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,3 +166,7 @@ Example Ethernet Connected Vehicle System
166166

167167
Ethernet Connected ArduPilot Vehicle Example <common-ethernet-vehicle>
168168

169+
Network Capture
170+
===============
171+
172+
In ArduPilot 4.7.x and later you can enable :ref:`network capture <common-network-capture>`

0 commit comments

Comments
 (0)