Save mobile device profile preferences to the LoRa device (presumably based on the MAC of the BT chip)

I was just thinking that as the project matures, it may be useful to start being able to save some kind of configuration template or profile. This is assuming that there will eventually be configuration options, and for testing multiple types of devices it will certainly ease things.

Perhaps these settings can be saved to the ESP32 at some point? And then exported via XML, CSV, etc from the mobile app?

1 Like

Totally agree. And in some ways much of that is already implemented on the device side - just no GUI for it yet in the app.

The device keeps a “RadioConfig” object inside its flash filesystem, and sends it to the phone. The phone can any time it wants squirt down a new RadioConfig. RadioConfig contains both “UserPreferences” - general settings and “ChannelSettings” - the information for the Channel pane.

It is pretty painless to add new things to UserPreferences, just add the entry in the .proto file and then run “bin/regen-protos.sh” to regenerate the C code for reading/writing that stuff.

For testing multiple configs I really prefer the python “meshtastic” command rather than the android app - because though no gui, you can read/write/save any of the current settings (and it learns automatically from the protobuf file - so no code needs to be added to it to support new settings).

Some ‘okay’ documentation on these highlighted lines:

1 Like