-
Notifications
You must be signed in to change notification settings - Fork 0
Home
🇫🇷 French below — Version française plus bas
Meshtastic Backup & fleet Manager is a Python graphical tool (Tkinter) that allows you to back up, restore, and deploy the complete configuration of Meshtastic devices via a USB/serial connection.
It is intended for administrators of Meshtastic node fleets who want to manage their configurations in a reproducible, secure way without needing to use the command line.
Author : zinfab69_fr@yahoo.fr Version : 1.2 Language : Python 3.10+ Interface: Tkinter (native Windows/Linux/macOS GUI) Format : Standalone EXE (PyInstaller) or direct Python script
I’m not a software developer by training. This tool was built with the help of an AI and a lot of work on my side to design, test, and refine it. If you’re a developer and would like to contribute, any help to keep this project alive and evolving is greatly appreciated.

Required software:
- Python 3.10 or higher
- meshtastic (pip install meshtastic)
- pyserial (pip install pyserial)
- protobuf (pip install protobuf)
Hardware:
- Meshtastic device with firmware 2.x minimum
- USB data cable (not a charge‑only cable)
- Available COM port (COM1 is automatically excluded — Windows system port)
Installation from source: pip install meshtastic pyserial protobuf python meshtastic_config_manager_v1.1.py
Installation from EXE: Run meshtastic_config_manager_v1.1.exe directly No Python installation required. USER INTERFACE
The interface is organized in two main tabs and is EN and FR:
- “Main” tab: all management operations
- “Help” tab: built‑in usage guide
The language choice persists through the creation of an MBFM.json file alongside the executable
- The list of COM ports is detected automatically at startup
- COM1 is systematically excluded (Windows system port, never a USB device)
- The first available port is pre‑selected
- Click “Detect ports” to refresh the list
- Leaving the field empty = automatic scan of all ports

- Default: application folder
- “Choose folder” button to change the location
- “Open folder” button to open Windows Explorer

Displays all JSON files in the working directory with:
- File name
- Export date
- Source device (long_name)
- Type (full backup or fleet profile)
- LoRa region
- Modem preset[^1]
Buttons available for the selected file:
- Refresh : reload the list
- View content : display formatted JSON
- Edit key fields : modify essential fields (region, modem, owner)
- Copy file : copy the JSON file to another folder
- Delete : delete the file
- Choose another file : browse folders to select a JSON
- Plug in the device and select the COM port
- Click “EXPORT FULL CONFIG → JSON”
- The device is read first
- A save dialog opens with an automatically suggested name File name format: meshtastic_NAME_XXXX_YYYYMMDD_HHMMSS.json where NAME = device short_name, XXXX = last 4 hex of MAC address Example: meshtastic_JMC_5F7B_20260509_095500.json
- The JSON file is saved in the working directory
Lets you export several devices one after another without restarting the tool.
- Click “Multi‑node export (sequential)”
- A dialog opens for each node:
- Select the device’s COM port (COM1 automatically excluded)
- “Detect” button to refresh the port list
- Click “Export this node”
- The device is read, then a save dialog opens with an automatically suggested file name (short_name + hex MAC)
- Click “Skip” to skip a node
- Click “Finish” to end the session
The JSON file contains the following sections:
_export_date : export date/time _app_version : software version _schema_version : JSON schema version
owner : device information long_name : long name (e.g. “Jean‑Marc”) short_name : short name + hex MAC (e.g. “JMC_5F7B”) hw_model : hardware model (e.g. “TLORA_V2_1_1P6”)
local_config : full local configuration lora : radio parameters (region, modem preset, frequency, etc.) bluetooth : BT enabled/disabled, PIN, mode network : WiFi SSID/PSK, NTP, Ethernet display : brightness, sleep, rotation position : GPS, smart position, broadcast power : power, sleep, charging device : device mode, role, debug security : public key, private key, admin_key, flags
module_config : software modules mqtt, serial, range_test, telemetry, cannedmessage, audio, remotehardware, neighborinfo, ambientlighting, detectionsensor, paxcounter[^1]
channels : communication channels (0 to 7) index : channel number (0 = primary) settings.name : channel name settings.psk : AES‑256 encryption key (32‑byte hex) or “01” (default) settings.module_settings.position_precision : shared GPS precision role : 1=PRIMARY, 2=SECONDARY, 0=DISABLED
known_nodes : list of known mesh nodes
my_info : raw local node information metadata : firmware metadata
The fleet profile is a stripped‑down version of a configuration, deployable on any node in the fleet.
Elements removed from the fleet profile:
- owner (long_name, short_name, hw_model)
- security.public_key and security.private_key (each node must keep its own unique key pair)
- network.wifi_ssid and network.wifi_psk
- my_info, metadata, known_nodes
- Internal version counters
Elements kept:
- security.admin_key (shared across the fleet)
- All LoRa configuration (region, preset, frequency, etc.)
- All channels with their PSK keys
- Modules, display, BT, position, power, device
Generation:
- Select a backup file in the list
- Click “GENERATE FLEET PROFILE”
- The file is saved with the _fleet.json suffix
- Select the JSON file in the list
- Plug in the device and check the COM port
- Click “RESTORE selected file → Device”
- A confirmation appears showing: file name, type, date, source device
- Restore runs section by section
- A detailed log is displayed at the end
- Restart the device to apply changes
Deploys the same JSON file to several devices in succession. Uses the file selected in the list (same as single restore).
- Select the JSON file in the list
- Click “Multi‑node import”
- For each device:
- Plug in the device
- Select its COM port (COM1 automatically excluded)
- Click “Restore this node”
- Click “Skip” to skip a node
- Click “Finish” when all nodes are processed
- Restart each device to apply changes
Fleet profile note: private_key and public_key are not restored (they are absent from the profile), each node keeps its own keys. The shared admin_key is restored on all nodes.
Before any restore, the file is automatically checked:
- Presence of sections local_config and local_config.lora
- Presence of the channels section
- Consistency of the LoRa config (region, modem_preset)
If a problem is detected, a warning is displayed. The user can cancel or force the restore despite the warning.
Channels are restored in this order:
- Secondary channels (role=2) first
- Primary channel (role=1) last
This order matters: writing the primary channel last prevents the firmware from resetting its configuration when writing subsequent channels.
For each channel, the following are restored:
- Channel name
- Role (PRIMARY / SECONDARY / DISABLED)
- PSK key (AES‑256, 32 bytes) — guaranteed full restore
- module_settings (position_precision, is_muted)
The PSK is stored in hexadecimal in the JSON and converted to bytes during restore. The value “01” corresponds to the Meshtastic default key (unencrypted channel with a known public key).
public_key : restored from a full backup private_key : restored from a full backup (absent from fleet profiles — each node has its own pair) admin_key : always restored (backup AND fleet profile)
The keys allow remote administration of the device. A full backup allows a complete restore including remote administration capability.
The “Edit key fields” button (between “View content” and “Copy file”) lets you modify essential fields of a JSON file without an external editor:
- Long name (long_name)
- Short name (short_name)
- LoRa region
- Modem preset
- Channels (names)
Changes are saved directly into the selected JSON file.
Exported files follow this automatic format: meshtastic_[short_name][YYYYMMDD][HHMMSS].json
Example: meshtastic_JMC_5F7B_20260509_095500.json
The short_name includes the last four hexadecimal characters of the device MAC address, which lets you uniquely identify each node even if two devices share the same user short_name.
If retrieving the name fails, the fallback format is: meshtastic_backup_[YYYYMMDD]_[HHMMSS].json
If a key is missing from the JSON (for example adc_multiplier removed manually), the value present on the device remains unchanged during restore. This is the standard behavior of the protobuf protocol: missing fields are not reset to zero.
Warning: a field present with the default value of the type (0, false, “”) can in some cases be ignored by protobuf — deleting the line is safer to preserve an existing value.
pyinstaller --onefile --windowed meshtastic_config_manager_v1.1.py
The EXE generated in dist/ is standalone and does not require Python to be installed. Typical size: 30 to 60 MB depending on bundled dependencies.
No COM port detected → Check the USB cable (data cable, not charge‑only) → Check CH340/CP2102/FTDI drivers depending on model → Leave the port field empty for automatic scan
owner section empty in JSON → Wait 2–3 seconds after plugging in before exporting → Firmware may take a few seconds to initialize node info
A channel’s PSK is “01” after restore → Check that the JSON file actually contains a 32‑byte PSK (64 hex chars) → Write secondary channels before the primary one — handled automatically in v1.1
hw_model empty → Firmware too old (< 2.3) or model not recognized in protobuf enum → No functional impact
“Cannot import protobuf” error → pip install --upgrade protobuf meshtastic
-
🌐 FR/EN bilingual system
- FR/EN selector in header (radio buttons)
- Language persistence in
config.json(EN default) - Instant switch, no restart
- Full help translated (13 sections)
-
📐 Portable screen optimized UI
- Window
860x780(was840x900) - Export/Restore buttons side by side
- Window
-
📊 Enhanced file table
- New "Modem" column (readable preset)
-
Resizable columns (
minwidth) -
Click-to-sort headers (
▲▼)
-
🐛 Fixes
- Multi-node export (
ln_rawbug)
- Multi-node export (
- "Modem" column + table improvements
- Side-by-side buttons + portable screen
- Multi-node export fixed
- 📥 Multi-node import (batch deployment)
- 🚀 Fleet Profile (stripped config)
- ✏ Key fields editor (owner/LoRa/channels)
- 👁 Integrated JSON viewer
- 📋 File copy/delete
- 🔍 Auto USB port detection (COM1 excluded)
Meshtastic Config Manager est un outil graphique Python (Tkinter) permettant de sauvegarder, restaurer et déployer la configuration complète d'appareils Meshtastic via liaison USB/série.
Il s'adresse aux administrateurs de flottes de nœuds Meshtastic souhaitant gérer leurs configurations de manière reproductible, sécurisée et sans nécessiter de ligne de commande.
Auteur : Zifnab69_fr@yahoo.fr Version : 1.2 Langage : Python 3.10+ Interface: Tkinter (GUI native Windows/Linux/macOS) Format : EXE autonome (PyInstaller) ou script Python direct
Je ne suis absolument pas développeur de formation. Ce logiciel a été conçu avec l’aide d’une IA et beaucoup d’efforts de ma part pour le penser, le tester et l’améliorer. Si vous êtes développeur et que vous souhaitez contribuer, toute aide sera la bienvenue pour faire vivre et progresser ce projet.

Logiciels requis :
- Python 3.10 ou supérieur
- meshtastic (pip install meshtastic)
- pyserial (pip install pyserial)
- protobuf (pip install protobuf)
Matériel :
- Appareil Meshtastic avec firmware 2.x minimum
- Câble USB data (pas un câble charge seul)
- Port COM disponible (COM1 est automatiquement exclu — port système Windows)
Installation depuis le source : pip install meshtastic pyserial protobuf python meshtastic_config_manager_v1.1.py
Installation depuis l'EXE : Lancer directement meshtastic_config_manager_v1.1.exe Aucune installation Python requise.
L'interface est organisée en deux onglets principaux en anglais ou en français:
- Onglet "Principal" : toutes les opérations de gestion
- Onglet "Aide" : guide d'utilisation intégré Le choix de la langue persiste par la création d'un fichier MBFM.json au niveau de l'exécutable

- La liste des ports COM est détectée automatiquement au démarrage
- COM1 est systématiquement exclu (port système Windows, jamais un appareil USB)
- Le premier port disponible est pré-sélectionné
- Cliquer "Détecter ports" pour actualiser la liste
- Laisser le champ vide = scan automatique de tous les ports

- Par défaut : dossier de l'application
- Bouton "Choisir dossier" pour changer l'emplacement
- Bouton "Ouvrir dossier" pour ouvrir l'explorateur Windows
Affiche tous les fichiers JSON du dossier de travail avec : - Nom du fichier - Date d'export - Appareil source (long_name) - Type (backup complet ou profil flotte) - Région LoRa - Preset modem

Boutons disponibles sur le fichier sélectionné : - Actualiser : recharger la liste - Voir contenu : afficher le JSON formaté - Éditer champs clés : modifier les champs essentiels (région, modem, owner) - Copier fichier : copier le fichier JSON dans un autre dossier - Supprimer : supprimer le fichier - Choisir un autre fichier : parcourir les dossiers pour sélectionner un JSON
- Brancher l'appareil et sélectionner le port COM
- Cliquer "EXPORTER CONFIG COMPLÈTE → JSON"
- L'appareil est lu en premier
- Une boîte de sauvegarde s'ouvre avec un nom suggéré automatiquement Format du nom : meshtastic_NOM_XXXX_YYYYMMDD_HHMMSS.json où NOM = short_name de l'appareil, XXXX = 4 derniers hex de l'adresse MAC Exemple : meshtastic_JMC_5F7B_20260509_095500.json
- Le fichier JSON est sauvegardé dans le dossier de travail
Permet d'exporter plusieurs appareils l'un après l'autre sans redémarrer l'outil.
- Cliquer "Export multi-nœuds (séquentiel)"
- Une boîte de dialogue s'ouvre pour chaque nœud :
- Sélectionner le port COM de l'appareil (COM1 exclu automatiquement)
- Bouton "Détecter" pour rafraîchir la liste des ports
- Cliquer "Exporter ce nœud"
- L'appareil est lu, puis une boîte de sauvegarde s'ouvre avec le nom de fichier suggéré automatiquement (short_name + hex MAC)
- Cliquer "Passer" pour sauter un nœud
- Cliquer "Terminer" pour clore la session
Le fichier JSON contient les sections suivantes :
_export_date : date/heure de l'export _app_version : version du logiciel _schema_version : version du schéma JSON
owner : informations sur l'appareil long_name : nom long (ex: "Jean-Marc") short_name : nom court + hex MAC (ex: "JMC_5F7B") hw_model : modèle matériel (ex: "TLORA_V2_1_1P6")
local_config : configuration locale complète lora : paramètres radio (région, modem preset, fréquence...) bluetooth : BT activé/désactivé, PIN, mode network : WiFi SSID/PSK, NTP, Ethernet display : luminosité, veille, rotation position : GPS, smart position, broadcast power : alimentation, sleep, charge device : mode appareil, rôle, debug security : clé publique, clé privée, admin_key, flags
module_config : modules logiciels mqtt, serial, range_test, telemetry, cannedmessage, audio, remotehardware, neighborinfo, ambientlighting, detectionsensor, paxcounter
channels : canaux de communication (0 à 7) index : numéro du canal (0 = primaire) settings.name : nom du canal settings.psk : clé de chiffrement AES-256 (hex 32 octets) ou "01" (défaut) settings.module_settings.position_precision : précision GPS partagée role : 1=PRIMARY, 2=SECONDARY, 0=DISABLED
known_nodes : liste des nœuds connus du réseau mesh
my_info : informations brutes du nœud local metadata : métadonnées firmware
Le profil flotte est une version épurée d'une configuration, déployable sur n'importe quel nœud de la flotte.
Éléments supprimés du profil flotte :
- owner (long_name, short_name, hw_model)
- security.public_key et security.private_key (chaque nœud doit conserver ses propres clés uniques)
- network.wifi_ssid et network.wifi_psk
- my_info, metadata, known_nodes
- Compteurs de version internes
Éléments conservés :
- security.admin_key (commune à toute la flotte)
- Toute la configuration LoRa (région, preset, fréquence...)
- Tous les canaux avec leurs clés PSK
- Modules, display, BT, position, power, device
Génération :
- Sélectionner un fichier backup dans la liste
- Cliquer "GÉNÉRER PROFIL FLOTTE"
- Le fichier est sauvegardé avec le suffixe _fleet.json
- Sélectionner le fichier JSON dans la liste
- Brancher l'appareil et vérifier le port COM
- Cliquer "RESTAURER le fichier sélectionné → Appareil"
- Une confirmation s'affiche avec : nom du fichier, type, date, appareil source
- La restauration s'effectue section par section
- Un log détaillé s'affiche à la fin
- Redémarrer l'appareil pour appliquer les changements
Déploie le même fichier JSON sur plusieurs appareils successivement. Utilise le fichier sélectionné dans la liste (identique à la restauration unique).
- Sélectionner le fichier JSON dans la liste
- Cliquer "Import multi-nœuds"
- Pour chaque appareil :
- Brancher l'appareil
- Sélectionner son port COM (COM1 exclu automatiquement)
- Cliquer "Restaurer ce nœud"
- Cliquer "Passer" pour sauter un nœud
- Cliquer "Terminer" quand tous les nœuds sont traités
- Redémarrer chaque appareil pour appliquer
Note profil flotte : les clés private_key et public_key ne sont pas restaurées (absentes du profil), chaque nœud conserve ses propres clés. L'admin_key commune est bien restaurée sur tous les nœuds.
Avant toute restauration, le fichier est automatiquement vérifié :
- Présence des sections local_config et local_config.lora
- Présence de la section channels
- Cohérence de la config LoRa (région, modem_preset)
En cas de problème détecté, un avertissement s'affiche. L'utilisateur peut annuler ou forcer la restauration malgré l'avertissement.
Les canaux sont restaurés dans cet ordre :
- Canaux secondaires (role=2) en premier
- Canal primaire (role=1) en dernier
Cet ordre est important : écrire le canal primaire en dernier empêche le firmware de réinitialiser sa configuration lors de l'écriture des canaux suivants.
Pour chaque canal sont restaurés :
- Nom du canal
- Rôle (PRIMARY / SECONDARY / DISABLED)
- Clé PSK (AES-256, 32 octets) — restauration complète garantie
- module_settings (position_precision, is_muted)
La PSK est stockée en hexadécimal dans le JSON et convertie en bytes lors de la restauration. La valeur "01" correspond à la clé par défaut Meshtastic (canal non chiffré avec clé publique connue).
public_key : restaurée depuis un backup complet private_key : restaurée depuis un backup complet (absente des profils flotte — chaque nœud a sa propre paire) admin_key : restaurée dans tous les cas (backup ET profil flotte)
Les clés permettent d'administrer l'appareil à distance. Un backup complet permet une restauration totale y compris la capacité d'administration à distance.
Le bouton "Éditer champs clés" (entre "Voir contenu" et "Copier fichier") permet de modifier les champs essentiels d'un fichier JSON sans éditeur externe :
- Nom long (long_name)
- Nom court (short_name)
- Région LoRa
- Modem preset
- Canaux (noms)
Les modifications sont sauvegardées directement dans le fichier JSON sélectionné.
Les fichiers exportés suivent ce format automatique : meshtastic_[short_name][YYYYMMDD][HHMMSS].json
Exemple : meshtastic_JMC_5F7B_20260509_095500.json
Le short_name inclut les 4 derniers caractères hexadécimaux de l'adresse MAC de l'appareil, ce qui permet d'identifier chaque nœud de manière unique, même si deux appareils ont le même short_name utilisateur.
En cas d'échec de récupération du nom, le format de repli est : meshtastic_backup_[YYYYMMDD]_[HHMMSS].json
Si une clé est absente du JSON (ex: adc_multiplier supprimé manuellement), la valeur présente dans l'appareil reste inchangée lors de la restauration. C'est le comportement standard du protocole protobuf : les champs absents ne sont pas remis à zéro.
Attention : une valeur présente avec la valeur par défaut du type (0, false, "") peut dans certains cas être ignorée par protobuf — supprimer la ligne est plus sûr pour préserver une valeur existante.
pyinstaller --onefile --windowed meshtastic_config_manager_v1.1.py
L'EXE généré dans dist/ est autonome et ne nécessite pas Python installé. Taille typique : 30 à 60 Mo selon les dépendances embarquées.
Aucun port COM détecté → Vérifier le câble USB (cable data, pas charge seule) → Vérifier les pilotes CH340/CP2102/FTDI selon le modèle → Laisser le champ port vide pour un scan automatique
Section owner vide dans le JSON → Attendre 2-3 secondes après branchement avant d'exporter → Le firmware peut mettre quelques secondes à initialiser les infos nœud
La PSK d'un canal est "01" après restauration → Vérifier que le fichier JSON contient bien une PSK de 32 octets (64 hex chars) → Écrire les canaux secondaires avant le primaire — géré automatiquement en v1.1
hw_model vide → Firmware trop ancien (< 2.3) ou modèle non reconnu dans l'enum protobuf → Sans impact fonctionnel
Erreur "Cannot import protobuf" → pip install --upgrade protobuf meshtastic
-
🌐 Système bilingue FR/EN
- Sélecteur FR/EN dans l'en-tête (boutons radio)
- Persistance langue dans
config.json(EN par défaut) - Changement instantané, sans redémarrage
- Aide complète traduite (13 sections)
-
📐 UI optimisée écran portable
- Fenêtre
860x780(vs840x900) - Boutons Export/Restore côte à côte
- Fenêtre
-
📊 Tableau fichiers amélioré
- Nouvelle colonne "Modem" (preset lisible)
- Colonnes redimensionnables (
minwidth) -
Tri cliquable (en-têtes
▲▼)
-
🐛 Corrections
- Export multi-nœuds (
ln_rawbug)
- Export multi-nœuds (
- Colonne "Modem" + tableau amélioré
- Boutons côte à côte + écran portable
- Export multi-nœuds corrigé
- Correction
NameError ln_rawdans export multi
- 📥 Import multi-nœuds (déploiement série)
- 🚀 Profil Flotte (config épurée)
- ✏ Éditeur champs clés (owner/LoRa/canaux)
- 👁 Viewer JSON intégré
- 📋 Copie/suppression fichiers
- 🔍 Détection ports USB auto (COM1 exclu)