Describe the bug
Running --factory-reset-device fails immediately with:
Field meshtastic.protobuf.AdminMessage.factory_reset_device: Expected an int, got a boolean.
To Reproduce
meshtastic --factory-reset-device
Expected behavior
Device receives the factory reset command and reboots with cleared BLE bonds and default config.
Root cause
In node.py, factoryReset() assigns Python booleans to protobuf fields that are typed as builtins.int in the generated stubs (admin_pb2.pyi):
p.factory_reset_device = True # raises TypeError in strict protobuf
p.factory_reset_config = True # same issue
Fix
p.factory_reset_device = 1
p.factory_reset_config = 1
Environment
- meshtastic-python version: 2.7.8
- Hardware: RAK4631
- OS: macOS, Python 3.14
- Connected via: USB serial
Describe the bug
Running --factory-reset-device fails immediately with:
Field meshtastic.protobuf.AdminMessage.factory_reset_device: Expected an int, got a boolean.
To Reproduce
meshtastic --factory-reset-device
Expected behavior
Device receives the factory reset command and reboots with cleared BLE bonds and default config.
Root cause
In node.py, factoryReset() assigns Python booleans to protobuf fields that are typed as builtins.int in the generated stubs (admin_pb2.pyi):
p.factory_reset_device = True # raises TypeError in strict protobuf
p.factory_reset_config = True # same issue
Fix
p.factory_reset_device = 1
p.factory_reset_config = 1
Environment