Bug: --reset-nodedb unreliable

未關閉
#959 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
冷清
技術堆疊
python
領域
cli

研究方向

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.

由索引模型根據 Issue 內容生成。

描述

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

主要語言
Python
星號
855
分支
355
平均合併
3 天 3 小時
30 天內合併 PR
12

環境準備

  • 提供 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

meshtastic/python 的其他 Issue

查看 meshtastic/python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。