Bug: --reset-nodedb unreliable

Aperta
#959 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
python
Ambito
cli

Direzione di ricerca

The bug is in the --reset-nodedb path of the Meshtastic Python CLI, exercised with --tcp, --nodes and --info. Start by reproducing the report: run --reset-nodedb, wait for the reboot, then run --nodes and check whether entries with old last-heard times remain. Attachments B4F8.node.txt and B4F8.supp.txt show the post-reset state. Done means the node list is actually cleared or the cause is documented, and the reporter's public-key concern is addressed.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I am using a series of regression tests in my effort to get to a reliable means of capturing telemetry (battery voltage) from a remote node over LoRa. I often run into the PKI_SEND_FAIL_PUBLIC_KEY error, so I started first testing out the --reset-nodedb command. Reading one paragraph is faster than reading my code, but for completeness' sake, it's all below.

Testing the -reset-nodedb command

I launch a --reset-nodedb command over WiFi to a test node, then immediately capture the result of --nodes. While I expect in the interim the device would have recognized itself, there are always one or more nodes in the list with a last heard time prior to the time the nodelist was cleared. My hope was that a reset of the nodedb would cure any corrupted public keys there. An examination of the nodes file shows exactly the Pubkeys in base64 one expects, even if the list includes old observations of nodes.

#!/usr/bin/bash
# ~/Documents/personal/ham/Meshtastic/test.reset.nodedb.sh
# chmod +x ~/Documents/personal/ham/Meshtastic/test.reset.nodedb.sh

clear

echo "test.reset.nodedb.sh"
echo

cd ~/Documents/personal/ham/Meshtastic/

. meshtastic_env/bin/activate
echo "Expect Meshtastic V 2.7.10 "
meshtastic --version

date

MSLEEP="15s"
MTIMEOUT="60"

source ./B4F8-DUT.sh

echo " "
echo "Common values"
echo "MTIMEOUT = $MTIMEOUT"
echo "MSLEEP =   $MSLEEP"

echo " "
echo "Device Under Test"
echo "DUT =     $DUT"
echo "DUTSHORT= $DUTSHORT"
echo "DUTID =   $DUTID"
echo "DUTIDI=   $DUTIDI"
echo "DUTIP =   $DUTIP"
echo "DUTNODE = $DUTNODE"
echo "DUTTELE = $DUTTELE"
echo "DUTINFO = $DUTINFO"
echo "DUTSUPP = $DUTSUPP"

echo " "
sudo arp-scan  192.168.1.200-192.168.1.215

echo " "
echo "Exercise the --reset-nodedb command for $DUT"
echo "(1) Capture support data for the device."
echo "(2) Reset nodedb on the device. Expect the implicit reboot."
echo "(3) Capture the device nodedb."
echo "(4) Capture the device info."
echo " "

echo "capture support"
meshtastic --tcp $DUTIP  --support > "$DUTSUPP"

echo " " 
echo "reset nodedb"
meshtastic --tcp $DUTIP --reset-nodedb
sleep 30
echo " "
echo "capture nodelist"
meshtastic --tcp $DUTIP --nodes > $DUTNODE
echo " "
echo "capture node info"
meshtastic --tcp $DUTIP --info > $DUTINFO

exit 0

When this script runs successsfully, the terminal session is unremarkable. I attach the various output files. The one that's worth looking at is B4F8.node.txt. Even after the --reset-nodedb command is run on the node, it has five entries.

B4F8.info.txt
B4F8.node.txt
B4F8.supp.txt

Lingua principale
Python
Stelle
855
Fork
355
Merge medio
3g 3h
PR unite (30g)
12

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di meshtastic/python

Tutte le issue di meshtastic/python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.