meshtastic / python

The Python CLI and API for talking to Meshtastic devices
https://meshtastic.org
407 stars 170 forks source link

Adds admin session_passkey handling for 2.5 remote admin #655

Closed jp-bennett closed 2 months ago

jp-bennett commented 2 months ago

Tested with a 2.5 node doing remote admin over pki with another 2.5 node, as well as a legacy admin against an older node. For completeness, probably should test this with a 2.4 local node as well.

ianmcorvidae commented 2 months ago

This looks good to me!

Question, though -- do we need this for other admin "set" messages as well? writeChannel, setOwner, setURL, set_ringtone, set_canned_message, and stuff like "exit simulator", "reboot" etc. come to mind, and there might be some other places we should be pulling in the session key as well (e.g. when requesting channels, if writeChannel needs the key outbound, stuff like that)

jp-bennett commented 2 months ago

Question, though -- do we need this for other admin "set" messages as well?

Ah, yes. I suppose there is more to remote admin than just the config fields. You're correct, it will need to grab the key from those responses, and set it when sending those messages.