You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Added a version indicator to the bottom of the Web Viewer
- Added ability to filter by packet type in Packet Capture Service.
- Improved mesh graph efficiency, added documentation for how to configure mesh graph calculations (or disable it) on lightweight nodes like Raspberry Pi Zero 2s.
- Simplify contact removal logic. Occasional errors will still occur until race condition in meshcore_py
- Improvements to documentation.
Copy file name to clipboardExpand all lines: docs/faq.md
+49Lines changed: 49 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,3 +27,52 @@ Without `--upgrade`, the script does *not* update the service file (systemd/laun
27
27
### How can I generate a custom command reference for my bot users?
28
28
29
29
See [Custom command reference website](command-reference-website.md): it explains how to use `generate_website.py` to build a single-page HTML from your config (with optional styles) and upload it to your site.
30
+
31
+
## Hardware and performance
32
+
33
+
### How do I run meshcore-bot on a Raspberry Pi Zero 2 W?
34
+
35
+
The Pi Zero 2 W has 512 MB of RAM. The bot and the web viewer are two separate
36
+
Python processes; together they use roughly 300 MB on a busy mesh, which leaves
37
+
little headroom. Follow the two steps below to keep things comfortable.
38
+
39
+
#### Step 1 — Run the bot only (saves ~150 MB)
40
+
41
+
The web viewer is optional. If you don't need the browser-based dashboard on
42
+
the Pi itself, disable it and access it from another machine instead:
43
+
44
+
```ini
45
+
[Web_Viewer]
46
+
enabled = false
47
+
auto_start = false
48
+
```
49
+
50
+
The bot continues to work normally; the web viewer just won't start on the Pi.
51
+
If you still want the dashboard, run the viewer on a desktop or server that
52
+
shares the same database file (see [MeshCore Bot Data Viewer](web-viewer.md)).
53
+
54
+
#### Step 2 — Tune the Mesh Graph (saves another 50–100 MB on busy meshes)
55
+
56
+
Even with the web viewer off, the Mesh Graph can grow large. Add the following
57
+
to the `[Path_Command]` section of your `config.ini`:
58
+
59
+
```ini
60
+
[Path_Command]
61
+
# Limit startup memory: only load edges seen in the last 7 days.
62
+
# Edges older than this have near-zero path confidence anyway.
63
+
graph_startup_load_days = 7
64
+
65
+
# Evict edges from RAM after 7 days without a new observation.
66
+
graph_edge_expiration_days = 7
67
+
68
+
# Write graph updates in batches rather than on every packet.
69
+
graph_write_strategy = batched
70
+
71
+
# If you don't use the !path command at all, disable graph capture
72
+
# entirely to eliminate the background thread and all graph overhead.
73
+
# graph_capture_enabled = false
74
+
```
75
+
76
+
These settings do not affect path prediction accuracy: edges older than a few
77
+
days carry negligible confidence due to the 48-hour recency half-life used by
Copy file name to clipboardExpand all lines: docs/packet-capture.md
+33-1Lines changed: 33 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,6 +85,37 @@ mqtt2_username = user
85
85
mqtt2_password = pass
86
86
```
87
87
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
+
88
119
### Topic Templates
89
120
90
121
Placeholders:
@@ -170,8 +201,9 @@ Common issues:
170
201
### No Packets Being Published
171
202
172
203
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
174
205
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
- Bot logs may show: `Web viewer integration failed: ...` or `Web viewer integration initialized`.
184
+
- If integration failed, the viewer subprocess is never started; fix the error shown (e.g. invalid `host` or `port` in config).
185
+
186
+
5. **Firewall**
187
+
- Many SBC images (e.g. Orange Pi, Armbian minimal) do **not** ship with a firewall; if `curl` to localhost works and `host = 0.0.0.0`, the blocker may be network (Wi‑Fi client isolation, different subnet, or router). Check from a device on the same LAN using `http://<PI_IP>:8080`.
188
+
- If your system uses **ufw**:
189
+
```bash
190
+
sudo ufw status
191
+
sudo ufw allow 8080/tcp
192
+
sudo ufw reload
193
+
```
194
+
- If `ufw` is not installed (e.g. `sudo: ufw: command not found`), you may have no host firewall—that’s common on embedded images. To allow the port with **iptables** (often available when ufw is not):
If this returns `200`, the viewer is running and the issue is binding or firewall. If you use `host = 0.0.0.0`, then try from another device: `http://<PI_IP>:8080`.
206
+
207
+
7. **Standalone run (no bot)**
208
+
- To rule out bot integration issues, start the viewer by itself (same config path so it finds the DB):
- If `restart_viewer.sh` is used, note it binds to `127.0.0.1` by default; for network access run the command above with `--host 0.0.0.0` or edit the script.
213
+
150
214
### Flask Not Found
151
215
```bash
152
-
pip3 install flask
216
+
pip3 install flask flask-socketio
153
217
```
154
218
155
219
### Database Not Found
@@ -158,7 +222,7 @@ pip3 install flask
158
222
159
223
### Port Already in Use
160
224
- Change the port in `config.ini` or stop the conflicting service
161
-
- Use `lsof -i :5000` to find what's using the port
225
+
- Use `ss -tlnp | grep 8080` or `lsof -i :8080` (if available) to find what's using the port
0 commit comments