Skip to content

cli --config-export can get wedged on parts of the export which blocks the entire export #814

@jinnatar

Description

@jinnatar

Basic info

  • Version: 2.7.0
  • Python version: 3.13.5
  • Installed via: pipx install 'meshtastic[cli]'
  • Issue manifests at least over serial and tcp, have not tried ble. Debug logs below with serial.
  • Variants manifested with so far: Sensecap T1000e, RAK4631. Debug logs below with T1000e.
  • Firmware: various versions, debug logs below with 2.6.11.

What I tried:

meshtastic --export-config

What I expected

Reliably retrieve config, or at least the portions of it that I care about. If the radio stops responding mid-way, a timeout and perhaps dumping the portions that were able to be retrieved before we hit the timeout. Or some flags with which I could control which portions to export given that I don't care at all about the canned responses module it's timing out on that isn't even enabled on the radio.

What I get instead

Infinite hang. Killing with ^C gives a stack trace:

File "/home/jinnak/.local/pipx/venvs/meshtastic/lib/python3.13/site-packages/meshtastic/main.py", line 2182, in main
common()
~~~~~~^^
File "/home/jinnak/.local/pipx/venvs/meshtastic/lib/python3.13/site-packages/meshtastic/main.py", line 1423, in common
onConnected(client)
~~~~~~~~~~~^^^^^^^^
File "/home/jinnak/.local/pipx/venvs/meshtastic/lib/python3.13/site-packages/meshtastic/main.py", line 781, in onConnected
config_txt = export_config(interface)
File "/home/jinnak/.local/pipx/venvs/meshtastic/lib/python3.13/site-packages/meshtastic/main.py", line 1155, in export_config
canned_messages = interface.getCannedMessage()
File "/home/jinnak/.local/pipx/venvs/meshtastic/lib/python3.13/site-packages/meshtastic/mesh_interface.py", line 1091, in getCannedMessage
return node.get_canned_message()
~~~~~~~~~~~~~~~~~~~~~~~^^
File "/home/jinnak/.local/pipx/venvs/meshtastic/lib/python3.13/site-packages/meshtastic/node.py", line 525, in get_canned_message
time.sleep(0.1)
~~~~~~~~~~^^^^^
KeyboardInterrupt

In every scenario it's always get_canned_message where it fails. The canned messages module is not enabled.

Other info

The debug logging is quite verbose and contains a lot of data I'm not able to gauge for whether it's sensitive or not, so I'm not going to put that in here unless you can point me at some guidance for sanitization. From what I can see, it's primarily about radio traffic flowing through and not about the operation I'm trying to execute. There are however some choice snippets that actually seem relevant that I'll try to extract below lightly sensored.

meshtastic --debug --export-config

