While the documentation has a section about using secondary channels, Multiple channel support | Meshtastic ,
all it covers is creation and deletion.
Is there currently a way, at least through the Python API, to send a text message
over a secondary channel? Configuration done via URL. Meshtastic.py version 1.2.40
with TBeam and TLORAs at version 1.2.45.
It has been a little while since I played with it but I think you need two commands in the python api, first set the channel index you want and then use sendtext
That’s what I thought too but, even after reloading the firmware into my TBEAM and 2 TLORAs,
I’m still getting all messages sent on the secret channel received by all units.
Looking at the python API, it appears to be possible. Take a look at __init__.py, function sendText; it encodes the text to UTF-8 bytes, sets the destination and port (to TEXT_MESSAGE_APP), and calls sendData, which takes a channelIndex input, defaulting to 0. Try calling sendData yourself with a non-zero channel index. If you’re still getting the message for the secret channel on all devices, that hints there’s a bug.
OK, using sendData() with all the appropriate finagling to send a text
message does appear to work. sendText() could probably use a channelIndex
option argument and allowing the meshtastic.py script to pass the ch-index arg
to sendText().
Hi, fe2o3. Would you mind sharing python command line(s) to do what you did to be able to send text over secondary? I’m a python noob, and I don’t know how to call sendData. Thank you in advance.
What ‘garth’ says is fine. The problem is the Python code doesn’t pass the channel index to the sendtext method. I was hoping that Kevin would put the two lines I’ve indicated above into the release but that hasn’t happened yet. :-\
Wanted to see if anyone has executed a successful test message on a secondary channel from Meshtastic Python >= v1.2.47
Don’t have my radios up and running yet.
Thanks, especially to mkinney for the commits!
Side-note/question: I don’t see a related issue tracker for Meshtastic Android, is this issue present in that code? Not a developer, just an IT guy trying to look at source, got confused between channel (long/slow, etc) vs. primary/secondary. Just wondering.
The only client at this point with any secondary channel texting support is the Python CLI. DMs are in the Web App and Python CLI and are coming to the next iOS release.