Skip to content

Bug: --reset-nodedb unreliable #959

Description

@roberthadow

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions