Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
meshtastic-client_*.deb
meshtastic-client_*.rpm
/tmp/
12 changes: 12 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# AGENT Instructions for Meshtastic Linux Client

## Required Checks
- Run `flake8` for style and syntax errors.
- Execute `bandit -r . -n 5` for basic security scanning.
- Validate markdown docs with `mdl README.md docs/README.md`.
- Build packaging artifacts using:
- `fpm -s dir -t deb -n meshtastic-client -v 1.0 --prefix=/opt/meshtastic-linux-client .`
- `fpm -s dir -t rpm -n meshtastic-client -v 1.0 --prefix=/opt/meshtastic-linux-client .`

## Pull Request Notes
Summarize significant changes and include the test results output. If package or test commands fail due to missing dependencies or network limits, mention that in the Testing section.
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ A full-featured Linux desktop client for Meshtastic radios.
Built with ❤️ by [KAUNIX].

## Features

- Bluetooth scan and connect
- Chat messaging with timestamps
- Per-channel and per-message AES encryption
Expand All @@ -15,22 +16,36 @@ Built with ❤️ by [KAUNIX].
- Chat export

## Installation

```bash
sudo apt install python3-pip
pip3 install -r requirements.txt
python3 main.py
```

## Screenshots

# Screenshots
### Main Chat Window

## Main Chat Window
![Main Chat](screenshots/main_chat_window.png)

## Mesh Map
### Mesh Map

![Mesh Map](screenshots/mesh_map.png)

## Settings Panel
### Settings Panel

![Settings](screenshots/settings_panel.png)

## Node Info Window
### Node Info Window

![Node Info](screenshots/node_info_window.png)

## Packaging

Run `./build_packages.sh` to create `.deb` and `.rpm` packages for release.

## Contributing

See [AGENTS.md](AGENTS.md) for required tests and packaging steps
before submitting pull requests.
3 changes: 2 additions & 1 deletion backend/bluetooth_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
Handles Bluetooth scanning and connecting to Meshtastic devices.
"""


import asyncio
import bleak
import meshtastic.ble_interface


class BluetoothHandler:
"""Handles scanning for Bluetooth devices and connecting."""

Expand Down Expand Up @@ -44,4 +46,3 @@ def disconnect(self):
if self.interface:
asyncio.run(self.interface.close())
self.interface = None

3 changes: 2 additions & 1 deletion backend/message_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
Handles sending and receiving chat messages through Meshtastic.
"""


import asyncio
from threading import Thread


class MessageHandler:
"""Handles sending and receiving text messages."""

Expand Down Expand Up @@ -49,4 +51,3 @@ def _run_forever(self):
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
loop.run_forever()

7 changes: 7 additions & 0 deletions build_packages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -e
VERSION=${1:-1.0}
PREFIX=/opt/meshtastic-linux-client

fpm -s dir -t deb -n meshtastic-client -v "$VERSION" --prefix="$PREFIX" .
fpm -s dir -t rpm -n meshtastic-client -v "$VERSION" --prefix="$PREFIX" .
14 changes: 8 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,21 @@ Built for Linux Mint, Ubuntu, Debian — Secure, Off-Grid Communications.
## 🚀 Quick Start

1. Clone the repository:

```bash
git clone https://github.com/YOUR_USERNAME/meshtastic-linux-client.git
cd meshtastic-linux-client
```

2. Install dependencies:
1. Install dependencies:

```bash
sudo apt install python3-pip
pip3 install -r requirements.txt
```

3. Run the app:
1. Run the app:

```bash
python3 main.py
```
Expand Down Expand Up @@ -53,10 +56,10 @@ Built for Linux Mint, Ubuntu, Debian — Secure, Off-Grid Communications.

| Issue | Fix |
|:---|:---|
| App won't launch | Make sure all Python dependencies are installed (`pip3 install -r requirements.txt`) |
| Bluetooth not finding nodes | Ensure your device is advertising over BLE and that Linux Bluetooth services are active |
| App won't launch | Install deps with `pip3 install -r requirements.txt` |
| Bluetooth not finding nodes | Enable BLE ads and check the Bluetooth service |
| Mesh map empty | Check that multiple nodes are powered and linked |
| Message decryption fails | Verify you have the correct encryption key for that channel |
| Message decryption fails | Verify the correct key is set for that channel |

