since this is my first post here, I’d like to thank everyone involved in Meshtastic development. Thank you very much for this open source project.
I have been playing with Meshtastic for a week now, on TTGO Lora32 hardware, and mostly through the Android App (latest beta) and through the CLI (on linux box).
There is something that I would like to do but it seems that I can’t achieve it. I would like to communicate between my nodes with a custom encryption key, so that neither content or geolocalisation is disclosed to other nodes.
Ideally, I would follow the dev advice : keep the base channel (primary channel) with default settings so that the radio may be included in the mesh with unkown other users of the area. Fair enough. So I created a secondary channel. Since I could not get how to do so on the Android App, I created it through the CLI, using a random generated key on “Device A”, which worked.
I got the string representation of the key listed with “meshtastic --info”, let’s pretend it is “abcdef”.
Then I tried to transfer the key to “Device B” and “Device C” with the CLI but I failed. Apparently, doing :
meshtastic --ch-index --ch-set psk "abcdef"
will fail with error of type mismatch (expected a ‘byte array’ but got a ‘string’).
It there a way to replicate 1 secondary channel across devices with CLI ? I saw the “–seturl” command but the only URL I could find was from “–info” and is said to cover ALL channels. I would really want to cherry pick what key goes on what device, so this “URL of everything” is going to be an issue very soon for me.
I tried it anyway, and it worked, so I got two devices with the same channels config, “primary” and “secondary”. BTW I find this wording a bit confusing, IIUC the “primary” is the radio settings, while the “secondary” are encryption-defined talk groups.
Then I could send message through this custom-psk encrypted channel, using the CLI for the emitter, and receiving on the receiver with the android App. But I could not message on this channel directly from the Android App.
So I thought “Fair enough, the Android App can not handle secondary channels, fair enough, so I will just use a custom psk key for the primary, so that Android App send message with this key, and be patient about nice handling of channels from Android App”.
But then I stumbled into the same issue : how do I set a custom PSK key for the primary channel, and how should I replicate it from device to device using the CLI ?
Is there a solution at all, currently working, to exchange messages with a custom encryption key from the Android App ?
Thank you very much, cheers.