Bug: --reset-nodedb unreliable

Aberta
#959 1 comentário 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
35/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Pouca atividade
Stack de tecnologia
python
Domínio
cli

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

Linguagem predominante
Python
Estrelas
855
Forks
355
Merge médio
3d 3h
PRs com merge (30d)
12

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de meshtastic/python

Todas as issues de meshtastic/python

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.