Set shortName via python API

Hi all,

I’ve loked around about this but I can’t find an asnwer, is possible to set the shortName via python API?

Thanks for the support.

Regards.
Manuel

I don’t think that is possible.
You can set owner using ‘–setowner’ and a shortname is created based on that.

If you are using the “meshtastic.py” script, then yes, you can’t set the shortname. However, if you are writing your own python script, you can.

import meshtastic
device = meshtastic.SerialInterface()
device.setOwner( 'really long name', 'shr')
3 Likes

in practice, i’ve found for non-interactive use, that you may have to sleep or call device.waitForConfig() or else the API may not be fully ready before you start doing things like setting the owner.

2 Likes

oops I had intended that to be the normal behavior. I’ll fix the release so that if you have connectNow=True to the constructor (the default behavior), it will wait for config before returning.