Skip to content
zifnab69 edited this page Jul 13, 2026 · 29 revisions

߇߇ French below — Version française plus bas


NODES BACKUP & FLEET MANAGER v1.9 User and Technical Documentation — Wiki

PRESENTATION

Nodes 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 : ZIFNAB69_fr@yahoo.fr Version : 1.9 Language : Python 3.10+ Interface: Tkinter (native Windows 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.

alt

PREREQUISITES

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 (tested up to 2.7.x — T-Echo, Heltec V3/V4)
  • 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 NBFM_V1.9.py

Installation from EXE: Run the .exe directly. No Python installation required.

USER INTERFACE

The interface is organized in two main tabs and is available in EN and FR:

  • "Main" tab: all management operations
  • "Help" tab: built-in usage guide

The language choice AND the last working directory are persisted in an NBFM_Config.json file created next to the executable. The COM port is not stored.

alt

COM port selection

  • 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

Working directory

  • Default: last used folder (persisted), otherwise the application folder
  • "Choose folder" button to change the location
  • "Open folder" button to open Windows Explorer

File list

alt

Displays all NBFM / JSON files (with .NBFM extension) in the working directory with:

  • File name
  • Export date
  • Source device (long_name)
  • Type (full backup or fleet profile)
  • LoRa region
  • Modem preset
  • Device role
  • Frequency (override_frequency if set, otherwise default frequency)
  • Channel names (0–1)

All columns are sortable by clicking the header (▲▼). Files are grouped by MAC (last 4 hex of the short_name). Right-click a file for a context menu; double-click to rename; hover for a tooltip; per-file notes are stored in NBFM_notes.json.

Buttons available for the selected file:

  • Refresh : reload the list
  • View content : display formatted JSON (with an "✏ Edit" toggle — see below)
  • Edit key fields : modify essential fields (see dedicated section)
  • Copy file : copy the JSON file to another folder
  • Delete : delete the file
  • Choose another file : browse folders to select a .NBFM
  • Export HTML report : generate a browsable HTML report of all NBFM files

EXPORT (READING FROM DEVICE)

Full config export

  1. Plug in the device and select the COM port
  2. Click "EXPORT FULL CONFIG → NBFM"
  3. The device is read first
  4. A save dialog opens with an automatically suggested name File name format: meshtastic_NAME_XXXX_YYYYMMDD_HHMMSS.NBFM where NAME = device short_name, XXXX = last 4 hex of the MAC address Example: meshtastic_JMC_5F7B_20260509_095500.NBFM
  5. The NBFM file is saved in the working directory

Multi-node export (sequential)

Lets you export several devices one after another without restarting the tool.

  1. Click "Multi-node export (sequential)"
  2. 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"
  3. The device is read, then a save dialog opens with an automatically suggested file name (short_name + hex MAC)
  4. Click "Skip" to skip a node
  5. Click "Finish" to end the session

alt

CONTENT OF THE EXPORTED JSON FILE

The NBFM file is plain JSON (readable and editable in any text editor) and contains the following sections:

_export_date : export date/time _app_version : software version (internal export schema)

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, override_frequency, override_duty_cycle, 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, adc_multiplier_override device : device mode, role, debug security : public key, private key, admin_key, flags

module_config : software modules — ALL modules present are exported and restored, including ones the UI does not expose (mqtt, serial, range_test, telemetry, canned_message, audio, remote_hardware, neighbor_info, ambient_lighting, detection_sensor, paxcounter, traffic_management, …)

channels : communication channels (0 to 7), always all 8 present index : channel number (0 = primary) settings.name : channel name settings.psk : AES-256 encryption key (32-byte hex) / AES-128 (16-byte) / "01" (default) / "" (disabled) settings.module_settings.position_precision : shared GPS precision role : 1=PRIMARY, 2=SECONDARY, 0=DISABLED

known_nodes : dict of known mesh nodes (keyed by !hex_node_id)

my_info : raw local node information metadata : firmware metadata

FLEET PROFILE

The fleet profile is a stripped-down version of a configuration, deployable on any node in the fleet.

alt

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, override_frequency, override_duty_cycle, etc.)
  • All channels with their PSK keys
  • Modules, display, BT, position, power, device
  • ADC (by default) — can be removed in "Edit key fields"

