meshtastic / firmware

Meshtastic device firmware
https://meshtastic.org
GNU General Public License v3.0
3.52k stars 869 forks source link

Allow connected device (phone, api, whatever) to reset the NodeDB #1299

Closed mc-hamster closed 2 years ago

mc-hamster commented 2 years ago

Requested by @mkinney

Have a way to reset the NodeDB.

First set *numNodes = 0; and then subsequently call MeshService::reloadOwner().

Also need a way to trigger this from a connected device.

karamo commented 2 years ago

Ich used Meshtastic

set /p pn=Serial Port:
meshtastic --port %pn% --export-config >config.yml
meshtastic --port %pn% --set factory_reset true

followed by meshtastic --port %pn% --configure config.yml

mkinney commented 2 years ago

Doing a factory_reset is definitely an option, but there might (should be?) a more precise way.

Interesting use of setting the pn variable. :-)

mkinney commented 2 years ago

I transferred this issue to -python because I thought it might make sense to implement it in this client first. (But, that may not have been the smartest idea because I don't know if that method is exposed in -device.)

garthvh commented 2 years ago

What about this requires protos?

sachaw commented 2 years ago

Protobufs implemented

andrekir commented 2 years ago

1724