DEBUG file:mesh_interface.py _handleFromRadio line:1307 Received myinfo: my_node_num: 353xxx min_app_version: 30200 device_id: "\322v\346\231\xxx" pio_env: "tracker-t1000-e"
DEBUG file:mesh_interface.py _handleFromRadio line:1303 Received from radio: deviceuiConfig {
screen_brightness: 153
screen_timeout: 30
}
DEBUG file:mesh_interface.py _handleFromRadio line:1452 Unexpected FromRadio payload
DEBUG file:mesh_interface.py _handleFromRadio line:1291 in mesh_interface.py _handleFromRadio() fromRadioBytes: b'"\x8e\x01\x08\x9b\xd7xxxx'
DEBUG file:mesh_interface.py _handleFromRadio line:1303 Received from radio: node_info {
num: 353xxx
user { [snip, usual normal node_info export]
DEBUG file:mesh_interface.py _handleFromRadio line:1314 Received nodeinfo: {'num': 353xxx [snip, usual nodeinfo data]
EBUG file:mesh_interface.py _handleFromRadio line:1303 Received from radio: metadata {
firmware_version: "2.6.11.60ec05e"
device_state_version: 24
canShutdown: true
hasBluetooth: true
position_flags: 811
hw_model: TRACKER_T1000_E
hasPKC: true
excluded_modules: 24000
}
DEBUG file:mesh_interface.py _handleFromRadio line:1303 Received from radio: channel { [snip a bunch of channels]
[snip a bunch more of individual config nodes exporting just fine]
[snip a bunch of fileInfo exports just fine]
DEBUG file:mesh_interface.py _handleFromRadio line:1337 Config complete ID 130xxx
[snip a bunch of getMyNodeInfo from a neighboring node]
DEBUG file:node.py get_canned_message line:514 in get_canned_message()
DEBUG file:node.py _sendAdmin line:991 adminIndex:0
DEBUG file:mesh_interface.py sendData line:541 Serializing protobuf as data: get_canned_message_module_messages_request: true
DEBUG file:mesh_interface.py sendData line:544 len(data): 2
DEBUG file:mesh_interface.py sendData line:545 mesh_pb2.Constants.DATA_PAYLOAD_LEN: 233
DEBUG file:mesh_interface.py sendData line:568 Setting a response handler for requestId 3935424292
DEBUG file:mesh_interface.py _sendPacket line:1005 Sending packet: to: 353xxx decoded { portnum: ADMIN_APP payload: "P\001" want_response: true } id: 3935424292 hop_limit: 3 want_ack: true priority: RELIABLE pki_encrypted: true
DEBUG file:stream_interface.py _sendToRadioImpl line:114 Sending: packet { to: 353xxx decoded { portnum: ADMIN_APP payload: "P\001" want_response: true } id: 3935424292 hop_limit: 3 want_ack: true priority: RELIABLE pki_encrypted: true }
DEBUG file:stream_interface.py _sendToRadioImpl line:119 sending header:b'\x94\xc3\x00\x1f' b:b'\n\x1d\x15\x9b\xeb\x91\xd2"\x08\x08\x06\x12\x02P\x01\x18\x015$\xcf\x91\xeaH\x03P\x01XF\x88\x01\x01'
DEBUG file:mesh_interface.py _sendToRadio line:1244 packet ea91cf24 got acked under us
DEBUG file:mesh_interface.py _handleFromRadio line:1291 in mesh_interface.py _handleFromRadio() fromRadioBytes: b'Z\n\x10\x0f\x18\x10 \xa4\x9e\xc7\xd4\x0e'
DEBUG file:mesh_interface.py _handleFromRadio line:1303 Received from radio: queueStatus {
free: 15
maxlen: 16
mesh_packet_id: 3935424292
}
EBUG file:mesh_interface.py _handleQueueStatusFromRadio line:1268 TX QUEUE free 15 of 16, res = 0, id = ea91cf24
DEBUG file:mesh_interface.py _handleQueueStatusFromRadio line:1280 Reply for unexpected packet ID ea91cf24
DEBUG file:mesh_interface.py _handleFromRadio line:1291 in mesh_interface.py _handleFromRadio() fromRadioBytes: b'Z\n\x10\x0f\x18\x10 \xe2\xea\x81\x81\n'
DEBUG file:mesh_interface.py _handleFromRadio line:1303 Received from radio: queueStatus {
free: 15
maxlen: 16
mesh_packet_id: 2686481762
}
DEBUG file:mesh_interface.py _handleQueueStatusFromRadio line:1268 TX QUEUE free 15 of 16, res = 0, id = a0207562
DEBUG file:mesh_interface.py _handleQueueStatusFromRadio line:1280 Reply for unexpected packet ID a0207562
DEBUG file:mesh_interface.py _handleFromRadio line:1291 in mesh_interface.py _handleFromRadio() fromRadioBytes: b'\x12%\r\x9b\xeb\x91\xd2\x15\x9b\xeb\x91\xd2"\x0b\x08\x05\x12\x02\x18\x005$\xcf\x91\xea5bu \xa0=~%\x96hH\x03Xx'
DEBUG file:mesh_interface.py _handleFromRadio line:1303 Received from radio: packet {
from: 353xxx
to: 353xxx
decoded {
portnum: ROUTING_APP
payload: "\030\000"
request_id: 3935424292
}
id: 2686481762
rx_time: 1754670462
hop_limit: 3
priority: ACK
}
DEBUG file:mesh_interface.py _handlePacketFromRadio line:1612 Got a response for requestId 3935424292
DEBUG file:mesh_interface.py _handlePacketFromRadio line:1634 Publishing meshtastic.receive.routing: packet={'from': 353xxx, 'to': 353xxx, 'decoded': {'portnum': 'ROUTING_APP', 'payload': b'\x18\x00', 'requestId': 3935424292, 'routing': {'errorReason': 'NONE', 'raw': error_reason: NONE }}, 'id': 2686481762, 'rxTime': 1754670462, 'hopLimit': 3, 'priority': 'ACK', 'raw': from: 353xxx to: 353xxx decoded { portnum: ROUTING_APP payload: "\030\000" request_id: 3935424292 } id: 2686481762 rx_time: 1754670462 hop_limit: 3 priority: ACK , 'fromId': '!d29xxx', 'toId': '!d29xxx'}
DEBUG file:main.py onReceive line:70 in onReceive() d:{'portnum': 'ROUTING_APP', 'payload': b'\x18\x00', 'requestId': 3935424292, 'routing': {'errorReason': 'NONE', 'raw': error_reason: NONE
}}
DEBUG file:mesh_interface.py _handleFromRadio line:1291 in mesh_interface.py handleFromRadio() fromRadioBytes: b'\x12:\r\x9b\xeb\x91\xd2\x15\xff\xff\xff\xff" \x08C\x12\x1c\r\xba%\x96h\x12\x15\x08e\x15o\x12\x87@\x1d\xe8\xb4\x81?%,\x99>(\x86\xac\x025cIrN=\xba%\x96hH\x03X\n'
DEBUG file:mesh_interface.py handleFromRadio line:1303 Received from radio: packet {
from: 353xxx
to: 429xxx
decoded {
portnum: TELEMETRY_APP
payload: "\r\272%\226h\022\025\010e\025o\022\207@\035\350\264\201?%
,\231>(\206\254\002"
}
id: 1316112739
rx_time: 1754670522
hop_limit: 3
priority: BACKGROUND
}
[snip a bunch more seemingly unrelated telemetry traffic, nothing useful is logged after this point me thinks as it's stuck in a sleep(0.1) loop]
[after hitting ^C]
WARNING file:stream_interface.py __reader line:207 Meshtastic serial port disconnected, disconnecting... device reports readiness to read but returned no data (device disconnected or multiple access on port?)
DEBUG file:stream_interface.py __reader line:222 reader is exiting
DEBUG file:stream_interface.py _disconnected line:85 Closing our port
^CTraceback (most recent call last):
File "/home/jinnak/.local/bin/meshtastic", line 7, in
sys.exit(main())
~~~~^^
File "/home/jinnak/.local/pipx/venvs/meshtastic/lib/python3.13/site-packages/meshtastic/main.py", line 2182, in main
common()
~~~~~~^^
File "/home/jinnak/.local/pipx/venvs/meshtastic/lib/python3.13/site-packages/meshtastic/main.py", line 1423, in common
onConnected(client)
~~~~~~~~~~~^^^^^^^^
File "/home/jinnak/.local/pipx/venvs/meshtastic/lib/python3.13/site-packages/meshtastic/main.py", line 781, in onConnected
config_txt = export_config(interface)
File "/home/jinnak/.local/pipx/venvs/meshtastic/lib/python3.13/site-packages/meshtastic/main.py", line 1155, in export_config
canned_messages = interface.getCannedMessage()
File "/home/jinnak/.local/pipx/venvs/meshtastic/lib/python3.13/site-packages/meshtastic/mesh_interface.py", line 1091, in getCannedMessage
return node.get_canned_message()
~~~~~~~~~~~~~~~~~~~~~~~^^
File "/home/jinnak/.local/pipx/venvs/meshtastic/lib/python3.13/site-packages/meshtastic/node.py", line 525, in get_canned_message
time.sleep(0.1)
~~~~~~~~~~^^^^^
KeyboardInterrupt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions