Skip to content

Commit 99f4ed3

Browse files
committed
Add packet type filtering documentation to packet-capture.md
1 parent 5d79f41 commit 99f4ed3

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

docs/packet-capture.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,37 @@ mqtt2_username = user
8585
mqtt2_password = pass
8686
```
8787

88+
#### Filtering by packet type
89+
90+
You can limit which packet types are uploaded to each broker with `mqttN_upload_packet_types`. Use a comma-separated list of type numbers; if unset or empty, all packet types are uploaded.
91+
92+
```ini
93+
# Only upload text messages and adverts to this broker
94+
mqtt1_upload_packet_types = 2, 4
95+
96+
# Broker 2 gets everything (default)
97+
# mqtt2_upload_packet_types =
98+
```
99+
100+
**Packet type reference:**
101+
102+
| Type | Name | Description |
103+
|------|------------|--------------------|
104+
| 0 | REQ | Request |
105+
| 1 | RESPONSE | Response |
106+
| 2 | TXT_MSG | Text message |
107+
| 3 | ACK | Acknowledgment |
108+
| 4 | ADVERT | Advertisement |
109+
| 5 | GRP_TXT | Group text |
110+
| 6 | GRP_DATA | Group data |
111+
| 7 | ANON_REQ | Anonymous request |
112+
| 8 | PATH | Path |
113+
| 9 | TRACE | Trace |
114+
| 10 | MULTIPART | Multipart |
115+
| 11–15| Type11–RAW_CUSTOM | Other types |
116+
117+
Packets that are excluded by this filter are still written to the output file (if configured) and still counted; they are only skipped for MQTT upload to that broker. Debug logs will show "Skipping" for those packets.
118+
88119
### Topic Templates
89120

90121
Placeholders:
@@ -170,8 +201,9 @@ Common issues:
170201
### No Packets Being Published
171202

172203
1. **Verify MQTT connection** - Check logs for "Connected to MQTT broker"
173-
2. **Check packet count** - Service logs "Captured packet #N" for each packet
204+
2. **Check packet count** - Service logs "Captured packet #N" (or "Skipping packet #N" when filtered) for each packet
174205
3. **Verify topics** - Ensure topics match broker expectations
206+
4. **Check upload filter** - If `mqttN_upload_packet_types` is set, only those types are uploaded. DEBUG Logs show "packet type X not in [Y, Z]" when a packet is skipped
175207

176208
---
177209

0 commit comments

Comments
 (0)