Meshtastic

Meshtastic CLI function to reboot

It’d be great to be able to use a command line call to reboot the device on the other end of the USB cable.

2 Likes

There is the command below - my observation is that this is best followed up with a power or button reset. Maybe it could force a reboot ?

meshtastic --set factory_reset true
Connected to radio
Set factory_reset to true
Writing modified preferences to device

sd

I’m looking for an ability from the command line to effectively get the same behaviour as a reset button press, without having to get to the device and without having to factory_reset. Ideally something like was hinted at in the Web commands, perhaps:

meshtastic --reboot

3 Likes

I use

esptool.py chip_id

Which, interestingly, reboots the device. I agree, it would be nice if there would be a “–reboot” parameter.

2 Likes

I believe this will work

esptool.py --baud 921600 hard_reset
1 Like

Close - it looks like esptool.py needs some sort of read or write command to ‘work’. This did the trick for me on a T-Beam:

esptool.py --after hard_reset read_flash_status

3 Likes

Nice, thanks for the share

but it is a good idea. I just added a reboot option to the AdminPlugin (and the python CLI code to use that). Which will allow rebooting of not just local nodes, but remote rebooting of any (authorized) node in the mesh.

5 Likes

How do I use this for remote node rebooting?

Use python tool with “meshtastic --dest nodeid --reboot” you’ll need to enable remote admin access first, alas I’m on mobile so don’t have a link handy.

1 Like

Ah, its likely that remote admin access that has me got… thanks

1 Like

meshtastic --ch-add admin
meshtastic --info
Copy the complete url with the admin channel hash.
Connect the USB to the remote node.
meshtastic --seturl https://www.meshtastic.org/d/#config-url-with-admin-channel
Connect the USB to the local node.
meshtastic --nodes
Get the node id of the remote node.
meshtastic --dest !12345678 --reboot

3 Likes

Hmm, tried this now and I just get the same timed out message:

Connected to radio
INFO:root:Requesting configuration from remote node (this could take a while)
Exception while handling connection: Timed out waiting for node config

I confirmed both devices have the admin channel configured and was done as per your suggested steps.

Seems to have broken at 1.2.17
https://github.com/meshtastic/Meshtastic-device/issues/772

3 Likes