---

Expand All @@ -72,4 +75,3 @@ Pull Requests welcome!
Open an Issue to report bugs, suggest features, or just say hi!

---

4 changes: 3 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
Launches the main PyQt6-based Meshtastic Linux Client GUI.
"""


import sys
from PyQt6 import QtWidgets
from ui.main_window import MainWindow


def main():
"""Main entry point."""
app = QtWidgets.QApplication(sys.argv)
Expand All @@ -16,6 +18,6 @@ def main():
window.show()
sys.exit(app.exec())


if __name__ == "__main__":
main()

3 changes: 2 additions & 1 deletion ui/advanced_settings_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
Provides access to radio transmission settings (power, interval, modem config).
"""


from PyQt6 import QtWidgets


class AdvancedSettingsWindow(QtWidgets.QWidget):
"""Window for advanced radio settings."""

Expand All @@ -25,4 +27,3 @@ def setup_ui(self):
layout.addRow("TX Power (dBm):", self.tx_power)
layout.addRow("Broadcast Interval (s):", self.broadcast_interval)
self.setLayout(layout)

3 changes: 2 additions & 1 deletion ui/firmware_update_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
Allows users to upload and flash new firmware to Meshtastic devices.
"""


from PyQt6 import QtWidgets


class FirmwareUpdateWindow(QtWidgets.QWidget):
"""Window for firmware updates."""

Expand All @@ -23,4 +25,3 @@ def setup_ui(self):
layout.addWidget(self.choose_file_button)
layout.addWidget(self.flash_button)
self.setLayout(layout)

18 changes: 15 additions & 3 deletions ui/main_window.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
"""
Main Window

Defines the main application window, containing sidebar buttons, chat display, device list, and chat input.
Defines the main application window, containing sidebar buttons, chat display,
device list, and chat input.
"""

from PyQt6 import QtWidgets, QtCore, QtGui
from PyQt6 import QtWidgets


class MainWindow(QtWidgets.QMainWindow):
"""Main window for the Meshtastic Linux Client."""
Expand All @@ -13,5 +15,15 @@ def __init__(self):
super().__init__()
self.setWindowTitle("Meshtastic Linux Client")
self.resize(1000, 700)
self.setup
self.setup_ui()

def setup_ui(self):
"""Configure top-level widgets."""
central = QtWidgets.QWidget()
layout = QtWidgets.QVBoxLayout(central)
self.chat_display = QtWidgets.QTextEdit()
self.device_list = QtWidgets.QListWidget()
layout.addWidget(self.chat_display)
layout.addWidget(self.device_list)
self.setCentralWidget(central)

3 changes: 2 additions & 1 deletion ui/mesh_map_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
Visualizes the connected Meshtastic mesh network topology.
"""


from PyQt6 import QtWidgets


class MeshMapWindow(QtWidgets.QWidget):
"""Window displaying mesh network map."""

Expand All @@ -21,4 +23,3 @@ def setup_ui(self):
self.map_canvas = QtWidgets.QLabel("Mesh Map Visualization Here (WIP)")
layout.addWidget(self.map_canvas)
self.setLayout(layout)

3 changes: 2 additions & 1 deletion ui/node_info_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
Displays information about the connected Meshtastic device.
"""


from PyQt6 import QtWidgets


class NodeInfoWindow(QtWidgets.QWidget):
"""Window showing node firmware, hardware info."""

Expand All @@ -23,4 +25,3 @@ def setup_ui(self):
layout.addRow("Firmware Version:", self.firmware_label)
layout.addRow("Hardware Model:", self.hardware_label)
self.setLayout(layout)

3 changes: 2 additions & 1 deletion ui/settings_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
Provides an interface for user-configurable settings.
"""


from PyQt6 import QtWidgets


class SettingsWindow(QtWidgets.QWidget):
"""Window for application settings."""

Expand All @@ -21,4 +23,3 @@ def setup_ui(self):
self.dark_mode_toggle = QtWidgets.QCheckBox("Enable Dark Mode")
layout.addWidget(self.dark_mode_toggle)
self.setLayout(layout)