meshconsole 2.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,136 @@
1
+ # Meshtastic Tool - Git Ignore File
2
+ # Excludes database, logs, and other generated files from version control
3
+
4
+ # Database files
5
+ *.db
6
+ *.sqlite
7
+ *.sqlite3
8
+ meshtastic_messages.db
9
+
10
+ # Log files
11
+ *.log
12
+ *.log.*
13
+ meshtastic_tool.log
14
+ meshtastic_tool.log.*
15
+
16
+ # Python cache and compiled files
17
+ __pycache__/
18
+ *.py[cod]
19
+ *$py.class
20
+ *.so
21
+ .Python
22
+ build/
23
+ develop-eggs/
24
+ dist/
25
+ downloads/
26
+ eggs/
27
+ .eggs/
28
+ lib/
29
+ lib64/
30
+ parts/
31
+ sdist/
32
+ var/
33
+ wheels/
34
+ share/python-wheels/
35
+ *.egg-info/
36
+ .installed.cfg
37
+ *.egg
38
+ MANIFEST
39
+
40
+ # Virtual environments
41
+ venv/
42
+ env/
43
+ ENV/
44
+ env.bak/
45
+ venv.bak/
46
+ .venv/
47
+
48
+ # IDE and editor files
49
+ .vscode/
50
+ .idea/
51
+ *.swp
52
+ *.swo
53
+ *~
54
+ .DS_Store
55
+ Thumbs.db
56
+
57
+ # Configuration files with sensitive data (optional - uncomment if needed)
58
+ # config.ini
59
+ # .env
60
+
61
+ # Temporary files
62
+ *.tmp
63
+ *.temp
64
+ .cache/
65
+ .pytest_cache/
66
+
67
+ # OS generated files
68
+ .DS_Store
69
+ .DS_Store?
70
+ ._*
71
+ .Spotlight-V100
72
+ .Trashes
73
+ ehthumbs.db
74
+ Thumbs.db
75
+
76
+ # Backup files
77
+ *.bak
78
+ *.backup
79
+ *~
80
+
81
+ # Export files (generated by the tool)
82
+ meshtastic_data.json
83
+ meshtastic_data.csv
84
+ exports/
85
+
86
+ # Coverage reports
87
+ htmlcov/
88
+ .tox/
89
+ .coverage
90
+ .coverage.*
91
+ .cache
92
+ nosetests.xml
93
+ coverage.xml
94
+ *.cover
95
+ *.py,cover
96
+ .hypothesis/
97
+
98
+ # Jupyter Notebook
99
+ .ipynb_checkpoints
100
+
101
+ # pyenv
102
+ .python-version
103
+
104
+ # pipenv
105
+ Pipfile.lock
106
+
107
+ # PEP 582
108
+ __pypackages__/
109
+
110
+ # Celery stuff
111
+ celerybeat-schedule
112
+ celerybeat.pid
113
+
114
+ # SageMath parsed files
115
+ *.sage.py
116
+
117
+ # Environments
118
+ .env
119
+ .venv
120
+ env/
121
+ venv/
122
+ ENV/
123
+ env.bak/
124
+ venv.bak/
125
+
126
+ # mypy
127
+ .mypy_cache/
128
+ .dmypy.json
129
+ dmypy.json
130
+
131
+ # Pyre type checker
132
+ .pyre/
133
+
134
+ # pytype static type analyzer
135
+ .pytype/
136
+ CLAUDE.md
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 M9WAV
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,191 @@
1
+ Metadata-Version: 2.4
2
+ Name: meshconsole
3
+ Version: 2.2.0
4
+ Summary: A powerful CLI and web interface for Meshtastic mesh networking devices
5
+ Project-URL: Homepage, https://github.com/m9wav/MeshConsole
6
+ Project-URL: Repository, https://github.com/m9wav/MeshConsole
7
+ Project-URL: Issues, https://github.com/m9wav/MeshConsole/issues
8
+ Author-email: M9WAV <m9wav@hackers.uk>
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: amateur-radio,ham,lora,mesh,meshtastic,networking,radio
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Environment :: Web Environment
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Intended Audience :: End Users/Desktop
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Topic :: Communications
25
+ Classifier: Topic :: Communications :: Ham Radio
26
+ Requires-Python: >=3.9
27
+ Requires-Dist: flask-cors>=4.0.0
28
+ Requires-Dist: flask>=2.0.0
29
+ Requires-Dist: meshtastic>=2.0.0
30
+ Requires-Dist: protobuf>=3.20.0
31
+ Requires-Dist: pypubsub>=4.0.0
32
+ Requires-Dist: requests>=2.25.0
33
+ Provides-Extra: dev
34
+ Requires-Dist: build; extra == 'dev'
35
+ Requires-Dist: pytest>=7.0.0; extra == 'dev'
36
+ Requires-Dist: twine; extra == 'dev'
37
+ Description-Content-Type: text/markdown
38
+
39
+ <p align="center">
40
+ <img src="logo.png" alt="MeshConsole" width="400"/>
41
+ </p>
42
+
43
+ <p align="center">
44
+ <strong>A web-based monitoring and control dashboard for Meshtastic mesh networks.</strong>
45
+ </p>
46
+
47
+ <p align="center">
48
+ <a href="https://m9wav.uk/">m9wav.uk</a>
49
+ </p>
50
+
51
+ ---
52
+
53
+ So I got really into Meshtastic after picking up a couple of LoRa radios and wanted a way to monitor my mesh network from my computer. The official app is fine but I wanted something I could leave running on a server, log everything to a database, and maybe poke at later.
54
+
55
+ This started as a quick script and... well, it grew. Now it's got a web UI and everything. Figured I'd clean it up and share it.
56
+
57
+ ## What it does
58
+
59
+ - Connects to your Meshtastic device over **USB or TCP/IP** (WiFi)
60
+ - Logs all packets to a SQLite database
61
+ - Shows a live web dashboard with all the node activity
62
+ - Lets you send messages and run traceroutes from the web UI
63
+ - Exports your data to JSON/CSV if you want to analyze it elsewhere
64
+ - Auto-reconnects if the connection drops
65
+
66
+ The web interface shows positions on a map, telemetry data (battery, signal strength, etc), and you can see message history. Pretty handy for debugging mesh issues.
67
+
68
+ ## Setup
69
+
70
+ ```bash
71
+ pip install -r requirements.txt
72
+ cp config.example.ini config.ini
73
+ ```
74
+
75
+ Edit `config.ini` with your setup. The main thing is picking USB or TCP:
76
+
77
+ ```ini
78
+ [Device]
79
+ # "usb" for plugged-in device, "tcp" for network
80
+ connection_type = usb
81
+
82
+ # Only needed for TCP mode
83
+ ip = 192.168.1.100
84
+
85
+ # Usually leave blank for auto-detect, but you can specify
86
+ # serial_port = /dev/cu.usbserial-0001
87
+ ```
88
+
89
+ If you're using TCP, your device needs to have WiFi enabled and you need to know its IP.
90
+
91
+ ## Running it
92
+
93
+ **Listen for packets (with web interface):**
94
+ ```bash
95
+ python3 meshconsole.py listen --web
96
+ ```
97
+
98
+ Then open http://localhost:5050 in your browser.
99
+
100
+ **Just listen (no web):**
101
+ ```bash
102
+ python3 meshconsole.py listen --verbose
103
+ ```
104
+
105
+ **List nodes your device knows about:**
106
+ ```bash
107
+ python3 meshconsole.py nodes
108
+ ```
109
+
110
+ **Send a message:**
111
+ ```bash
112
+ python3 meshconsole.py send --dest !12345678 --message "hey there"
113
+ ```
114
+
115
+ **Traceroute to a node:**
116
+ ```bash
117
+ python3 meshconsole.py traceroute --dest !12345678
118
+ ```
119
+
120
+ You can also force USB or TCP mode from the command line regardless of what's in your config:
121
+
122
+ ```bash
123
+ python3 meshconsole.py listen --usb --web
124
+ python3 meshconsole.py nodes --usb --port /dev/cu.usbserial-0001
125
+ ```
126
+
127
+ ## The web dashboard
128
+
129
+ When you run with `--web`, you get a dashboard at port 5050. It shows:
130
+
131
+ - Live packet feed (updates automatically)
132
+ - Node list with signal info
133
+ - Map with positions (if nodes are reporting GPS)
134
+ - Stats about your network
135
+
136
+ There's a password for sending messages/traceroutes so you can leave the dashboard open without worrying about someone messing with your network. Set it in `config.ini` under `[Security]`. Leave `auth_password` blank if you don't care.
137
+
138
+ ## Files
139
+
140
+ After running for a while you'll have:
141
+ - `meshtastic_messages.db` - SQLite database with all your packets
142
+ - `meshtastic_tool.log` - Logs (rotates automatically)
143
+
144
+ The database is useful if you want to do your own analysis. The `packets` table has everything including the full raw packet data as JSON.
145
+
146
+ ## Exporting data
147
+
148
+ ```bash
149
+ python3 meshconsole.py export --format json
150
+ python3 meshconsole.py export --format csv
151
+ ```
152
+
153
+ Spits out `meshtastic_data.json` or `meshtastic_data.csv`.
154
+
155
+ ## Troubleshooting
156
+
157
+ **Can't connect via USB:**
158
+ - Make sure you have the right drivers (CP2102/CH340/etc)
159
+ - Check `ls /dev/cu.usb*` (Mac) or `ls /dev/ttyUSB*` (Linux) to see if the device shows up
160
+ - Try specifying the port explicitly with `--port`
161
+
162
+ **Can't connect via TCP:**
163
+ - Make sure WiFi is enabled on your Meshtastic device
164
+ - Check you can ping the IP
165
+ - The device uses port 4403 by default
166
+
167
+ **Web interface not loading:**
168
+ - Check if port 5050 is already in use
169
+ - Try a different port in `config.ini` under `[Web]`
170
+
171
+ **Seeing your own messages in the log:**
172
+ - Shouldn't happen - the tool auto-detects your local node and filters it out
173
+ - If it's not working, check the logs for the detected node ID
174
+
175
+ ## Dependencies
176
+
177
+ - meshtastic
178
+ - flask
179
+ - flask-cors
180
+ - protobuf
181
+ - pypubsub
182
+
183
+ All in `requirements.txt`.
184
+
185
+ ## License
186
+
187
+ MIT. Do whatever you want with it.
188
+
189
+ ---
190
+
191
+ Built by [M9WAV](https://m9wav.uk/). If you find bugs or have ideas, feel free to open an issue.
@@ -0,0 +1,153 @@
1
+ <p align="center">
2
+ <img src="logo.png" alt="MeshConsole" width="400"/>
3
+ </p>
4
+
5
+ <p align="center">
6
+ <strong>A web-based monitoring and control dashboard for Meshtastic mesh networks.</strong>
7
+ </p>
8
+
9
+ <p align="center">
10
+ <a href="https://m9wav.uk/">m9wav.uk</a>
11
+ </p>
12
+
13
+ ---
14
+
15
+ So I got really into Meshtastic after picking up a couple of LoRa radios and wanted a way to monitor my mesh network from my computer. The official app is fine but I wanted something I could leave running on a server, log everything to a database, and maybe poke at later.
16
+
17
+ This started as a quick script and... well, it grew. Now it's got a web UI and everything. Figured I'd clean it up and share it.
18
+
19
+ ## What it does
20
+
21
+ - Connects to your Meshtastic device over **USB or TCP/IP** (WiFi)
22
+ - Logs all packets to a SQLite database
23
+ - Shows a live web dashboard with all the node activity
24
+ - Lets you send messages and run traceroutes from the web UI
25
+ - Exports your data to JSON/CSV if you want to analyze it elsewhere
26
+ - Auto-reconnects if the connection drops
27
+
28
+ The web interface shows positions on a map, telemetry data (battery, signal strength, etc), and you can see message history. Pretty handy for debugging mesh issues.
29
+
30
+ ## Setup
31
+
32
+ ```bash
33
+ pip install -r requirements.txt
34
+ cp config.example.ini config.ini
35
+ ```
36
+
37
+ Edit `config.ini` with your setup. The main thing is picking USB or TCP:
38
+
39
+ ```ini
40
+ [Device]
41
+ # "usb" for plugged-in device, "tcp" for network
42
+ connection_type = usb
43
+
44
+ # Only needed for TCP mode
45
+ ip = 192.168.1.100
46
+
47
+ # Usually leave blank for auto-detect, but you can specify
48
+ # serial_port = /dev/cu.usbserial-0001
49
+ ```
50
+
51
+ If you're using TCP, your device needs to have WiFi enabled and you need to know its IP.
52
+
53
+ ## Running it
54
+
55
+ **Listen for packets (with web interface):**
56
+ ```bash
57
+ python3 meshconsole.py listen --web
58
+ ```
59
+
60
+ Then open http://localhost:5050 in your browser.
61
+
62
+ **Just listen (no web):**
63
+ ```bash
64
+ python3 meshconsole.py listen --verbose
65
+ ```
66
+
67
+ **List nodes your device knows about:**
68
+ ```bash
69
+ python3 meshconsole.py nodes
70
+ ```
71
+
72
+ **Send a message:**
73
+ ```bash
74
+ python3 meshconsole.py send --dest !12345678 --message "hey there"
75
+ ```
76
+
77
+ **Traceroute to a node:**
78
+ ```bash
79
+ python3 meshconsole.py traceroute --dest !12345678
80
+ ```
81
+
82
+ You can also force USB or TCP mode from the command line regardless of what's in your config:
83
+
84
+ ```bash
85
+ python3 meshconsole.py listen --usb --web
86
+ python3 meshconsole.py nodes --usb --port /dev/cu.usbserial-0001
87
+ ```
88
+
89
+ ## The web dashboard
90
+
91
+ When you run with `--web`, you get a dashboard at port 5050. It shows:
92
+
93
+ - Live packet feed (updates automatically)
94
+ - Node list with signal info
95
+ - Map with positions (if nodes are reporting GPS)
96
+ - Stats about your network
97
+
98
+ There's a password for sending messages/traceroutes so you can leave the dashboard open without worrying about someone messing with your network. Set it in `config.ini` under `[Security]`. Leave `auth_password` blank if you don't care.
99
+
100
+ ## Files
101
+
102
+ After running for a while you'll have:
103
+ - `meshtastic_messages.db` - SQLite database with all your packets
104
+ - `meshtastic_tool.log` - Logs (rotates automatically)
105
+
106
+ The database is useful if you want to do your own analysis. The `packets` table has everything including the full raw packet data as JSON.
107
+
108
+ ## Exporting data
109
+
110
+ ```bash
111
+ python3 meshconsole.py export --format json
112
+ python3 meshconsole.py export --format csv
113
+ ```
114
+
115
+ Spits out `meshtastic_data.json` or `meshtastic_data.csv`.
116
+
117
+ ## Troubleshooting
118
+
119
+ **Can't connect via USB:**
120
+ - Make sure you have the right drivers (CP2102/CH340/etc)
121
+ - Check `ls /dev/cu.usb*` (Mac) or `ls /dev/ttyUSB*` (Linux) to see if the device shows up
122
+ - Try specifying the port explicitly with `--port`
123
+
124
+ **Can't connect via TCP:**
125
+ - Make sure WiFi is enabled on your Meshtastic device
126
+ - Check you can ping the IP
127
+ - The device uses port 4403 by default
128
+
129
+ **Web interface not loading:**
130
+ - Check if port 5050 is already in use
131
+ - Try a different port in `config.ini` under `[Web]`
132
+
133
+ **Seeing your own messages in the log:**
134
+ - Shouldn't happen - the tool auto-detects your local node and filters it out
135
+ - If it's not working, check the logs for the detected node ID
136
+
137
+ ## Dependencies
138
+
139
+ - meshtastic
140
+ - flask
141
+ - flask-cors
142
+ - protobuf
143
+ - pypubsub
144
+
145
+ All in `requirements.txt`.
146
+
147
+ ## License
148
+
149
+ MIT. Do whatever you want with it.
150
+
151
+ ---
152
+
153
+ Built by [M9WAV](https://m9wav.uk/). If you find bugs or have ideas, feel free to open an issue.
@@ -0,0 +1,70 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "meshconsole"
7
+ version = "2.2.0"
8
+ description = "A powerful CLI and web interface for Meshtastic mesh networking devices"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ authors = [
12
+ { name = "M9WAV", email = "m9wav@hackers.uk" }
13
+ ]
14
+ keywords = ["meshtastic", "mesh", "networking", "lora", "radio", "ham", "amateur-radio"]
15
+ classifiers = [
16
+ "Development Status :: 4 - Beta",
17
+ "Environment :: Console",
18
+ "Environment :: Web Environment",
19
+ "Intended Audience :: Developers",
20
+ "Intended Audience :: End Users/Desktop",
21
+ "License :: OSI Approved :: MIT License",
22
+ "Operating System :: OS Independent",
23
+ "Programming Language :: Python :: 3",
24
+ "Programming Language :: Python :: 3.9",
25
+ "Programming Language :: Python :: 3.10",
26
+ "Programming Language :: Python :: 3.11",
27
+ "Programming Language :: Python :: 3.12",
28
+ "Topic :: Communications",
29
+ "Topic :: Communications :: Ham Radio",
30
+ ]
31
+ requires-python = ">=3.9"
32
+ dependencies = [
33
+ "meshtastic>=2.0.0",
34
+ "Flask>=2.0.0",
35
+ "Flask-CORS>=4.0.0",
36
+ "protobuf>=3.20.0",
37
+ "pypubsub>=4.0.0",
38
+ "requests>=2.25.0",
39
+ ]
40
+
41
+ [project.optional-dependencies]
42
+ dev = [
43
+ "pytest>=7.0.0",
44
+ "build",
45
+ "twine",
46
+ ]
47
+
48
+ [project.urls]
49
+ Homepage = "https://github.com/m9wav/MeshConsole"
50
+ Repository = "https://github.com/m9wav/MeshConsole"
51
+ Issues = "https://github.com/m9wav/MeshConsole/issues"
52
+
53
+ [project.scripts]
54
+ meshconsole = "meshconsole.core:main"
55
+
56
+ [tool.hatch.build.targets.sdist]
57
+ include = [
58
+ "/src/meshconsole",
59
+ "/README.md",
60
+ "/LICENSE",
61
+ ]
62
+
63
+ [tool.hatch.build.targets.wheel]
64
+ packages = ["src/meshconsole"]
65
+
66
+ [tool.hatch.build]
67
+ include = [
68
+ "src/meshconsole/**/*.py",
69
+ "src/meshconsole/templates/**",
70
+ ]
@@ -0,0 +1,13 @@
1
+ """
2
+ MeshConsole - A tool for interacting with Meshtastic devices.
3
+
4
+ Author: M9WAV
5
+ License: MIT
6
+ """
7
+
8
+ __version__ = "2.2.0"
9
+ __author__ = "M9WAV"
10
+
11
+ from meshconsole.core import MeshtasticTool, MeshtasticToolError, PacketSummary
12
+
13
+ __all__ = ["MeshtasticTool", "MeshtasticToolError", "PacketSummary", "__version__"]
@@ -0,0 +1,8 @@
1
+ """
2
+ Entry point for running meshconsole as a module: python -m meshconsole
3
+ """
4
+
5
+ from meshconsole.core import main
6
+
7
+ if __name__ == "__main__":
8
+ main()