python icon indicating copy to clipboard operation
python copied to clipboard

Sendtext: Documentation not obvious that Direct Mesage is unencrypted

Open kop316 opened this issue 3 months ago • 1 comments

Hello!

This is coming from: https://gitlab.com/kop316/gtk-meshtastic-client/-/issues/25

It was not obvious that sendtext() is unencrypted for Direct Messaging, even for devices with updated firmware:

https://github.com/meshtastic/python/blob/master/meshtastic/mesh_interface.py#L406

I only found this out when I looked at sendData():

https://github.com/meshtastic/python/blob/master/meshtastic/mesh_interface.py#L495

I think it would be good to make this a bit more obvious in the code, and maybe to have an API like SendDMEncrypted()

It would also be nice have documentation on sendData() to say that the publicKey is not required when setting pkiEncrypted is True, as that took a bit of guess and check to confirm this was the case.

Thank you!

kop316 avatar Sep 09 '25 12:09 kop316

https://github.com/meshtastic/python/blob/master/meshtastic/mesh_interface.py#L406

@kop316 I'm also affected by this but came to say that these references link to "master" branch so line numbers are no longer valid. You might want to edit them to link to a specific commit.

heeplr avatar Oct 26 '25 12:10 heeplr