How i can upload a python script without delete the meshtastic firmware?

Hi, I wanna build a lora mesh with meshtastic, and i want to send some data with a python script, but i don’t know how I can upload that script without delete the firmware.
I have a tbeam device, and is my first time doing that, so i don’t know much about it.
I hope for some replies pls :pray: :blush:

Hi @hcorrea4 and welcome to this forum!
The python api is to be used on a computer where you connect the meshtastic device using USB. Python is not intender to be executed on the meshtastic device itself.
Maybe you can use the serial plugin for what you are trying to do?
Read more about it in the documentation

There is also a plugin for remote hardware but it has no documentation written for it yet

thanks for the help, i resolve how i can send data, now i need to solve how i can send the data to a mqtt server, you know how i can do that? pls help :pleading_face:

There is some support for mqtt.
I haven’t used it myself but i think that

  • The meshtastic device needs to be connected to wifi
  • It is possible to set ip:port for the mqtt server

For both these things you use the cli command meshtastic that is installed as a part of the python api
More info on the mqtt support:

The meshtastic cli:
$ meshtastic --help
list all things possible to set:
$ meshtastic --set x x

alas the MQTT stuff is verymuch a work in progress. There is a thread here on how to connect to it, but beyond that I’m not quite able to offer much support. In a couple of months (ish) when MQTT & riot.im gateways are finished it will be documented better and officially supported.

1 Like