Generation:

  1. Select a backup file in the list
  2. Click "GENERATE FLEET PROFILE"
  3. The file is saved with the _fleet.NBFM suffix

RESTORE (WRITING TO DEVICE)

Single restore

  1. Select the NBFM file in the list
  2. Plug in the device and check the COM port
  3. Click "RESTORE selected file → Device"
  4. A confirmation appears showing: file name, type, date, source device
  5. Restore runs section by section, with a live progress window (owner → sections → modules → channels → final commit)
  6. A detailed, copyable log is displayed at the end
  7. Restart the device to apply changes

Multi-node import (serial deployment)

Deploys the same NBFM file to several devices in succession. Uses the file selected in the list (same as single restore).

  1. Select the NBFM file in the list
  2. Click "Multi-node import"
  3. For each device:
    • Plug in the device
    • Select its COM port (COM1 automatically excluded)
    • Click "Restore this node"
  4. Click "Skip" to skip a node
  5. Click "Finish" when all nodes are processed
  6. 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.

INTEGRITY CHECK

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.

CHANNEL RESTORE

Channels are restored in the canonical order used by the official Meshtastic CLI (setURL):

  1. Primary channel (role=1) FIRST (index 0)
  2. Secondary channels (role=2) next, by index
  3. Disabled channels (role=0) last (to purge any previous state)

Writing the primary channel first aligns with the firmware's own restore path and reliably injects secondary channels on recent firmwares. writeChannel() does not trigger a reboot.

After the commit, NBFM re-reads the channels (bounded 8 s poll) and, if any active channel was silently rejected by the device (PKI session key on non-blank nodes), it retries that channel once outside the transaction. If a channel still cannot be applied, a "factory reset advised" message is shown.

Note: after a commit the device often reboots on its own, which can prevent the automatic re-read. This is not an error — the channels are written; only the automatic verification needs the device to stay up.

For each channel, the following are restored:

  • Channel name
  • Role (PRIMARY / SECONDARY / DISABLED)
  • PSK key (AES-256 / AES-128) — full restore guaranteed
  • module_settings (position_precision, is_muted)

The PSK is stored in the NBFM and restored tolerantly (both hex and Base64 are accepted, disambiguated by decoded length 1/16/32 bytes). The value "01" / "AQ==" corresponds to the Meshtastic default key.

SECURITY KEY RESTORE

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.

EDITING KEY FIELDS

The "Edit key fields" button lets you modify essential fields of a NBFM file without an external editor. The editor is organized in two tabs.

"Main" tab

  • Owner: long name (long_name), short name (short_name)
  • LoRa: region (dropdown), modem preset (dropdown), override frequency in MHz (empty = remove override)
  • Override duty cycle (checkbox — bypass the EU868 1% legal limit)
  • Device role
  • ADC multiplier: editable field + per-device presets menu (ADC_DEFAULTS); leave empty to delete the key
  • Advanced cleanup (applied on save): remove all channels (keep only default Channel 0), remove known nodes (known_nodes)

alt

alt

"Channels" tab All 8 channels, each with:

  • "Enabled" checkbox → sets the role (SECONDARY if checked, DISABLED otherwise; channel 0 is PRIMARY and locked)
  • Channel name — typing a name auto-enables the channel
  • Encryption key (PSK) in Base64 — same format as the Meshtastic app
  • GPS precision (position_precision): NA / 23 km / … / 1 m
  • Encryption key generator with a size selector (Default / 128 bits / 256 bits); the generated key appears in a result field for copy/paste
    • Default: produces AQ== (Meshtastic public default key)
    • 128 bits: 16 random bytes (AES-128)
    • 256 bits: 32 random bytes (AES-256) alt

On save, the 8 channels are rebuilt with the correct role, active channels are compacted without gaps (primary at 0, secondaries packed at 1, 2, 3…), and PSK length is validated (a Base64 key must decode to 1/16/32 bytes, otherwise the save is blocked with a warning). Changes are saved directly into the selected NBFM file (a timestamped copy is made in Backup/ before overwriting).

