Note: I posted this basically verbatim on slack, but moved it here for wider viewability.
Question about the setting encryption. I’m on v1.2.33 with device firmware v1.2.30.
I’m writing the section on preshared keys for the docs. When I run 0-10 (from the protobufs), I get the following results. So I assume this is not how I want to change encryption.
~ $ meshtastic --ch-set psk 1
Connected to radio
Aborting due to: Cannot set ChannelSettings.psk to 1: 1 has type <class 'int'>, but expected one of: (<class 'bytes'>,)
When I run none/default/random
documented on the Meshtastic-python README I have mixed results
When I run none
I get the following results
~ $ meshtastic --ch-set psk none
Connected to radio
Writing modified channels to device
~ $ meshtastic --info
[...]
Channels:
PRIMARY psk=unencrypted { "modemConfig": "Bw125Cr48Sf4096", "psk": "AA==" }
When I run default
I get the following results
~ $ meshtastic --ch-set psk default
Connected to radio
Writing modified channels to device
~ $ meshtastic --info
[...]
Channels:
PRIMARY psk=default { "modemConfig": "Bw125Cr48Sf4096", "psk": "AQ==" }
And lastly when i run random
I get the following results (I think I found a bug here @geeksville, if it is, I’ll file an issue on the repo)
~ $ meshtastic --ch-set psk random
Connected to radio
Aborting due to: name 'genPSK256' is not defined
Can anyone shed some light on setting the psk value so i can correctly document it? Can a person enter a custom AES key manually using the CLI?