VIEWING / EDITING RAW JSON

"View content" opens the formatted JSON. Tick the "✏ Edit" checkbox to unlock the text area and a "ߒ Save" button. The content is strictly validated with json.loads before writing (invalid JSON is refused), and a timestamped copy is made in Backup/ before overwriting.

alt

FILE NAMING

Exported files follow this automatic format: meshtastic_[short_name][YYYYMMDD][HHMMSS].NBFM

Example: meshtastic_JMC_5F7B_20260509_095500.NBFM

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].NBFM

BEHAVIOR WHEN A JSON FIELD IS MISSING

If a key is missing from the NBFM (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.

BUILDING THE EXECUTABLE

pyinstaller --onefile --windowed --name "NBFM" NBFM_V1.9.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.

TROUBLESHOOTING

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 NBFM → 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 NBFM file actually contains a valid PSK (16 or 32 bytes)

A secondary channel is missing after restore on a non-blank node → NBFM re-reads and retries automatically; if it still fails, a factory reset of the target is advised

hw_model empty → Firmware too old (< 2.3) or model not recognized in the protobuf enum → No functional impact

"Cannot import protobuf" error → pip install --upgrade protobuf meshtastic

CHANGELOG

v1.9

  • Two-tab key fields editor ("Main" + "Channels").
  • All 8 channels editable, each with an "Enabled" checkbox that sets the role; typing a name auto-enables the channel; active channels are compacted (no gaps) on save.
  • Per-channel GPS precision (position_precision) and ADC multiplier presets per device.
  • Robust channel injection: canonical order (primary first), post-commit verification and one automatic retry of channels silently rejected by the device.
  • PSK length validation in the editor (1/16/32 bytes).
  • Editable raw-JSON viewer ("✏ Edit" + "ߒ Save", strict validation, timestamped backup).
  • Copyable import logs.
  • Language and working directory persistence (NBFM_Config.json).
  • Tolerant PSK restore (hex or Base64), fixing a case where standard backups could wipe some channels' keys.

v1.8

  • Restore progress bar (single-node and multi-node).

v1.75

  • New "Frequency" column in the file list (override_frequency if set, otherwise frequency).
  • Key fields editor overhaul: LoRa region and modem preset became dropdowns; override frequency field; editable channel PSKs; redesigned key generator.

v1.3 (May 10, 2026)

  • FR/EN bilingual system with instant switch and persistence.
  • Portable-screen optimized UI; "Modem" column; click-to-sort headers.

v1.2 (May 09, 2026) — Initial source file

  • Multi-node import, Fleet Profile, key fields editor, integrated JSON viewer, file copy/delete, auto USB port detection (COM1 excluded).

Nodes Backup & Fleet Manager v1.9 Wiki — Documentation utilisateur et technique

PRÉSENTATION

Nodes Backup & Fleet 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.9 Langage : Python 3.10+ Interface: Tkinter (GUI native Windows) 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.

alt

PRÉREQUIS

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 (testé jusqu'à 2.7.x — T-Echo, Heltec V3/V4)
  • Câble USB data (pas un câble charge seule)
  • Port COM disponible (COM1 est automatiquement exclu — port système Windows)

Installation depuis le source : pip install meshtastic pyserial protobuf python NBFM_V1.9.py

Installation depuis l'EXE : Lancer directement NBFM.exe Aucune installation Python requise.

INTERFACE UTILISATEUR

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 ET le dernier dossier de travail sont conservés dans un fichier NBFM_Config.json créé au niveau de l'exécutable. Le port COM n'y est pas stocké.

alt

Sélection du port COM

  • 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

Dossier de travail

  • Par défaut : dernier dossier utilisé (persisté), sinon le dossier de l'application
  • Bouton "Choisir dossier" pour changer l'emplacement
  • Bouton "Ouvrir dossier" pour ouvrir l'explorateur Windows

Liste des fichiers

Affiche tous les fichiers NBFM 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 - Rôle de l'appareil - Fréquence (override_frequency si renseignée, sinon fréquence par défaut) - Noms des canaux 0 et 1

Toutes les colonnes sont triables par clic sur l'en-tête (▲▼). Les fichiers sont groupés par MAC (4 derniers hex du short_name). Clic droit pour un menu contextuel, double-clic pour renommer, survol pour une bulle d'info ; les notes par fichier sont dans NBFM_notes.json.

Boutons disponibles sur le fichier sélectionné : - Actualiser : recharger la liste - Voir contenu : afficher le JSON formaté (avec une case "✏ Éditer" — voir plus bas) - Éditer champs clés : modifier les champs essentiels (voir section dédiée) - Copier fichier : copier le fichier NBFM dans un autre dossier - Supprimer : supprimer le fichier - Choisir un autre fichier : parcourir les dossiers pour sélectionner un NBFM - Rapport HTML : générer un rapport HTML navigable de tous les fichiers NBFM

EXPORT (LECTURE DEPUIS L'APPAREIL)

Export config complète

  1. Brancher l'appareil et sélectionner le port COM
  2. Cliquer "EXPORTER CONFIG COMPLÈTE → NBFM"
  3. L'appareil est lu en premier
  4. Une boîte de sauvegarde s'ouvre avec un nom suggéré automatiquement Format du nom : meshtastic_NOM_XXXX_YYYYMMDD_HHMMSS.NBFM où NOM = short_name de l'appareil, XXXX = 4 derniers hex de l'adresse MAC Exemple : meshtastic_JMC_5F7B_20260509_095500.NBFM
  5. Le fichier NBFM est sauvegardé dans le dossier de travail

Export multi-nœuds (séquentiel)

Permet d'exporter plusieurs appareils l'un après l'autre sans redémarrer l'outil.

  1. Cliquer "Export multi-nœuds (séquentiel)"
  2. 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"
  3. L'appareil est lu, puis une boîte de sauvegarde s'ouvre avec le nom de fichier suggéré automatiquement (short_name + hex MAC)
  4. Cliquer "Passer" pour sauter un nœud
  5. Cliquer "Terminer" pour clore la session

alt

CONTENU DU FICHIER NBFM EXPORTÉ

Le fichier NBFM est un JSON simple (lisible et éditable dans n'importe quel éditeur de texte) et contient les sections suivantes :

  • _export_date : date/heure de l'export

  • _app_version : version du logiciel (schéma d'export interne)

  • 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, override_frequency, override_duty_cycle...)
    • 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, adc_multiplier_override
    • device : mode appareil, rôle, debug
    • security : clé publique, clé privée, admin_key, flags
  • module_config : modules logiciels — TOUS les modules présents sont exportés et restaurés, y compris ceux que l'interface n'expose pas (mqtt, serial, range_test, telemetry, canned_message, audio, remote_hardware, neighbor_info, ambient_lighting, detection_sensor, paxcounter, traffic_management…)

  • channels : canaux de communication (0 à 7), toujours les 8 présents

    • index : numéro du canal (0 = primaire)
    • settings.name : nom du canal
    • settings.psk : clé AES-256 (hex 32 o) / AES-128 (16 o) / "01" (défaut) / "" (désactivé)
    • settings.module_settings.position_precision : précision GPS partagée
    • role : 1=PRIMARY, 2=SECONDARY, 0=DISABLED
  • known_nodes : dict des nœuds connus du réseau mesh (indexé par !hex_node_id)

  • my_info : informations brutes du nœud local

  • metadata : métadonnées firmware

PROFIL FLOTTE

Le profil flotte est une version épurée d'une configuration, déployable sur n'importe quel nœud de la flotte.

alt

É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, override_frequency, override_duty_cycle...)
  • Tous les canaux avec leurs clés PSK
  • Modules, display, BT, position, power, device
  • Le multiplicateur ADC est conservé par défaut (supprimable via "Éditer champs clés")

Génération :

  1. Sélectionner un fichier backup dans la liste
  2. Cliquer "GÉNÉRER PROFIL FLOTTE"
  3. Le fichier est sauvegardé avec le suffixe _fleet.NBFM

RESTAURATION (ÉCRITURE VERS L'APPAREIL)

Restauration unique

  1. Sélectionner le fichier NBFM dans la liste
  2. Brancher l'appareil et vérifier le port COM
  3. Cliquer "RESTAURER le fichier sélectionné → Appareil"
  4. Une confirmation s'affiche avec : nom du fichier, type, date, appareil source
  5. La restauration s'effectue section par section, avec une fenêtre de progression en direct (owner → sections → modules → canaux → commit final)
  6. Un log détaillé et copiable s'affiche à la fin
  7. Redémarrer l'appareil pour appliquer les changements

Import multi-nœuds (déploiement en série)

Déploie le même fichier NBFM sur plusieurs appareils successivement. Utilise le fichier sélectionné dans la liste (identique à la restauration unique).

  1. Sélectionner le fichier NBFM dans la liste
  2. Cliquer "Import multi-nœuds"
  3. Pour chaque appareil :
    • Brancher l'appareil
    • Sélectionner son port COM (COM1 exclu automatiquement)
    • Cliquer "Restaurer ce nœud"
  4. Cliquer "Passer" pour sauter un nœud
  5. Cliquer "Terminer" quand tous les nœuds sont traités
  6. 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.

VÉRIFICATION D'INTÉGRITÉ

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.

RESTAURATION DES CANAUX

Les canaux sont restaurés dans l'ordre canonique du CLI Meshtastic officiel (setURL) :

  1. Canal primaire (role=1) EN PREMIER (index 0)
  2. Canaux secondaires (role=2) ensuite, par index
  3. Canaux désactivés (role=0) en dernier (pour purger l'ancien état)

Écrire le canal primaire en premier s'aligne sur la voie de restauration du firmware et injecte de façon fiable les canaux secondaires sur les firmwares récents. writeChannel() ne provoque pas de redémarrage.

Après le commit, NBFM relit les canaux (poll borné à 8 s) et, si un canal actif a été silencieusement rejeté par l'appareil (clé de session PKI sur un nœud non vierge), il relance ce canal une fois hors transaction. Si un canal reste inapplicable, un message « reset usine conseillé » s'affiche.

Note : après un commit, l'appareil redémarre souvent seul, ce qui peut empêcher la relecture automatique. Ce n'est pas une erreur — les canaux sont écrits ; seule la vérification automatique nécessite que l'appareil reste allumé.

Pour chaque canal sont restaurés :

  • Nom du canal
  • Rôle (PRIMARY / SECONDARY / DISABLED)
  • Clé PSK (AES-256 / AES-128) — restauration complète garantie
  • module_settings (position_precision, is_muted)

La PSK est stockée dans le NBFM et restaurée de façon tolérante (hex ET Base64 acceptés, désambiguïsés par la longueur décodée 1/16/32 octets). La valeur "01" / "AQ==" correspond à la clé par défaut Meshtastic.

RESTAURATION DES CLÉS DE SÉCURITÉ

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.

ÉDITION DES CHAMPS CLÉS

Le bouton "Éditer champs clés" permet de modifier les champs essentiels d'un fichier NBFM sans éditeur externe. L'éditeur est organisé en deux onglets.

Onglet "Principal"

  • Propriétaire : nom long (long_name), nom court (short_name)
  • LoRa : région (liste déroulante), modem preset (liste déroulante), fréquence override en MHz (vide = supprimer l'override)
  • Override duty cycle (case à cocher — contourner la limite légale 1 % EU868)
  • Rôle de l'appareil
  • Multiplicateur ADC : champ éditable + menu de presets par appareil (ADC_DEFAULTS) ; vide = clé supprimée
  • Nettoyage avancé (appliqué à la sauvegarde) : supprimer tous les canaux (garder uniquement le Canal 0 par défaut), supprimer les nœuds connus (known_nodes)

alt

alt

Onglet "Canaux" Les 8 canaux, chacun avec :

  • Case "Activé" → définit le rôle (SECONDARY si coché, DISABLED sinon ; le canal 0 est PRIMARY et verrouillé)
  • Nom du canal — saisir un nom auto-active le canal
  • Clé de chiffrement (PSK) en Base64 — format identique à l'application Meshtastic
  • Précision GPS (position_precision) : NA / 23 km / … / 1 m
  • Générateur de clé avec sélecteur de taille (Défaut / 128 bits / 256 bits) ; la clé générée s'affiche dans un champ résultat pour copier/coller
    • Défaut : produit AQ== (clé publique par défaut Meshtastic)
    • 128 bits : 16 octets aléatoires (AES-128)
    • 256 bits : 32 octets aléatoires (AES-256)

alt

À la sauvegarde, les 8 canaux sont reconstruits avec le bon rôle, les canaux actifs sont tassés sans trou (primaire en 0, secondaires packés en 1, 2, 3…), et la longueur des PSK est validée (une clé Base64 doit décoder en 1/16/32 octets, sinon la sauvegarde est bloquée avec un avertissement). Les modifications sont sauvegardées directement dans le fichier NBFM sélectionné (une copie horodatée est faite dans Backup/ avant écrasement).

VISUALISATION / ÉDITION DU JSON BRUT

"Voir contenu" ouvre le JSON formaté. Cocher la case "✏ Éditer" dégrouille la zone de texte et un bouton "ߒ Enregistrer". Le contenu est validé strictement par json.loads avant écriture (JSON invalide refusé), et une copie horodatée est faite dans Backup/ avant écrasement.

alt

NOMMAGE DES FICHIERS

Les fichiers exportés suivent ce format automatique : meshtastic_[short_name][YYYYMMDD][HHMMSS].NBFM

Exemple : meshtastic_JMC_5F7B_20260509_095500.NBFM

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].NBFM

COMPORTEMENT LORS D'UN CHAMP ABSENT DU NBFM

Si une clé est absente du NBFM (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.

COMPILATION EN EXÉCUTABLE

pyinstaller --onefile --windowed --name "NBFM" NBFM_V1.9.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.

DÉPANNAGE

Aucun port COM détecté → Vérifier le câble USB (câble 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 NBFM → 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 NBFM contient bien une PSK valide (16 ou 32 octets)

Un canal secondaire manque après restauration sur un nœud non vierge → NBFM relit et relance automatiquement ; si l'échec persiste, un reset usine de la cible est conseillé

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

CHANGELOG

v1.9

  • Éditeur de champs clés en deux onglets ("Principal" + "Canaux").
  • Les 8 canaux éditables, chacun avec une case "Activé" qui définit le rôle ; saisir un nom auto-active le canal ; tassement des canaux actifs (sans trou) à la sauvegarde.
  • Précision GPS par canal (position_precision) et multiplicateur ADC par appareil.
  • Injection canaux robuste : ordre canonique (primaire d'abord), vérification post-commit et relance automatique des canaux silencieusement rejetés par l'appareil.
  • Validation de la longueur des PSK dans l'éditeur (1/16/32 octets).
  • Visualiseur JSON éditable ("✏ Éditer" + "ߒ Enregistrer", validation stricte, backup horodaté).
  • Journaux d'import copiables.
  • Persistance de la langue et du dossier de travail (NBFM_Config.json).
  • Restauration PSK tolérante (hex ou Base64), corrigeant un cas où des backups standard pouvaient vider les clés de certains canaux.

v1.8

  • Barre de progression de la restauration (mono et multi-nœuds).

v1.75

  • Nouvelle colonne "Fréquence" (override_frequency si renseignée, sinon frequency).
  • Refonte de l'éditeur : région LoRa et modem preset en listes déroulantes ; champ fréquence override ; PSK des canaux éditables ; générateur de clé refondu.

v1.3 (10 mai 2026)

  • Système bilingue FR/EN avec changement instantané et persistance.
  • UI optimisée écran portable ; colonne "Modem" ; tri cliquable.

v1.2 (09 mai 2026) — Fichier source initial

  • Import multi-nœuds, Profil Flotte, éditeur champs clés, viewer JSON intégré, copie/suppression fichiers, détection ports USB auto (COM1 exclu).